-
Notifications
You must be signed in to change notification settings - Fork 201
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* New adverserial ones Signed-off-by: g2flyer <[email protected]>
- Loading branch information
Showing
7 changed files
with
802 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import gdb | ||
import re | ||
import shutil | ||
|
||
def adversary_do(cmd): | ||
# extract interesting info from context | ||
test_function=gdb.selected_frame().older().name() | ||
operation=gdb.selected_frame().name() | ||
internal_path=gdb.selected_frame().read_var('path').string() | ||
external_path=re.sub(r'/tmp/enc_input/', './tmp/enc_input/', internal_path) | ||
external_path_saved=external_path+"._saved_" | ||
|
||
# execute and report result for pytest digestion | ||
try: | ||
cmd(external_path, external_path_saved) | ||
print(f"OK: {test_function} in {operation}({internal_path})") | ||
except: | ||
print(f"FAIL: {test_function} in {operation}({internal_path})") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.