Skip to content

Instantly share code, notes, and snippets.

@Und3rf10w
Last active August 28, 2018 17:21
Show Gist options
  • Select an option

  • Save Und3rf10w/2f265a61ed6a6efbd201da874151442f to your computer and use it in GitHub Desktop.

Select an option

Save Und3rf10w/2f265a61ed6a6efbd201da874151442f to your computer and use it in GitHub Desktop.
Shell function to wrap radamsa against an application that takes one argument
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