Identify-whether-a-SWF-file-is-compressed

From aldeid
Jump to navigation Jump to search

Compressed Flash

To identify whether a SWF file is compressed, you can use file file or hexdump command:

$ curl -O http://www.massmotionmedia.com/fr/swf/site.swf
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  2416  100  2416    0     0  15710      0 --:--:-- --:--:-- --:--:-- 50333
$ file site.swf 
site.swf: Macromedia Flash data (compressed), version 9
$ hexdump -n3 -C site.swf 
00000000  43 57 53                                          |CWS|
00000003

The CWS flag indicates a compressed Flash file.

Uncompressed Flash

$ curl -O http://helpx.adobe.com/content/help/en/flash-player/kb/find-version-flash-player/_jcr_content/main-pars/flash_generic/file.res/ballAnimeEnglish.swf
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  5256  100  5256    0     0  19476      0 --:--:-- --:--:-- --:--:-- 38364
$ file ballAnimeEnglish.swf 
ballAnimeEnglish.swf: Macromedia Flash data, version 5
$ hexdump -n3 -C ballAnimeEnglish.swf 
00000000  46 57 53                                          |FWS|
00000003

The FWS flag indicates an uncompressed Flash file.