We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3a9853d commit 3e3e824Copy full SHA for 3e3e824
lab7/sol.py
@@ -0,0 +1,13 @@
1
+import angr
2
+proj = angr.Project('./login', auto_load_libs=False)
3
+start_state = proj.factory.entry_state()
4
+simgr = proj.factory.simgr(start_state)
5
+
6
+simgr.explore(find=lambda s: b'Login success' in s.posix.dumps(1))
7
8
+if simgr.found:
9
+ solution_state = simgr.found[0]
10
+ password = solution_state.posix.dumps(0).strip()
11
+ print(password.decode())
12
+else:
13
+ print("Password not found.")
0 commit comments