ArmorLib
ArmorLib copied to clipboard
Add more filetypes to preprocessor
Expected behavior: preprocessor has more filetypes Observed behavior: preprocessor only has a few filetypes Environment: n/a Screenshots or stacktraces: (insert below) We currently have the following filetypes detected (magic number => type string):
"00 00 01 00" => "ico",
"42 5A 68" => "bz2",
"47 49 46 38 37 61" => "gif", // GIF87a
"47 49 46 38 39 61" => "gif", // GIF89a
"49 49 2A 00" => "tiff", // little endian
"4D 4D 00 2A" => "tiff", // big endian
"FF D8 FF" => "jpg", // this is not technically the spec
"4D 5A" => "exe",
"50 4B 03 04" => "zip",
"50 4B 05 06" => "zip",
"50 4B 07 08" => "zip",
"52 61 72 21 1A 07 00" => "rar",
"52 61 72 21 1A 07 01 00" => "rar",
"7F 45 4C 46" => "ELF",
"89 50 4E 47 0D 0A 1A 0A" => "png",
"CA FE BA BE" => "class",
"FE ED FA CE" => "MACH-O",
"FE ED FA CF" => "MACH-O",
"CE FA ED FE" => "MACH-O",
"CF FA ED FE" => "MACH-O",
"25 50 44 46" => "pdf",
"24 53 44 49 30 30 30 31" => "sdi",
"4F 67 67 53" => "ogg",
"38 42 50 53" => "psd",
"52 49 46 46 ?? ?? ?? ?? 57 41 56 45" => "wav",
"52 49 46 46 ?? ?? ?? ?? 41 56 49 20" => "avi",
"FF FB" => "mp3",
"49 44 33" => "mp3",
"42 4D" => "bmp",
"43 44 30 30 31" => "iso",
"4D 54 68 64" => "mid",
"D0 CF 11 E0 A1 B1 1A E1" => "doc",
"43 72 32 34" => "crx",
"78 01 73 0D 62 62 60" => "dmg",
"50 4D 4F 43 43 4D 4F 43" => "dat",
"75 73 74 61 72 00 30 30" => "tar",
"75 73 74 61 72 20 20 00" => "tar",
"37 7A BC AF 27 1C" => "7z",
"1F 8B" => "gz",
"FD 37 7A 58 5A 00 00" => "xz",
"04 22 4D 18" => "lz4",
"77 4F 46 46" => "woff",
"77 4F 46 32" => "woff2",
"3C 3F 78 6D 6C 20" => "xml",
"21 3C 61 72 63 68 3E" => "deb",
"27 05 19 56" => "uboot",
"7B 5C 72 74 66 31" => "rtf",
We should have more. Other notes: see List of file signatures for more magic numbers.