Skip to content

Instantly share code, notes, and snippets.

@olmstadfm
Last active December 4, 2016 15:16
Show Gist options
  • Save olmstadfm/be27c0041105689600b01eaf599064b9 to your computer and use it in GitHub Desktop.
Save olmstadfm/be27c0041105689600b01eaf599064b9 to your computer and use it in GitHub Desktop.
Dumb fuzzer
#!/bin/bash
# Prints n (100 by default) secuential little-endian \x escaped hex numbers, starting from argv[1].
# Invocation:
# ./seq.sh hex_number_as_string [count=100]
# ./seq.sh ffffdd30 10
esp="$1"
count=${2:-100}
for i in $(seq $count); do
esp=$((0x$esp + 0x8));
esp=$(printf "%x\n" $esp)
echo -e "\\x${esp:6:2}\\x${esp:4:2}\\x${esp:2:2}\\x${esp:0:2}"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment