Skip to content

Commit 35cb62e

Browse files
authored
Update sol.py
1 parent 975b238 commit 35cb62e

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

lab7/sol.py

+3-8
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22
import sys
33

44
proj = angr.Project('./login')
5-
65
init_state = proj.factory.entry_state()
7-
86
simulation = proj.factory.simgr(init_state)
97

108
def success_condition(state):
@@ -15,9 +13,6 @@ def fail_condition(state):
1513

1614
simulation.explore(find=success_condition, avoid=fail_condition)
1715

18-
if simulation.found:
19-
solution = simulation.found[0]
20-
password = solution.posix.dumps(sys.stdin.fileno()).strip()
21-
print(password.decode())
22-
else:
23-
print("Password not found.")
16+
solution = simulation.found[0]
17+
18+
print(solution.posix.dumps(sys.stdin.fileno()))

0 commit comments

Comments
 (0)