extract.sh 608 B

12345678910111213141516171819202122232425262728293031
  1. #!/bin/bash
  2. fonts=""
  3. a="$(swfextract $1 |grep 'Font'|awk -F')' '{print $NF}')"
  4. if [ -n "$fonts" ]
  5. then
  6. echo "$(swfstrings $1)"
  7. else
  8. jpegs=""
  9. jpegs="$(swfextract $1 |grep 'JPEG'|awk -F')' '{print $NF}')"
  10. echo "$jpegs"
  11. OLD_IFS="$IFS"
  12. IFS=","
  13. arr=($jpegs)
  14. IFS="$OLD_IFS"
  15. for s in ${arr[@]}
  16. do
  17. swfextract $1 -j $s -o $2/$s.jpg
  18. done
  19. pngs=""
  20. pngs="$(swfextract $1 |grep 'PNG'|awk -F')' '{print $NF}')"
  21. echo "$pngs"
  22. OLD_IFS="$IFS"
  23. IFS=","
  24. arr=($pngs)
  25. IFS="$OLD_IFS"
  26. for s in ${arr[@]}
  27. do
  28. swfextract $1 -p $s -o $2/$s.png
  29. done
  30. echo "ok"
  31. fi