Skip to content

[LAB7] 510558017 #601

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 38 commits into from
Jun 26, 2024
Merged
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
2233c14
fix: improve workflows
AlaRduTP Mar 13, 2024
e2b8057
fix: scripts/rebase-all.sh will fail due to too frequent remote opera…
AlaRduTP Mar 13, 2024
8336df3
feat: lab2
AlaRduTP Mar 13, 2024
0f5c5dd
feat: merge-all
AlaRduTP Mar 13, 2024
5fa8ffe
remove: create-branches.sh
AlaRduTP Mar 20, 2024
354fae7
feat: auto resolve conflicts when merging
AlaRduTP Mar 20, 2024
e49fa08
feat: improve GitHub workflows
AlaRduTP Mar 20, 2024
c895269
feat: lab3
AlaRduTP Mar 20, 2024
22a9521
feat: an easy check for changed files
AlaRduTP Mar 20, 2024
15ca1a7
doc: detailed steps of syncing fork
AlaRduTP Mar 20, 2024
dd650d8
fix: remove trailing whitespace
AlaRduTP Mar 20, 2024
cee6631
feat: add node_modules into gitignore
AlaRduTP Mar 27, 2024
ffbfbd7
feat: lab4
AlaRduTP Mar 27, 2024
5ee9d55
Add lab5
YingMuo Apr 17, 2024
86b3714
Fix github action
YingMuo Apr 17, 2024
c27f68f
Fix README.md
YingMuo Apr 17, 2024
419ed6d
fix: gh-script syntax error
AlaRduTP Apr 17, 2024
41cc403
add: lab6
YingMuo Apr 24, 2024
9777d36
feat: lab6
YingMuo Apr 24, 2024
110400a
fix: lab6
YingMuo Apr 24, 2024
eae2c35
fix: lab6
YingMuo Apr 24, 2024
2063787
Fix: lab6
YingMuo Apr 24, 2024
a2f55d5
Add: lab7
YingMuo May 1, 2024
56585b1
Fix: lab7
YingMuo May 1, 2024
7a945c9
Fix: lab7, angr not installed
YingMuo May 1, 2024
bb5fb3d
feat: add hw4
TaiYou-TW May 30, 2024
b88ef9e
fix: wrong days for hw4 leap year
TaiYou-TW May 30, 2024
3a9853d
Update lab-autograding.yml
as10968574 Jun 11, 2024
3e3e824
Update sol.py
as10968574 Jun 11, 2024
b1047d3
Merge branch '510558017' into lab7
as10968574 Jun 11, 2024
073a33d
Update lab-autograding.yml
as10968574 Jun 24, 2024
6ae4b02
Delete hw4 directory
as10968574 Jun 24, 2024
2a7f461
Update sol.py
as10968574 Jun 24, 2024
fc665fc
Update sol.py
as10968574 Jun 24, 2024
c89d575
Update sol.py
as10968574 Jun 24, 2024
9c5a2a1
Update sol.py
as10968574 Jun 24, 2024
975b238
Update sol.py
as10968574 Jun 24, 2024
35cb62e
Update sol.py
as10968574 Jun 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions lab7/sol.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import angr
import sys

proj = angr.Project('./login')
init_state = proj.factory.entry_state()
simulation = proj.factory.simgr(init_state)

def success_condition(state):
return b"Login successful" in state.posix.dumps(sys.stdout.fileno())

def fail_condition(state):
return b"Login failed" in state.posix.dumps(sys.stdout.fileno())

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

solution = simulation.found[0]

print(solution.posix.dumps(sys.stdin.fileno()))
Loading