各類檔案頭標準編碼
JPEG (jpg),檔案頭:FF D8 FF PNG (png),檔案頭:89 50 4E 47 【參考:png檔案頭詳解】89 50 4e 47 0d 0a 1a 0a GIF (gif),檔案頭:47 49 46 38 Windows Bitmap (bmp),檔案頭:42 4D [參考:bmp檔案格式詳解]42 4D 36 0C 30 00 00 00 00 00 36 00 00 00 28 00 00 00 56 05 00 00 00 03 00 00 01 00 18 00 00 00 00 00 00 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 python反編譯檔案pyc的頭:03 F3 0D 0A (實驗吧,py的交易會用到) pyd的檔案頭:4D 5A 90 00 ZIP Archive (zip),檔案頭:50 4B 03 04 ascii碼部分是PK,可以直接根據PK判斷是zip檔案,也有可能是doc檔案 rar檔案: 52 61 72 21 7z檔案頭:37 7A BC AF 27 1C(實驗吧,有趣的檔案用到了) MS Word/Excel (xls.or.doc),檔案頭:D0CF11E0 CAD (dwg),檔案頭:41433130 Adobe Photoshop (psd),檔案頭:38425053 Rich Text Format (rtf),檔案頭:7B5C727466 XML (xml),檔案頭:3C3F786D6C HTML (html),檔案頭:68746D6C3E Email [thorough only] (eml),檔案頭:44656C69766572792D646174653A Outlook Express (dbx),檔案頭:CFAD12FEC5FD746F Outlook (pst),檔案頭:2142444E MS Access (mdb),檔案頭:5374616E64617264204A WordPerfect (wpd),檔案頭:FF575043 Postscript (eps.or.ps),檔案頭:252150532D41646F6265 Adobe Acrobat (pdf),檔案頭:255044462D312E Quicken (qdf),檔案頭:AC9EBD8F Windows Password (pwl),檔案頭:E3828596 RAR Archive (rar),檔案頭:52617221 Wave (wav),檔案頭:57415645 AVI (avi),檔案頭:41564920 Real Audio (ram),檔案頭:2E7261FD Real Media (rm),檔案頭:2E524D46 MPEG (mpg),檔案頭:000001BA MPEG (mpg),檔案頭:000001B3 Quicktime (mov),檔案頭:6D6F6F76 Windows Media (asf),檔案頭:3026B2758E66CF11 MIDI (mid),檔案頭:4D546864