Skip to content

Commit 4549a5d

Browse files
committed
feat: finish Lab6
1 parent 078bea6 commit 4549a5d

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

Lab6/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.PHONY: all run run1 run2 clean
22

33
all:
4-
gcc -o chal -no-pie chal.c
4+
@gcc -o chal -no-pie -s chal.c
55

66
run: run1 run2
77

Lab6/ans

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
Enter the secret key: Correct! The flag is: CTF{symbolic_execution_for_the_win}
1+
Enter the secret key:
2+
Correct! The flag is: CTF{symbolic_execution_for_the_win}

Lab6/chal

14.4 KB
Binary file not shown.

Lab6/validate.sh

100644100755
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Check for unwanted files
44
for file in *; do
5-
if [[ $file != "solve.py" && $file != "chal.c" && $file != "Makefile" && $file != "README.md" && $file != "validate.sh" && $file != "ans" ]]; then
5+
if [[ $file != "venv" && $file != "solve.py" && $file != "chal" && $file != "chal.c" && $file != "Makefile" && $file != "README.md" && $file != "validate.sh" && $file != "ans" && $file != "1.txt" && $file != "2.txt" ]]; then
66
echo "[!] Unwanted file detected: $file."
77
exit 1
88
fi
@@ -19,10 +19,11 @@ rm -rf *
1919
cp $solution_path/Makefile .
2020
cp $solution_path/ans .
2121
cp $solution_path/*.c .
22-
cp $solution_path/*.py .
22+
cp $solution_path/chal .
23+
cp $solution_path/*.txt .
2324

2425
make
25-
make run > out
26+
make run$1 > out
2627
result=$(diff --strip-trailing-cr ans out)
2728
if [[ -n $result ]]; then
2829
echo "[!] Expected: "

0 commit comments

Comments
 (0)