Skip to content

Commit 963b399

Browse files
committed
tried solving it, still failed using validate script
1 parent be02417 commit 963b399

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lab8/solve.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def main():
88
project = angr.Project('./chal', auto_load_libs=False)
99

1010
input_len = 8
11-
input_chars = [claripy.BVS('', 8) for _ in range(input_len)]
11+
input_chars = [claripy.BVS(f'c{i}', 8) for i in range(input_len)]
1212
sym_input = claripy.Concat(*input_chars)
1313
full_input = claripy.Concat(sym_input, claripy.BVV(0, 8))
1414

@@ -19,6 +19,7 @@ def main():
1919
state.solver.add(c <= 0x7e)
2020

2121
simgr = project.factory.simgr(state)
22+
2223
simgr.explore(
2324
find=lambda s: b"CTF{" in s.posix.dumps(1),
2425
avoid=lambda s: b"Wrong key" in s.posix.dumps(1)

0 commit comments

Comments
 (0)