Skip to content

Commit fc665fc

Browse files
authored
Update sol.py
1 parent 2a7f461 commit fc665fc

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lab7/sol.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import angr
2+
import sys
23
proj = angr.Project('./login', auto_load_libs=False)
3-
44
start_state = proj.factory.entry_state()
55
simgr = proj.factory.simgr(start_state)
66

77
simgr.explore(find=lambda s: b'Login success' in s.posix.dumps(1))
88

99
if simgr.found:
10-
solution_state = simgr.found[0]
11-
password = solution_state.posix.dumps(0).strip()
12-
print(password.decode())
10+
solution_state = simgr.found[0]
11+
password = solution_state.posix.dumps(0).strip()
12+
print(password.decode())
1313
else:
14-
print("Password not found.")
14+
print("Password not found.")

0 commit comments

Comments
 (0)