Skip to content

Instantly share code, notes, and snippets.

@kerbeh
Forked from oswaldoacauan/swfextract
Created October 25, 2018 02:00
Show Gist options
  • Save kerbeh/acd48cfc32b0311a144083f7e3f3405d to your computer and use it in GitHub Desktop.
Save kerbeh/acd48cfc32b0311a144083f7e3f3405d to your computer and use it in GitHub Desktop.
SWFExtract All Files
#!/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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment