Skip to content
Open
Changes from all commits
Commits
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
6 changes: 4 additions & 2 deletions 0x07_0x08_uncrackable_crackme/fuzz.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,17 @@ def compare(fn1, fn2):
return f1.read()==f2.read()

def check_output():
os.system("(./license_2_fuzz ; ./license_2_fuzz AAAA-Z10N-42-OK) > fuzz_output")
os.system("(./license_2 ; ./license_2 AAAA-Z1ON-42-OK) > orig_output")
os.system("(./license_2_fuzz ; ./license_2_fuzz AAAA-Z1ON-42-OK) > fuzz_output")
return compare("orig_output", "fuzz_output")


def check_gdb():
os.system("echo disassemble main | gdb license_2 > orig_gdb")
os.system("echo disassemble main | gdb license_2_fuzz > fuzz_gdb")
return compare("orig_gdb", "fuzz_gdb")

def check_radare():
os.system('echo -e "aaa\ns sym.main\npdf" | radare2 license_2 > orig_radare')
os.system('echo -e "aaa\ns sym.main\npdf" | radare2 license_2_fuzz > fuzz_radare')
return compare("orig_radare", "fuzz_radare")

Expand Down