Last active
August 28, 2018 17:21
-
-
Save Und3rf10w/2f265a61ed6a6efbd201da874151442f to your computer and use it in GitHub Desktop.
Shell function to wrap radamsa against an application that takes one argument
This file contains hidden or 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
| while true; do | |
| testcase=$(echo $2 | radamsa) # AAAA is the sample arguments you're passing to the application you're testing | |
| echo -e "\n\n---TESTCASE---\n$testcase\n\n---OUTPUT---" | |
| ./$1 $testcase # tmp is the application to be fuzzed | |
| test $? -gt 0 && break # if the fuzzed application returns anything that's not a 0, then break out of the loop | |
| echo -e "\n---ENDOUTPUT---\n" | |
| echo -e "---ENDCASE---\n" | |
| done | |
| echo -e "\n\n\e[0;31mAPPLICATION CRASHED\n\e[0mHexdump of input below:\n\n" | |
| printf $testcase | hexdump -Cv | tee crash.hexdump # return a hexdump of the crashy input |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment