Skip to content

Instantly share code, notes, and snippets.

@ptantiku
Created March 2, 2014 12:51
Show Gist options
  • Save ptantiku/9306133 to your computer and use it in GitHub Desktop.
Save ptantiku/9306133 to your computer and use it in GitHub Desktop.
Collecting rom-0 files and decompress
#!/bin/bash
prefix_ip='10.10.10'
#collecting
for i in `seq 1 255`
do
wget --connect-timeout=1 -t 1 -O "$prefix_ip.$i.rom-0" "http://$prefix_ip.$i/rom-0"
done
#delete empty file
find . -name '*.rom-0' -size 0 -exec rm {} \;
#decompress files
find . -name '*.rom-0' -exec ./decompress {} 2>/dev/null \;
strings *.decomp > output.txt
less output.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment