SWFThis is a page for Flash SWF file analysis (Header). Try sample file: Try an example
What are we looking for?For a SWF file, we are looking for "FWS" or, in hex, 46 57 53 at the start of the file, or "CWS" for a compressed file. The full format is: here |
File contents analysisByte 0 [Should be 46 (F) or 43 (C)]: 3C File signature analysis (Header analysis)Additional scanning signature analysisFile hex characters[00000000] 3C 21 64 6F 63 74 79 70 65 20 68 74 6D 6C 3E 0A <!doctype.html>. Base-64 conversionPCFkb2N0eXBlIGh0bWw+CjxodG1sIGRhdGEtYWRibG9ja2tleT0iTUZ3d0RRWUpLb1pJaHZj Flasm OutputThe following is the Flasm output: |
Sample code
public string getSwf(byte[] b) { string TextBox1 = ""; try { TextBox1 += "Byte 0 [Should be 46]: " + Global.intToHex(b[0]) + "<br/>"; TextBox1 += "Byte 1 [Should be 57]: " + Global.intToHex(b[1]) + "<br/>"; TextBox1 += "Byte 2 [Should be 53]: " + Global.intToHex(b[2]) + "<br/>"; TextBox1 += "Byte 3: Version: " + Global.intToHex(b[3]) + "<br/>"; uint filesize = ((uint)b[7] << 24) + ((uint)b[6] << 16) + ((uint)b[5] << 8) + ((uint)b[4]); TextBox1 += "Byte 4-7: File size (bytes): " + Convert.ToString(filesize)+ "<br/>"; } catch { } return (TextBox1); }
An outline of the format is: