Created
March 22, 2015 02:50
-
-
Save oswaldoacauan/35b5d426d04819926ce7 to your computer and use it in GitHub Desktop.
SWFExtract All Files
This file contains hidden or 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/sh | |
for i in ./*.swf ; do | |
for j in `swfextract $i | grep -E PNGs.* -o | grep -E [0-9]+ -o` ; do | |
echo "$i -> extract png $j"; | |
swfextract -p "$j" "$i" -o "$i"_"$j".png | |
done | |
for j in `swfextract $i | grep -E JPEGs.* -o | grep -E [0-9]+ -o` ; do | |
echo "$i -> extract jpeg $j"; | |
swfextract -j "$j" "$i" -o "$i"_"$j".jpg | |
done | |
for j in `swfextract $i | grep -E Shapes.* -o | grep -E [0-9]+ -o` ; do | |
echo "$i -> extract shapes $j"; | |
swfextract -i "$j" "$i" -o "$i"_"$j".swf && swfrender "$i"_"$j".swf -o "$i"_"$j".png | |
done | |
for j in `swfextract $i | grep -E MovieClips.* -o | grep -E [0-9]+ -o` ; do | |
echo "$i -> extract movieclips $j"; | |
swfextract -i "$j" "$i" -o "$i"_"$j".swf | |
done | |
done |
Be aware swfextract groups continuous ranges:
e.g.:
[-s] 44 Sounds: ID(s) 1-44
Raw extraction part can be reduced to:
#!/bin/sh
for i in ./*.swf ; do
swfextract --outputformat "extract_%06d.%s" -a 1- "$i"
done
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you, this is very helpful.