polyfile-weave 0.5.5__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of polyfile-weave might be problematic. Click here for more details.

Files changed (585) hide show
  1. polyfile/__init__.py +15 -0
  2. polyfile/__main__.py +394 -0
  3. polyfile/arithmetic.py +27 -0
  4. polyfile/ast.py +114 -0
  5. polyfile/debugger.py +1039 -0
  6. polyfile/expressions.py +346 -0
  7. polyfile/fileutils.py +343 -0
  8. polyfile/html.py +135 -0
  9. polyfile/http/__init__.py +1 -0
  10. polyfile/http/defacto.py +37 -0
  11. polyfile/http/deprecated.py +51 -0
  12. polyfile/http/experimental.py +67 -0
  13. polyfile/http/http_11.py +548 -0
  14. polyfile/http/matcher.py +37 -0
  15. polyfile/http/structured_headers.py +48 -0
  16. polyfile/iterators.py +72 -0
  17. polyfile/jpeg.py +24 -0
  18. polyfile/kaitai/__init__.py +0 -0
  19. polyfile/kaitai/compiler.py +156 -0
  20. polyfile/kaitai/parser.py +312 -0
  21. polyfile/kaitai/parsers/__init__.py +0 -0
  22. polyfile/kaitai/parsers/aix_utmp.py +116 -0
  23. polyfile/kaitai/parsers/allegro_dat.py +367 -0
  24. polyfile/kaitai/parsers/andes_firmware.py +64 -0
  25. polyfile/kaitai/parsers/android_bootldr_asus.py +105 -0
  26. polyfile/kaitai/parsers/android_bootldr_huawei.py +181 -0
  27. polyfile/kaitai/parsers/android_bootldr_qcom.py +217 -0
  28. polyfile/kaitai/parsers/android_dto.py +138 -0
  29. polyfile/kaitai/parsers/android_img.py +319 -0
  30. polyfile/kaitai/parsers/android_nanoapp_header.py +83 -0
  31. polyfile/kaitai/parsers/android_opengl_shaders_cache.py +151 -0
  32. polyfile/kaitai/parsers/android_sparse.py +237 -0
  33. polyfile/kaitai/parsers/android_super.py +401 -0
  34. polyfile/kaitai/parsers/apm_partition_table.py +196 -0
  35. polyfile/kaitai/parsers/apple_single_double.py +180 -0
  36. polyfile/kaitai/parsers/asn1_der.py +235 -0
  37. polyfile/kaitai/parsers/au.py +138 -0
  38. polyfile/kaitai/parsers/avantes_roh60.py +112 -0
  39. polyfile/kaitai/parsers/avi.py +296 -0
  40. polyfile/kaitai/parsers/bcd.py +111 -0
  41. polyfile/kaitai/parsers/bitcoin_transaction.py +210 -0
  42. polyfile/kaitai/parsers/blender_blend.py +334 -0
  43. polyfile/kaitai/parsers/bmp.py +780 -0
  44. polyfile/kaitai/parsers/bson.py +411 -0
  45. polyfile/kaitai/parsers/btrfs_stream.py +318 -0
  46. polyfile/kaitai/parsers/bytes_with_io.py +27 -0
  47. polyfile/kaitai/parsers/chrome_pak.py +194 -0
  48. polyfile/kaitai/parsers/code_6502.py +456 -0
  49. polyfile/kaitai/parsers/compressed_resource.py +217 -0
  50. polyfile/kaitai/parsers/cpio_old_le.py +154 -0
  51. polyfile/kaitai/parsers/cramfs.py +344 -0
  52. polyfile/kaitai/parsers/creative_voice_file.py +342 -0
  53. polyfile/kaitai/parsers/dbf.py +274 -0
  54. polyfile/kaitai/parsers/dcmp_0.py +664 -0
  55. polyfile/kaitai/parsers/dcmp_1.py +422 -0
  56. polyfile/kaitai/parsers/dcmp_2.py +312 -0
  57. polyfile/kaitai/parsers/dcmp_variable_length_integer.py +66 -0
  58. polyfile/kaitai/parsers/dex.py +1086 -0
  59. polyfile/kaitai/parsers/dicom.py +4370 -0
  60. polyfile/kaitai/parsers/dime_message.py +201 -0
  61. polyfile/kaitai/parsers/dns_packet.py +569 -0
  62. polyfile/kaitai/parsers/doom_wad.py +654 -0
  63. polyfile/kaitai/parsers/dos_datetime.py +191 -0
  64. polyfile/kaitai/parsers/dos_mz.py +172 -0
  65. polyfile/kaitai/parsers/ds_store.py +513 -0
  66. polyfile/kaitai/parsers/dtb.py +310 -0
  67. polyfile/kaitai/parsers/dune_2_pak.py +126 -0
  68. polyfile/kaitai/parsers/edid.py +472 -0
  69. polyfile/kaitai/parsers/efivar_signature_list.py +331 -0
  70. polyfile/kaitai/parsers/elf.py +2482 -0
  71. polyfile/kaitai/parsers/ethernet_frame.py +114 -0
  72. polyfile/kaitai/parsers/exif.py +723 -0
  73. polyfile/kaitai/parsers/ext2.py +537 -0
  74. polyfile/kaitai/parsers/fallout2_dat.py +187 -0
  75. polyfile/kaitai/parsers/fallout_dat.py +156 -0
  76. polyfile/kaitai/parsers/fasttracker_xm_module.py +558 -0
  77. polyfile/kaitai/parsers/ftl_dat.py +90 -0
  78. polyfile/kaitai/parsers/genmidi_op2.py +161 -0
  79. polyfile/kaitai/parsers/gettext_mo.py +541 -0
  80. polyfile/kaitai/parsers/gif.py +492 -0
  81. polyfile/kaitai/parsers/gimp_brush.py +244 -0
  82. polyfile/kaitai/parsers/glibc_utmp.py +114 -0
  83. polyfile/kaitai/parsers/gltf_binary.py +132 -0
  84. polyfile/kaitai/parsers/google_protobuf.py +151 -0
  85. polyfile/kaitai/parsers/gpt_partition_table.py +175 -0
  86. polyfile/kaitai/parsers/gran_turismo_vol.py +140 -0
  87. polyfile/kaitai/parsers/grub2_font.py +337 -0
  88. polyfile/kaitai/parsers/gzip.py +232 -0
  89. polyfile/kaitai/parsers/hashcat_restore.py +60 -0
  90. polyfile/kaitai/parsers/hccap.py +111 -0
  91. polyfile/kaitai/parsers/hccapx.py +103 -0
  92. polyfile/kaitai/parsers/heaps_pak.py +177 -0
  93. polyfile/kaitai/parsers/heroes_of_might_and_magic_agg.py +116 -0
  94. polyfile/kaitai/parsers/heroes_of_might_and_magic_bmp.py +34 -0
  95. polyfile/kaitai/parsers/icmp_packet.py +136 -0
  96. polyfile/kaitai/parsers/ico.py +129 -0
  97. polyfile/kaitai/parsers/id3v1_1.py +220 -0
  98. polyfile/kaitai/parsers/id3v2_3.py +324 -0
  99. polyfile/kaitai/parsers/id3v2_4.py +423 -0
  100. polyfile/kaitai/parsers/ines.py +282 -0
  101. polyfile/kaitai/parsers/ipv4_packet.py +158 -0
  102. polyfile/kaitai/parsers/ipv6_packet.py +55 -0
  103. polyfile/kaitai/parsers/iso9660.py +544 -0
  104. polyfile/kaitai/parsers/java_class.py +1113 -0
  105. polyfile/kaitai/parsers/jpeg.py +361 -0
  106. polyfile/kaitai/parsers/luks.py +149 -0
  107. polyfile/kaitai/parsers/lzh.py +165 -0
  108. polyfile/kaitai/parsers/mac_os_resource_snd.py +493 -0
  109. polyfile/kaitai/parsers/mach_o.py +3033 -0
  110. polyfile/kaitai/parsers/mach_o_fat.py +92 -0
  111. polyfile/kaitai/parsers/magicavoxel_vox.py +391 -0
  112. polyfile/kaitai/parsers/manifest.json +1 -0
  113. polyfile/kaitai/parsers/mbr_partition_table.py +119 -0
  114. polyfile/kaitai/parsers/mcap.py +1015 -0
  115. polyfile/kaitai/parsers/microsoft_cfb.py +293 -0
  116. polyfile/kaitai/parsers/microsoft_network_monitor_v2.py +309 -0
  117. polyfile/kaitai/parsers/microsoft_pe.py +765 -0
  118. polyfile/kaitai/parsers/mifare_classic.py +706 -0
  119. polyfile/kaitai/parsers/minecraft_nbt.py +449 -0
  120. polyfile/kaitai/parsers/monomakh_sapr_chg.py +69 -0
  121. polyfile/kaitai/parsers/mozilla_mar.py +239 -0
  122. polyfile/kaitai/parsers/mp4.py +333 -0
  123. polyfile/kaitai/parsers/msgpack.py +467 -0
  124. polyfile/kaitai/parsers/nitf.py +1189 -0
  125. polyfile/kaitai/parsers/nt_mdt_pal.py +155 -0
  126. polyfile/kaitai/parsers/ogg.py +118 -0
  127. polyfile/kaitai/parsers/openpgp_message.py +993 -0
  128. polyfile/kaitai/parsers/packet_ppi.py +515 -0
  129. polyfile/kaitai/parsers/pcap.py +344 -0
  130. polyfile/kaitai/parsers/pcf_font.py +506 -0
  131. polyfile/kaitai/parsers/pcx.py +195 -0
  132. polyfile/kaitai/parsers/pcx_dcx.py +79 -0
  133. polyfile/kaitai/parsers/phar_without_stub.py +399 -0
  134. polyfile/kaitai/parsers/php_serialized_value.py +505 -0
  135. polyfile/kaitai/parsers/png.py +721 -0
  136. polyfile/kaitai/parsers/protocol_body.py +260 -0
  137. polyfile/kaitai/parsers/psx_tim.py +104 -0
  138. polyfile/kaitai/parsers/python_pickle.py +718 -0
  139. polyfile/kaitai/parsers/python_pyc_27.py +510 -0
  140. polyfile/kaitai/parsers/quake_mdl.py +441 -0
  141. polyfile/kaitai/parsers/quake_pak.py +112 -0
  142. polyfile/kaitai/parsers/quicktime_mov.py +634 -0
  143. polyfile/kaitai/parsers/rar.py +265 -0
  144. polyfile/kaitai/parsers/regf.py +569 -0
  145. polyfile/kaitai/parsers/renderware_binary_stream.py +877 -0
  146. polyfile/kaitai/parsers/resource_fork.py +611 -0
  147. polyfile/kaitai/parsers/respack.py +57 -0
  148. polyfile/kaitai/parsers/riff.py +409 -0
  149. polyfile/kaitai/parsers/rpm.py +964 -0
  150. polyfile/kaitai/parsers/rtcp_payload.py +579 -0
  151. polyfile/kaitai/parsers/rtp_packet.py +150 -0
  152. polyfile/kaitai/parsers/rtpdump.py +115 -0
  153. polyfile/kaitai/parsers/ruby_marshal.py +423 -0
  154. polyfile/kaitai/parsers/s3m.py +493 -0
  155. polyfile/kaitai/parsers/saints_row_2_vpp_pc.py +254 -0
  156. polyfile/kaitai/parsers/shapefile_index.py +174 -0
  157. polyfile/kaitai/parsers/shapefile_main.py +893 -0
  158. polyfile/kaitai/parsers/some_ip.py +209 -0
  159. polyfile/kaitai/parsers/some_ip_container.py +37 -0
  160. polyfile/kaitai/parsers/some_ip_sd.py +86 -0
  161. polyfile/kaitai/parsers/some_ip_sd_entries.py +160 -0
  162. polyfile/kaitai/parsers/some_ip_sd_options.py +374 -0
  163. polyfile/kaitai/parsers/specpr.py +404 -0
  164. polyfile/kaitai/parsers/sqlite3.py +472 -0
  165. polyfile/kaitai/parsers/ssh_public_key.py +252 -0
  166. polyfile/kaitai/parsers/standard_midi_file.py +390 -0
  167. polyfile/kaitai/parsers/stl.py +111 -0
  168. polyfile/kaitai/parsers/sudoers_ts.py +201 -0
  169. polyfile/kaitai/parsers/swf.py +406 -0
  170. polyfile/kaitai/parsers/systemd_journal.py +361 -0
  171. polyfile/kaitai/parsers/tcp_segment.py +57 -0
  172. polyfile/kaitai/parsers/tga.py +213 -0
  173. polyfile/kaitai/parsers/tls_client_hello.py +293 -0
  174. polyfile/kaitai/parsers/tr_dos_image.py +322 -0
  175. polyfile/kaitai/parsers/tsm.py +198 -0
  176. polyfile/kaitai/parsers/ttf.py +1847 -0
  177. polyfile/kaitai/parsers/udp_datagram.py +42 -0
  178. polyfile/kaitai/parsers/uefi_te.py +236 -0
  179. polyfile/kaitai/parsers/uimage.py +198 -0
  180. polyfile/kaitai/parsers/utf8_string.py +137 -0
  181. polyfile/kaitai/parsers/vfat.py +410 -0
  182. polyfile/kaitai/parsers/vlq_base128_be.py +104 -0
  183. polyfile/kaitai/parsers/vlq_base128_le.py +129 -0
  184. polyfile/kaitai/parsers/vmware_vmdk.py +167 -0
  185. polyfile/kaitai/parsers/vp8_ivf.py +112 -0
  186. polyfile/kaitai/parsers/warcraft_2_pud.py +423 -0
  187. polyfile/kaitai/parsers/wav.py +1014 -0
  188. polyfile/kaitai/parsers/websocket.py +167 -0
  189. polyfile/kaitai/parsers/windows_evt_log.py +304 -0
  190. polyfile/kaitai/parsers/windows_lnk_file.py +467 -0
  191. polyfile/kaitai/parsers/windows_minidump.py +575 -0
  192. polyfile/kaitai/parsers/windows_resource_file.py +243 -0
  193. polyfile/kaitai/parsers/windows_shell_items.py +190 -0
  194. polyfile/kaitai/parsers/windows_systemtime.py +52 -0
  195. polyfile/kaitai/parsers/wmf.py +502 -0
  196. polyfile/kaitai/parsers/xar.py +181 -0
  197. polyfile/kaitai/parsers/xwd.py +189 -0
  198. polyfile/kaitai/parsers/zip.py +685 -0
  199. polyfile/kaitai/parsers/zisofs.py +158 -0
  200. polyfile/kaitai/parsers/zx_spectrum_tap.py +184 -0
  201. polyfile/kaitaimatcher.py +113 -0
  202. polyfile/languagematcher.py +217 -0
  203. polyfile/logger.py +135 -0
  204. polyfile/magic.py +2983 -0
  205. polyfile/magic_defs/COPYING +29 -0
  206. polyfile/magic_defs/__init__.py +0 -0
  207. polyfile/magic_defs/acorn +102 -0
  208. polyfile/magic_defs/adi +13 -0
  209. polyfile/magic_defs/adventure +122 -0
  210. polyfile/magic_defs/aes +29 -0
  211. polyfile/magic_defs/algol68 +35 -0
  212. polyfile/magic_defs/allegro +9 -0
  213. polyfile/magic_defs/alliant +18 -0
  214. polyfile/magic_defs/alpha +32 -0
  215. polyfile/magic_defs/amanda +12 -0
  216. polyfile/magic_defs/amigaos +218 -0
  217. polyfile/magic_defs/android +259 -0
  218. polyfile/magic_defs/animation +1197 -0
  219. polyfile/magic_defs/aout +46 -0
  220. polyfile/magic_defs/apache +28 -0
  221. polyfile/magic_defs/apl +7 -0
  222. polyfile/magic_defs/apple +773 -0
  223. polyfile/magic_defs/application +7 -0
  224. polyfile/magic_defs/applix +13 -0
  225. polyfile/magic_defs/apt +52 -0
  226. polyfile/magic_defs/archive +2586 -0
  227. polyfile/magic_defs/aria +38 -0
  228. polyfile/magic_defs/arm +50 -0
  229. polyfile/magic_defs/asf +132 -0
  230. polyfile/magic_defs/assembler +18 -0
  231. polyfile/magic_defs/asterix +18 -0
  232. polyfile/magic_defs/att3b +41 -0
  233. polyfile/magic_defs/audio +1291 -0
  234. polyfile/magic_defs/avm +33 -0
  235. polyfile/magic_defs/basis +18 -0
  236. polyfile/magic_defs/beetle +7 -0
  237. polyfile/magic_defs/ber +65 -0
  238. polyfile/magic_defs/bflt +14 -0
  239. polyfile/magic_defs/bhl +10 -0
  240. polyfile/magic_defs/bioinformatics +178 -0
  241. polyfile/magic_defs/biosig +154 -0
  242. polyfile/magic_defs/blackberry +8 -0
  243. polyfile/magic_defs/blcr +25 -0
  244. polyfile/magic_defs/blender +50 -0
  245. polyfile/magic_defs/blit +24 -0
  246. polyfile/magic_defs/bm +10 -0
  247. polyfile/magic_defs/bout +11 -0
  248. polyfile/magic_defs/bsdi +33 -0
  249. polyfile/magic_defs/bsi +10 -0
  250. polyfile/magic_defs/btsnoop +13 -0
  251. polyfile/magic_defs/burp +7 -0
  252. polyfile/magic_defs/bytecode +41 -0
  253. polyfile/magic_defs/c-lang +110 -0
  254. polyfile/magic_defs/c64 +531 -0
  255. polyfile/magic_defs/cad +437 -0
  256. polyfile/magic_defs/cafebabe +107 -0
  257. polyfile/magic_defs/cbor +21 -0
  258. polyfile/magic_defs/ccf +14 -0
  259. polyfile/magic_defs/cddb +12 -0
  260. polyfile/magic_defs/chord +15 -0
  261. polyfile/magic_defs/cisco +12 -0
  262. polyfile/magic_defs/citrus +12 -0
  263. polyfile/magic_defs/clarion +27 -0
  264. polyfile/magic_defs/claris +48 -0
  265. polyfile/magic_defs/clipper +65 -0
  266. polyfile/magic_defs/clojure +30 -0
  267. polyfile/magic_defs/coff +98 -0
  268. polyfile/magic_defs/commands +201 -0
  269. polyfile/magic_defs/communications +22 -0
  270. polyfile/magic_defs/compress +461 -0
  271. polyfile/magic_defs/console +1213 -0
  272. polyfile/magic_defs/convex +69 -0
  273. polyfile/magic_defs/coverage +91 -0
  274. polyfile/magic_defs/cracklib +14 -0
  275. polyfile/magic_defs/crypto +31 -0
  276. polyfile/magic_defs/csv +8 -0
  277. polyfile/magic_defs/ctags +6 -0
  278. polyfile/magic_defs/ctf +23 -0
  279. polyfile/magic_defs/cubemap +8 -0
  280. polyfile/magic_defs/cups +56 -0
  281. polyfile/magic_defs/dact +11 -0
  282. polyfile/magic_defs/database +886 -0
  283. polyfile/magic_defs/dataone +47 -0
  284. polyfile/magic_defs/dbpf +15 -0
  285. polyfile/magic_defs/der +146 -0
  286. polyfile/magic_defs/diamond +12 -0
  287. polyfile/magic_defs/dif +33 -0
  288. polyfile/magic_defs/diff +41 -0
  289. polyfile/magic_defs/digital +59 -0
  290. polyfile/magic_defs/dolby +69 -0
  291. polyfile/magic_defs/dsf +25 -0
  292. polyfile/magic_defs/dump +96 -0
  293. polyfile/magic_defs/dwarfs +45 -0
  294. polyfile/magic_defs/dyadic +61 -0
  295. polyfile/magic_defs/ebml +8 -0
  296. polyfile/magic_defs/edid +11 -0
  297. polyfile/magic_defs/editors +43 -0
  298. polyfile/magic_defs/efi +15 -0
  299. polyfile/magic_defs/elf +379 -0
  300. polyfile/magic_defs/encore +22 -0
  301. polyfile/magic_defs/epoc +62 -0
  302. polyfile/magic_defs/erlang +21 -0
  303. polyfile/magic_defs/espressif +57 -0
  304. polyfile/magic_defs/esri +28 -0
  305. polyfile/magic_defs/etf +33 -0
  306. polyfile/magic_defs/fcs +9 -0
  307. polyfile/magic_defs/filesystems +2694 -0
  308. polyfile/magic_defs/finger +16 -0
  309. polyfile/magic_defs/firmware +133 -0
  310. polyfile/magic_defs/flash +62 -0
  311. polyfile/magic_defs/flif +36 -0
  312. polyfile/magic_defs/fonts +449 -0
  313. polyfile/magic_defs/forth +82 -0
  314. polyfile/magic_defs/fortran +9 -0
  315. polyfile/magic_defs/frame +62 -0
  316. polyfile/magic_defs/freebsd +164 -0
  317. polyfile/magic_defs/fsav +128 -0
  318. polyfile/magic_defs/fusecompress +12 -0
  319. polyfile/magic_defs/games +696 -0
  320. polyfile/magic_defs/gcc +17 -0
  321. polyfile/magic_defs/gconv +10 -0
  322. polyfile/magic_defs/gentoo +85 -0
  323. polyfile/magic_defs/geo +166 -0
  324. polyfile/magic_defs/geos +20 -0
  325. polyfile/magic_defs/gimp +77 -0
  326. polyfile/magic_defs/git +13 -0
  327. polyfile/magic_defs/glibc +21 -0
  328. polyfile/magic_defs/gnome +59 -0
  329. polyfile/magic_defs/gnu +173 -0
  330. polyfile/magic_defs/gnumeric +8 -0
  331. polyfile/magic_defs/gpt +240 -0
  332. polyfile/magic_defs/gpu +28 -0
  333. polyfile/magic_defs/grace +21 -0
  334. polyfile/magic_defs/graphviz +12 -0
  335. polyfile/magic_defs/gringotts +48 -0
  336. polyfile/magic_defs/guile +13 -0
  337. polyfile/magic_defs/hardware +12 -0
  338. polyfile/magic_defs/hitachi-sh +30 -0
  339. polyfile/magic_defs/hp +433 -0
  340. polyfile/magic_defs/human68k +26 -0
  341. polyfile/magic_defs/ibm370 +52 -0
  342. polyfile/magic_defs/ibm6000 +35 -0
  343. polyfile/magic_defs/icc +214 -0
  344. polyfile/magic_defs/iff +80 -0
  345. polyfile/magic_defs/images +4210 -0
  346. polyfile/magic_defs/inform +9 -0
  347. polyfile/magic_defs/intel +310 -0
  348. polyfile/magic_defs/interleaf +9 -0
  349. polyfile/magic_defs/island +10 -0
  350. polyfile/magic_defs/ispell +63 -0
  351. polyfile/magic_defs/isz +15 -0
  352. polyfile/magic_defs/java +52 -0
  353. polyfile/magic_defs/javascript +171 -0
  354. polyfile/magic_defs/jpeg +252 -0
  355. polyfile/magic_defs/json +8 -0
  356. polyfile/magic_defs/karma +9 -0
  357. polyfile/magic_defs/kde +11 -0
  358. polyfile/magic_defs/keepass +20 -0
  359. polyfile/magic_defs/kerberos +45 -0
  360. polyfile/magic_defs/kicad +85 -0
  361. polyfile/magic_defs/kml +34 -0
  362. polyfile/magic_defs/lammps +64 -0
  363. polyfile/magic_defs/lecter +6 -0
  364. polyfile/magic_defs/lex +12 -0
  365. polyfile/magic_defs/lif +50 -0
  366. polyfile/magic_defs/linux +557 -0
  367. polyfile/magic_defs/lisp +78 -0
  368. polyfile/magic_defs/llvm +22 -0
  369. polyfile/magic_defs/locoscript +12 -0
  370. polyfile/magic_defs/lua +31 -0
  371. polyfile/magic_defs/luks +126 -0
  372. polyfile/magic_defs/m4 +11 -0
  373. polyfile/magic_defs/mach +303 -0
  374. polyfile/magic_defs/macintosh +505 -0
  375. polyfile/magic_defs/macos +7 -0
  376. polyfile/magic_defs/magic +10 -0
  377. polyfile/magic_defs/magic.mgc +0 -0
  378. polyfile/magic_defs/mail.news +132 -0
  379. polyfile/magic_defs/make +21 -0
  380. polyfile/magic_defs/map +413 -0
  381. polyfile/magic_defs/maple +109 -0
  382. polyfile/magic_defs/marc21 +30 -0
  383. polyfile/magic_defs/mathcad +8 -0
  384. polyfile/magic_defs/mathematica +188 -0
  385. polyfile/magic_defs/matroska +17 -0
  386. polyfile/magic_defs/mcrypt +52 -0
  387. polyfile/magic_defs/measure +44 -0
  388. polyfile/magic_defs/mercurial +13 -0
  389. polyfile/magic_defs/metastore +8 -0
  390. polyfile/magic_defs/meteorological +53 -0
  391. polyfile/magic_defs/microfocus +21 -0
  392. polyfile/magic_defs/mime +9 -0
  393. polyfile/magic_defs/mips +120 -0
  394. polyfile/magic_defs/mirage +8 -0
  395. polyfile/magic_defs/misctools +140 -0
  396. polyfile/magic_defs/mkid +11 -0
  397. polyfile/magic_defs/mlssa +8 -0
  398. polyfile/magic_defs/mmdf +6 -0
  399. polyfile/magic_defs/modem +92 -0
  400. polyfile/magic_defs/modulefile +9 -0
  401. polyfile/magic_defs/motorola +71 -0
  402. polyfile/magic_defs/mozilla +37 -0
  403. polyfile/magic_defs/msdos +2304 -0
  404. polyfile/magic_defs/msooxml +68 -0
  405. polyfile/magic_defs/msvc +222 -0
  406. polyfile/magic_defs/msx +309 -0
  407. polyfile/magic_defs/mup +24 -0
  408. polyfile/magic_defs/music +17 -0
  409. polyfile/magic_defs/nasa +7 -0
  410. polyfile/magic_defs/natinst +24 -0
  411. polyfile/magic_defs/ncr +49 -0
  412. polyfile/magic_defs/neko +12 -0
  413. polyfile/magic_defs/netbsd +251 -0
  414. polyfile/magic_defs/netscape +26 -0
  415. polyfile/magic_defs/netware +11 -0
  416. polyfile/magic_defs/news +13 -0
  417. polyfile/magic_defs/nifty +202 -0
  418. polyfile/magic_defs/nim-lang +29 -0
  419. polyfile/magic_defs/nitpicker +14 -0
  420. polyfile/magic_defs/numpy +9 -0
  421. polyfile/magic_defs/oasis +12 -0
  422. polyfile/magic_defs/ocaml +14 -0
  423. polyfile/magic_defs/octave +6 -0
  424. polyfile/magic_defs/ole2compounddocs +760 -0
  425. polyfile/magic_defs/olf +98 -0
  426. polyfile/magic_defs/openfst +17 -0
  427. polyfile/magic_defs/opentimestamps +16 -0
  428. polyfile/magic_defs/oric +16 -0
  429. polyfile/magic_defs/os2 +186 -0
  430. polyfile/magic_defs/os400 +39 -0
  431. polyfile/magic_defs/os9 +80 -0
  432. polyfile/magic_defs/osf1 +10 -0
  433. polyfile/magic_defs/palm +156 -0
  434. polyfile/magic_defs/parix +13 -0
  435. polyfile/magic_defs/parrot +22 -0
  436. polyfile/magic_defs/pascal +39 -0
  437. polyfile/magic_defs/pbf +11 -0
  438. polyfile/magic_defs/pbm +8 -0
  439. polyfile/magic_defs/pc88 +24 -0
  440. polyfile/magic_defs/pc98 +77 -0
  441. polyfile/magic_defs/pci_ids +116 -0
  442. polyfile/magic_defs/pcjr +8 -0
  443. polyfile/magic_defs/pdf +51 -0
  444. polyfile/magic_defs/pdp +42 -0
  445. polyfile/magic_defs/perl +100 -0
  446. polyfile/magic_defs/pgf +52 -0
  447. polyfile/magic_defs/pgp +581 -0
  448. polyfile/magic_defs/pgp-binary-keys +388 -0
  449. polyfile/magic_defs/pkgadd +7 -0
  450. polyfile/magic_defs/plan9 +25 -0
  451. polyfile/magic_defs/playdate +57 -0
  452. polyfile/magic_defs/plus5 +18 -0
  453. polyfile/magic_defs/pmem +46 -0
  454. polyfile/magic_defs/polyfile_zip +5 -0
  455. polyfile/magic_defs/polyml +23 -0
  456. polyfile/magic_defs/printer +269 -0
  457. polyfile/magic_defs/project +10 -0
  458. polyfile/magic_defs/psdbms +14 -0
  459. polyfile/magic_defs/psl +14 -0
  460. polyfile/magic_defs/pulsar +13 -0
  461. polyfile/magic_defs/puzzle +17 -0
  462. polyfile/magic_defs/pwsafe +14 -0
  463. polyfile/magic_defs/pyramid +12 -0
  464. polyfile/magic_defs/python +305 -0
  465. polyfile/magic_defs/qt +30 -0
  466. polyfile/magic_defs/revision +66 -0
  467. polyfile/magic_defs/riff +840 -0
  468. polyfile/magic_defs/rinex +44 -0
  469. polyfile/magic_defs/ringdove +45 -0
  470. polyfile/magic_defs/rpi +52 -0
  471. polyfile/magic_defs/rpm +45 -0
  472. polyfile/magic_defs/rpmsg +7 -0
  473. polyfile/magic_defs/rst +11 -0
  474. polyfile/magic_defs/rtf +94 -0
  475. polyfile/magic_defs/ruby +55 -0
  476. polyfile/magic_defs/rust +21 -0
  477. polyfile/magic_defs/sc +7 -0
  478. polyfile/magic_defs/sccs +24 -0
  479. polyfile/magic_defs/scientific +144 -0
  480. polyfile/magic_defs/securitycerts +6 -0
  481. polyfile/magic_defs/selinux +24 -0
  482. polyfile/magic_defs/sendmail +37 -0
  483. polyfile/magic_defs/sequent +42 -0
  484. polyfile/magic_defs/sereal +35 -0
  485. polyfile/magic_defs/sgi +144 -0
  486. polyfile/magic_defs/sgml +161 -0
  487. polyfile/magic_defs/sharc +23 -0
  488. polyfile/magic_defs/sinclair +40 -0
  489. polyfile/magic_defs/sisu +18 -0
  490. polyfile/magic_defs/sketch +6 -0
  491. polyfile/magic_defs/smalltalk +25 -0
  492. polyfile/magic_defs/smile +34 -0
  493. polyfile/magic_defs/sniffer +482 -0
  494. polyfile/magic_defs/softquad +40 -0
  495. polyfile/magic_defs/sosi +40 -0
  496. polyfile/magic_defs/spec +21 -0
  497. polyfile/magic_defs/spectrum +184 -0
  498. polyfile/magic_defs/sql +288 -0
  499. polyfile/magic_defs/ssh +39 -0
  500. polyfile/magic_defs/ssl +20 -0
  501. polyfile/magic_defs/statistics +45 -0
  502. polyfile/magic_defs/subtitle +38 -0
  503. polyfile/magic_defs/sun +141 -0
  504. polyfile/magic_defs/svf +5 -0
  505. polyfile/magic_defs/sylk +36 -0
  506. polyfile/magic_defs/symbos +42 -0
  507. polyfile/magic_defs/sysex +429 -0
  508. polyfile/magic_defs/tcl +29 -0
  509. polyfile/magic_defs/teapot +6 -0
  510. polyfile/magic_defs/terminfo +63 -0
  511. polyfile/magic_defs/tex +141 -0
  512. polyfile/magic_defs/tgif +7 -0
  513. polyfile/magic_defs/ti-8x +239 -0
  514. polyfile/magic_defs/timezone +42 -0
  515. polyfile/magic_defs/tplink +95 -0
  516. polyfile/magic_defs/troff +38 -0
  517. polyfile/magic_defs/tuxedo +8 -0
  518. polyfile/magic_defs/typeset +8 -0
  519. polyfile/magic_defs/uf2 +72 -0
  520. polyfile/magic_defs/unicode +15 -0
  521. polyfile/magic_defs/unisig +12 -0
  522. polyfile/magic_defs/unknown +34 -0
  523. polyfile/magic_defs/usd +21 -0
  524. polyfile/magic_defs/uterus +16 -0
  525. polyfile/magic_defs/uuencode +28 -0
  526. polyfile/magic_defs/vacuum-cleaner +54 -0
  527. polyfile/magic_defs/varied.out +46 -0
  528. polyfile/magic_defs/varied.script +21 -0
  529. polyfile/magic_defs/vax +32 -0
  530. polyfile/magic_defs/vicar +17 -0
  531. polyfile/magic_defs/virtual +307 -0
  532. polyfile/magic_defs/virtutech +12 -0
  533. polyfile/magic_defs/visx +32 -0
  534. polyfile/magic_defs/vms +30 -0
  535. polyfile/magic_defs/vmware +6 -0
  536. polyfile/magic_defs/vorbis +155 -0
  537. polyfile/magic_defs/vxl +14 -0
  538. polyfile/magic_defs/warc +16 -0
  539. polyfile/magic_defs/weak +16 -0
  540. polyfile/magic_defs/web +18 -0
  541. polyfile/magic_defs/webassembly +17 -0
  542. polyfile/magic_defs/windows +1811 -0
  543. polyfile/magic_defs/wireless +7 -0
  544. polyfile/magic_defs/wordprocessors +630 -0
  545. polyfile/magic_defs/wsdl +23 -0
  546. polyfile/magic_defs/x68000 +25 -0
  547. polyfile/magic_defs/xdelta +13 -0
  548. polyfile/magic_defs/xenix +106 -0
  549. polyfile/magic_defs/xilinx +58 -0
  550. polyfile/magic_defs/xo65 +37 -0
  551. polyfile/magic_defs/xwindows +43 -0
  552. polyfile/magic_defs/yara +17 -0
  553. polyfile/magic_defs/zfs +96 -0
  554. polyfile/magic_defs/zilog +12 -0
  555. polyfile/magic_defs/zip +126 -0
  556. polyfile/magic_defs/zyxel +17 -0
  557. polyfile/nes.py +144 -0
  558. polyfile/nitf.py +15 -0
  559. polyfile/pdf.py +1264 -0
  560. polyfile/pickles.py +45 -0
  561. polyfile/polyfile.py +409 -0
  562. polyfile/profiling.py +115 -0
  563. polyfile/repl.py +624 -0
  564. polyfile/search.py +310 -0
  565. polyfile/serialization.py +323 -0
  566. polyfile/structmatcher.py +46 -0
  567. polyfile/structs.py +281 -0
  568. polyfile/templates/download.js +162 -0
  569. polyfile/templates/hexdump.css +268 -0
  570. polyfile/templates/hexdump.js +756 -0
  571. polyfile/templates/jquery-3.4.1.min.js +2 -0
  572. polyfile/templates/template.html +119 -0
  573. polyfile/wildcards.py +62 -0
  574. polyfile/zipmatcher.py +183 -0
  575. polyfile_weave-0.5.5.dist-info/METADATA +173 -0
  576. polyfile_weave-0.5.5.dist-info/RECORD +585 -0
  577. polyfile_weave-0.5.5.dist-info/WHEEL +5 -0
  578. polyfile_weave-0.5.5.dist-info/entry_points.txt +2 -0
  579. polyfile_weave-0.5.5.dist-info/licenses/LICENSE +202 -0
  580. polyfile_weave-0.5.5.dist-info/top_level.txt +2 -0
  581. polymerge/__init__.py +1 -0
  582. polymerge/__main__.py +296 -0
  583. polymerge/cfg.py +127 -0
  584. polymerge/polymerge.py +227 -0
  585. polymerge/polytracker.py +190 -0
@@ -0,0 +1,557 @@
1
+
2
+ #------------------------------------------------------------------------------
3
+ # $File: linux,v 1.84 2022/11/29 23:10:29 christos Exp $
4
+ # linux: file(1) magic for Linux files
5
+ #
6
+ # Values for Linux/i386 binaries, from Daniel Quinlan <quinlan@yggdrasil.com>
7
+ # The following basic Linux magic is useful for reference, but using
8
+ # "long" magic is a better practice in order to avoid collisions.
9
+ #
10
+ # 2 leshort 100 Linux/i386
11
+ # >0 leshort 0407 impure executable (OMAGIC)
12
+ # >0 leshort 0410 pure executable (NMAGIC)
13
+ # >0 leshort 0413 demand-paged executable (ZMAGIC)
14
+ # >0 leshort 0314 demand-paged executable (QMAGIC)
15
+ #
16
+ 0 lelong 0x00640107 Linux/i386 impure executable (OMAGIC)
17
+ >16 lelong 0 \b, stripped
18
+ 0 lelong 0x00640108 Linux/i386 pure executable (NMAGIC)
19
+ >16 lelong 0 \b, stripped
20
+ 0 lelong 0x0064010b Linux/i386 demand-paged executable (ZMAGIC)
21
+ >16 lelong 0 \b, stripped
22
+ 0 lelong 0x006400cc Linux/i386 demand-paged executable (QMAGIC)
23
+ >16 lelong 0 \b, stripped
24
+ #
25
+ 0 string \007\001\000 Linux/i386 object file
26
+ >20 lelong >0x1020 \b, DLL library
27
+ # Linux-8086 stuff:
28
+ 0 string \01\03\020\04 Linux-8086 impure executable
29
+ >28 long !0 not stripped
30
+ 0 string \01\03\040\04 Linux-8086 executable
31
+ >28 long !0 not stripped
32
+ #
33
+ 0 string \243\206\001\0 Linux-8086 object file
34
+ #
35
+ 0 string \01\03\020\20 Minix-386 impure executable
36
+ >28 long !0 not stripped
37
+ 0 string \01\03\040\20 Minix-386 executable
38
+ >28 long !0 not stripped
39
+ 0 string \01\03\04\20 Minix-386 NSYM/GNU executable
40
+ >28 long !0 not stripped
41
+ # core dump file, from Bill Reynolds <bill@goshawk.lanl.gov>
42
+ 216 lelong 0421 Linux/i386 core file
43
+ !:strength / 2
44
+ >220 string >\0 of '%s'
45
+ >200 lelong >0 (signal %d)
46
+ #
47
+ # LILO boot/chain loaders, from Daniel Quinlan <quinlan@yggdrasil.com>
48
+ # this can be overridden by the DOS executable (COM) entry
49
+ 2 string LILO Linux/i386 LILO boot/chain loader
50
+ #
51
+ # Linux make config build file, from Ole Aamot <oka@oka.no>
52
+ # Updated by Ken Sharp
53
+ 28 string make\ config Linux make config build file (old)
54
+ 49 search/70 Kernel\ Configuration Linux make config build file
55
+
56
+ #
57
+ # PSF fonts, from H. Peter Anvin <hpa@yggdrasil.com>
58
+ # Updated by Adam Buchbinder <adam.buchbinder@gmail.com>
59
+ # See: https://www.win.tue.nl/~aeb/linux/kbd/font-formats-1.html
60
+ 0 leshort 0x0436 Linux/i386 PC Screen Font v1 data,
61
+ >2 byte&0x01 0 256 characters,
62
+ >2 byte&0x01 !0 512 characters,
63
+ >2 byte&0x02 0 no directory,
64
+ >2 byte&0x02 !0 Unicode directory,
65
+ >3 byte >0 8x%d
66
+ 0 string \x72\xb5\x4a\x86\x00\x00 Linux/i386 PC Screen Font v2 data,
67
+ >16 lelong x %d characters,
68
+ >12 lelong&0x01 0 no directory,
69
+ >12 lelong&0x01 !0 Unicode directory,
70
+ >28 lelong x %d
71
+ >24 lelong x \bx%d
72
+
73
+ # Linux swap and hibernate files
74
+ # Linux kernel: include/linux/swap.h
75
+ # util-linux: libblkid/src/superblocks/swap.c
76
+
77
+ # format v0, unsupported since 2002
78
+ 0xff6 string SWAP-SPACE Linux old swap file, 4k page size
79
+ 0x1ff6 string SWAP-SPACE Linux old swap file, 8k page size
80
+ 0x3ff6 string SWAP-SPACE Linux old swap file, 16k page size
81
+ 0x7ff6 string SWAP-SPACE Linux old swap file, 32k page size
82
+ 0xfff6 string SWAP-SPACE Linux old swap file, 64k page size
83
+
84
+ # format v1, supported since 1998
85
+ 0 name linux-swap
86
+ >0x400 lelong 1 little endian, version %u,
87
+ >>0x404 lelong x size %u pages,
88
+ >>0x408 lelong x %u bad pages,
89
+ >0x400 belong 1 big endian, version %u,
90
+ >>0x404 belong x size %u pages,
91
+ >>0x408 belong x %u bad pages,
92
+ >0x41c string \0 no label,
93
+ >0x41c string >\0 LABEL=%s,
94
+ >0x40c ubelong x UUID=%08x
95
+ >0x410 ubeshort x \b-%04x
96
+ >0x412 ubeshort x \b-%04x
97
+ >0x414 ubeshort x \b-%04x
98
+ >0x416 ubelong x \b-%08x
99
+ >0x41a ubeshort x \b%04x
100
+
101
+ 0xff6 string SWAPSPACE2 Linux swap file, 4k page size,
102
+ >0 use linux-swap
103
+ 0x1ff6 string SWAPSPACE2 Linux swap file, 8k page size,
104
+ >0 use linux-swap
105
+ 0x3ff6 string SWAPSPACE2 Linux swap file, 16k page size,
106
+ >0 use linux-swap
107
+ 0x7ff6 string SWAPSPACE2 Linux swap file, 32k page size,
108
+ >0 use linux-swap
109
+ 0xfff6 string SWAPSPACE2 Linux swap file, 64k page size,
110
+ >0 use linux-swap
111
+
112
+ 0 name linux-hibernate
113
+ >0 string S1SUSPEND \b, with SWSUSP1 image
114
+ >0 string S2SUSPEND \b, with SWSUSP2 image
115
+ >0 string ULSUSPEND \b, with uswsusp image
116
+ >0 string LINHIB0001 \b, with compressed hibernate image
117
+ >0 string \xed\xc3\x02\xe9\x98\x56\xe5\x0c \b, with tuxonice image
118
+ >0 default x \b, with unknown hibernate image
119
+
120
+ 0xfec string SWAPSPACE2 Linux swap file, 4k page size,
121
+ >0 use linux-swap
122
+ >0xff6 use linux-hibernate
123
+ 0x1fec string SWAPSPACE2 Linux swap file, 8k page size,
124
+ >0 use linux-swap
125
+ >0x1ff6 use linux-hibernate
126
+ 0x3fec string SWAPSPACE2 Linux swap file, 16k page size,
127
+ >0 use linux-swap
128
+ >0x3ff6 use linux-hibernate
129
+ 0x7fec string SWAPSPACE2 Linux swap file, 32k page size,
130
+ >0 use linux-swap
131
+ >0x7ff6 use linux-hibernate
132
+ 0xffec string SWAPSPACE2 Linux swap file, 64k page size,
133
+ >0 use linux-swap
134
+ >0xfff6 use linux-hibernate
135
+
136
+ #
137
+ # Linux kernel boot images, from Albert Cahalan <acahalan@cs.uml.edu>
138
+ # and others such as Axel Kohlmeyer <akohlmey@rincewind.chemie.uni-ulm.de>
139
+ # and Nicolas Lichtmaier <nick@debian.org>
140
+ # All known start with: b8 c0 07 8e d8 b8 00 90 8e c0 b9 00 01 29 f6 29
141
+ # Linux kernel boot images (i386 arch) (Wolfram Kleff)
142
+ # URL: https://www.kernel.org/doc/Documentation/x86/boot.txt
143
+ 514 string HdrS Linux kernel
144
+ !:strength + 55
145
+ # often no extension like in linux, vmlinuz, bzimage or memdisk but sometimes
146
+ # Acronis Recovery kernel64.dat and Plop Boot Manager plpbtrom.bin
147
+ # DamnSmallLinux 1.5 damnsmll.lnx
148
+ !:ext /dat/bin/lnx
149
+ >510 leshort 0xAA55 x86 boot executable
150
+ >>518 leshort >0x1ff
151
+ >>>529 byte 0 zImage,
152
+ >>>529 byte 1 bzImage,
153
+ >>>526 lelong >0
154
+ >>>>(526.s+0x200) string >\0 version %s,
155
+ >>498 leshort 1 RO-rootFS,
156
+ >>498 leshort 0 RW-rootFS,
157
+ >>508 leshort >0 root_dev %#X,
158
+ >>502 leshort >0 swap_dev %#X,
159
+ >>504 leshort >0 RAMdisksize %u KB,
160
+ >>506 leshort 0xFFFF Normal VGA
161
+ >>506 leshort 0xFFFE Extended VGA
162
+ >>506 leshort 0xFFFD Prompt for Videomode
163
+ >>506 leshort >0 Video mode %d
164
+ # This also matches new kernels, which were caught above by "HdrS".
165
+ 0 belong 0xb8c0078e Linux kernel
166
+ >0x1e3 string Loading version 1.3.79 or older
167
+ >0x1e9 string Loading from prehistoric times
168
+
169
+ # System.map files - Nicolas Lichtmaier <nick@debian.org>
170
+ 8 search/1 \ A\ _text Linux kernel symbol map text
171
+
172
+ # LSM entries - Nicolas Lichtmaier <nick@debian.org>
173
+ 0 search/1 Begin3 Linux Software Map entry text
174
+ 0 search/1 Begin4 Linux Software Map entry text (new format)
175
+
176
+ # From Matt Zimmerman, enhanced for v3 by Matthew Palmer
177
+ 0 belong 0x4f4f4f4d User-mode Linux COW file
178
+ >4 belong <3 \b, version %d
179
+ >>8 string >\0 \b, backing file %s
180
+ >4 belong >2 \b, version %d
181
+ >>32 string >\0 \b, backing file %s
182
+
183
+ ############################################################################
184
+ # Linux kernel versions
185
+
186
+ 0 string \xb8\xc0\x07\x8e\xd8\xb8\x00\x90 Linux
187
+ >497 leshort 0 x86 boot sector
188
+ >>514 belong 0x8e of a kernel from the dawn of time!
189
+ >>514 belong 0x908ed8b4 version 0.99-1.1.42
190
+ >>514 belong 0x908ed8b8 for memtest86
191
+
192
+ >497 leshort !0 x86 kernel
193
+ >>504 leshort >0 RAMdisksize=%u KB
194
+ >>502 leshort >0 swap=%#X
195
+ >>508 leshort >0 root=%#X
196
+ >>>498 leshort 1 \b-ro
197
+ >>>498 leshort 0 \b-rw
198
+ >>506 leshort 0xFFFF vga=normal
199
+ >>506 leshort 0xFFFE vga=extended
200
+ >>506 leshort 0xFFFD vga=ask
201
+ >>506 leshort >0 vga=%d
202
+ >>514 belong 0x908ed881 version 1.1.43-1.1.45
203
+ >>514 belong 0x15b281cd
204
+ >>>0xa8e belong 0x55AA5a5a version 1.1.46-1.2.13,1.3.0
205
+ >>>0xa99 belong 0x55AA5a5a version 1.3.1,2
206
+ >>>0xaa3 belong 0x55AA5a5a version 1.3.3-1.3.30
207
+ >>>0xaa6 belong 0x55AA5a5a version 1.3.31-1.3.41
208
+ >>>0xb2b belong 0x55AA5a5a version 1.3.42-1.3.45
209
+ >>>0xaf7 belong 0x55AA5a5a version 1.3.46-1.3.72
210
+ >>514 string HdrS
211
+ >>>518 leshort >0x1FF
212
+ >>>>529 byte 0 \b, zImage
213
+ >>>>529 byte 1 \b, bzImage
214
+ >>>>(526.s+0x200) string >\0 \b, version %s
215
+
216
+ # Linux boot sector thefts.
217
+ 0 belong 0xb8c0078e Linux
218
+ >0x1e6 belong 0x454c4b53 ELKS Kernel
219
+ >0x1e6 belong !0x454c4b53 style boot sector
220
+
221
+ ############################################################################
222
+ # Linux S390 kernel image
223
+ # Created by: Jan Kaluza <jkaluza@redhat.com>
224
+ 8 string \x02\x00\x00\x18\x60\x00\x00\x50\x02\x00\x00\x68\x60\x00\x00\x50\x40\x40\x40\x40\x40\x40\x40\x40 Linux S390
225
+ >0x00010000 search/b/4096 \x00\x0a\x00\x00\x8b\xad\xcc\xcc
226
+ # 64bit
227
+ >>&0 string \xc1\x00\xef\xe3\xf0\x68\x00\x00 Z10 64bit kernel
228
+ >>&0 string \xc1\x00\xef\xc3\x00\x00\x00\x00 Z9-109 64bit kernel
229
+ >>&0 string \xc0\x00\x20\x00\x00\x00\x00\x00 Z990 64bit kernel
230
+ >>&0 string \x00\x00\x00\x00\x00\x00\x00\x00 Z900 64bit kernel
231
+ # 32bit
232
+ >>&0 string \x81\x00\xc8\x80\x00\x00\x00\x00 Z10 32bit kernel
233
+ >>&0 string \x81\x00\xc8\x80\x00\x00\x00\x00 Z9-109 32bit kernel
234
+ >>&0 string \x80\x00\x20\x00\x00\x00\x00\x00 Z990 32bit kernel
235
+ >>&0 string \x80\x00\x00\x00\x00\x00\x00\x00 Z900 32bit kernel
236
+
237
+ ############################################################################
238
+ # Linux ARM compressed kernel image
239
+ # From: Kevin Cernekee <cernekee@gmail.com>
240
+ # Update: Joerg Jenderek
241
+ 0x24 lelong 0x016f2818 Linux kernel ARM boot executable zImage
242
+ # There are three possible situations: LE, BE with LE bootloader and pure BE.
243
+ # In order to aid telling these apart a new endian flag was added. In order
244
+ # to support kernels before the flag and BE with LE bootloader was added we'll
245
+ # do a negative check against the BE variant of the flag when we see a LE magic.
246
+ >0x30 belong !0x04030201 (little-endian)
247
+ # raspian "kernel7.img", Vu+ Ultimo4K "kernel_auto.bin"
248
+ !:ext img/bin
249
+ >0x30 belong 0x04030201 (big-endian)
250
+ 0x24 belong 0x016f2818 Linux kernel ARM boot executable zImage (big-endian)
251
+
252
+ ############################################################################
253
+ # Linux AARCH64 kernel image
254
+ 0x38 lelong 0x644d5241 Linux kernel ARM64 boot executable Image
255
+ >0x18 lelong ^1 \b, little-endian
256
+ >0x18 lelong &1 \b, big-endian
257
+ >0x18 lelong &2 \b, 4K pages
258
+ >0x18 lelong &4 \b, 16K pages
259
+ >0x18 lelong &6 \b, 32K pages
260
+
261
+ ############################################################################
262
+ # Linux 8086 executable
263
+ 0 lelong&0xFF0000FF 0xC30000E9 Linux-Dev86 executable, headerless
264
+ >5 string .
265
+ >>4 string >\0 \b, libc version %s
266
+
267
+ 0 lelong&0xFF00FFFF 0x4000301 Linux-8086 executable
268
+ >2 byte&0x01 !0 \b, unmapped zero page
269
+ >2 byte&0x20 0 \b, impure
270
+ >2 byte&0x20 !0
271
+ >>2 byte&0x10 !0 \b, A_EXEC
272
+ >2 byte&0x02 !0 \b, A_PAL
273
+ >2 byte&0x04 !0 \b, A_NSYM
274
+ >2 byte&0x08 !0 \b, A_STAND
275
+ >2 byte&0x40 !0 \b, A_PURE
276
+ >2 byte&0x80 !0 \b, A_TOVLY
277
+ >28 long !0 \b, not stripped
278
+ >37 string .
279
+ >>36 string >\0 \b, libc version %s
280
+
281
+ # 0 lelong&0xFF00FFFF 0x10000301 ld86 I80386 executable
282
+ # 0 lelong&0xFF00FFFF 0xB000301 ld86 M68K executable
283
+ # 0 lelong&0xFF00FFFF 0xC000301 ld86 NS16K executable
284
+ # 0 lelong&0xFF00FFFF 0x17000301 ld86 SPARC executable
285
+
286
+ # SYSLINUX boot logo files (from 'ppmtolss16' sources)
287
+ # https://www.syslinux.org/wiki/index.php/SYSLINUX#Display_graphic_from_filename:
288
+ # file extension .lss .16
289
+ 0 lelong =0x1413f33d SYSLINUX' LSS16 image data
290
+ # syslinux-4.05/mime/image/x-lss16.xml
291
+ !:mime image/x-lss16
292
+ >4 leshort x \b, width %d
293
+ >6 leshort x \b, height %d
294
+
295
+ 0 string OOOM User-Mode-Linux's Copy-On-Write disk image
296
+ >4 belong x version %d
297
+
298
+ # SE Linux policy database
299
+ # From: Mike Frysinger <vapier@gentoo.org>
300
+ 0 lelong 0xf97cff8c SE Linux policy
301
+ >16 lelong x v%d
302
+ >20 lelong 1 MLS
303
+ >24 lelong x %d symbols
304
+ >28 lelong x %d ocons
305
+
306
+ # Linux Logical Volume Manager (LVM)
307
+ # Emmanuel VARAGNAT <emmanuel.varagnat@guzu.net>
308
+ #
309
+ # System ID, UUID and volume group name are 128 bytes long
310
+ # but they should never be full and initialized with zeros...
311
+ #
312
+ # LVM1
313
+ #
314
+ 0x0 string/b HM\001 LVM1 (Linux Logical Volume Manager), version 1
315
+ >0x12c string/b >\0 , System ID: %s
316
+
317
+ 0x0 string/b HM\002 LVM1 (Linux Logical Volume Manager), version 2
318
+ >0x12c string/b >\0 , System ID: %s
319
+
320
+ # LVM2
321
+ #
322
+ # It seems that the label header can be in one the four first sector
323
+ # of the disk... (from _find_labeller in lib/label/label.c of LVM2)
324
+ #
325
+ # 0x200 seems to be the common case
326
+ 0 name lvm2
327
+ # display UUID in LVM format + display all 32 bytes (instead of max string length: 31)
328
+ >0x0 string >\x2f \b, UUID: %.6s
329
+ >0x6 string >\x2f \b-%.4s
330
+ >0xa string >\x2f \b-%.4s
331
+ >0xe string >\x2f \b-%.4s
332
+ >0x12 string >\x2f \b-%.4s
333
+ >0x16 string >\x2f \b-%.4s
334
+ >0x1a string >\x2f \b-%.6s
335
+ >0x20 lequad x \b, size: %lld
336
+
337
+
338
+ # read the offset to add to the start of the header, and the header
339
+ # start in 0x200
340
+ 0x218 string/b LVM2\ 001 LVM2 PV (Linux Logical Volume Manager)
341
+ >&(&-12.l-0x20) use lvm2
342
+
343
+ 0x018 string/b LVM2\ 001 LVM2 PV (Linux Logical Volume Manager)
344
+ >&(&-12.l-0x20) use lvm2
345
+
346
+ 0x418 string/b LVM2\ 001 LVM2 PV (Linux Logical Volume Manager)
347
+ >&(&-12.l-0x20) use lvm2
348
+
349
+ 0x618 string/b LVM2\ 001 LVM2 PV (Linux Logical Volume Manager)
350
+ >&(&-12.l-0x20) use lvm2
351
+
352
+ # LVM snapshot
353
+ # from Jason Farrel
354
+ 0 string SnAp LVM Snapshot (CopyOnWrite store)
355
+ >4 lelong !0 - valid,
356
+ >4 lelong 0 - invalid,
357
+ >8 lelong x version %d,
358
+ >12 lelong x chunk_size %d
359
+
360
+ # SE Linux policy database
361
+ 0 lelong 0xf97cff8c SE Linux policy
362
+ >16 lelong x v%d
363
+ >20 lelong 1 MLS
364
+ >24 lelong x %d symbols
365
+ >28 lelong x %d ocons
366
+
367
+ # Summary: Xen saved domain file
368
+ # Created by: Radek Vokal <rvokal@redhat.com>
369
+ 0 string LinuxGuestRecord Xen saved domain
370
+ >20 search/256 (name
371
+ >>&1 string x (name %s)
372
+
373
+ # Type: Xen, the virtual machine monitor
374
+ # From: Radek Vokal <rvokal@redhat.com>
375
+ 0 string LinuxGuestRecord Xen saved domain
376
+ #>2 regex \(name\ [^)]*\) %s
377
+ >20 search/256 (name (name
378
+ >>&1 string x %s...)
379
+
380
+ # Systemd journald files
381
+ # See https://www.freedesktop.org/wiki/Software/systemd/journal-files/.
382
+ # From: Zbigniew Jedrzejewski-Szmek <zbyszek@in.waw.pl>
383
+
384
+ # check magic
385
+ 0 string LPKSHHRH
386
+ # check that state is one of known values
387
+ >16 ubyte&252 0
388
+ # check that each half of three unique id128s is non-zero
389
+ >>24 ubequad >0
390
+ >>>32 ubequad >0
391
+ >>>>40 ubequad >0
392
+ >>>>>48 ubequad >0
393
+ >>>>>>56 ubequad >0
394
+ >>>>>>>64 ubequad >0 Journal file
395
+ !:mime application/octet-stream
396
+ # provide more info
397
+ >>>>>>>>184 leqdate 0 empty
398
+ >>>>>>>>16 ubyte 0 \b, offline
399
+ >>>>>>>>16 ubyte 1 \b, online
400
+ >>>>>>>>16 ubyte 2 \b, archived
401
+ >>>>>>>>8 ulelong&1 1 \b, sealed
402
+ >>>>>>>>12 ulelong&1 1 \b, compressed
403
+
404
+ # BCache backing and cache devices
405
+ # From: Gabriel de Perthuis <g2p.code@gmail.com>
406
+ 0x1008 lequad 8
407
+ >0x1018 string \xc6\x85\x73\xf6\x4e\x1a\x45\xca\x82\x65\xf5\x7f\x48\xba\x6d\x81 BCache
408
+ >>0x1010 ulequad 0 cache device
409
+ >>0x1010 ulequad 1 backing device
410
+ >>0x1010 ulequad 3 cache device
411
+ >>0x1010 ulequad 4 backing device
412
+ >>0x1048 string >0 \b, label "%.32s"
413
+ >>0x1028 ubelong x \b, uuid %08x
414
+ >>0x102c ubeshort x \b-%04x
415
+ >>0x102e ubeshort x \b-%04x
416
+ >>0x1030 ubeshort x \b-%04x
417
+ >>0x1032 ubelong x \b-%08x
418
+ >>0x1036 ubeshort x \b%04x
419
+ >>0x1038 ubelong x \b, set uuid %08x
420
+ >>0x103c ubeshort x \b-%04x
421
+ >>0x103e ubeshort x \b-%04x
422
+ >>0x1040 ubeshort x \b-%04x
423
+ >>0x1042 ubelong x \b-%08x
424
+ >>0x1046 ubeshort x \b%04x
425
+
426
+ # Linux device tree:
427
+ # File format description can be found in the Linux kernel sources at
428
+ # Documentation/devicetree/booting-without-of.txt
429
+ # From Christoph Biedl
430
+ 0 belong 0xd00dfeed
431
+ # structure must be within blob, strings are omitted to handle devicetrees > 1M
432
+ >&(8.L) byte x
433
+ >>20 belong >1 Device Tree Blob version %d
434
+ >>>4 belong x \b, size=%d
435
+ >>>20 belong >1
436
+ >>>>28 belong x \b, boot CPU=%d
437
+ >>>20 belong >2
438
+ >>>>32 belong x \b, string block size=%d
439
+ >>>20 belong >16
440
+ >>>>36 belong x \b, DT structure block size=%d
441
+
442
+ # glibc locale archive as defined in glibc locale/locarchive.h
443
+ 0 lelong 0xde020109 locale archive
444
+ >24 lelong x %d strings
445
+
446
+ # Linux Software RAID (mdadm)
447
+ # Russell Coker <russell@coker.com.au>
448
+ 0 name linuxraid
449
+ >16 belong x UUID=%8x:
450
+ >20 belong x \b%8x:
451
+ >24 belong x \b%8x:
452
+ >28 belong x \b%8x
453
+ >32 string x name=%s
454
+ >72 lelong x level=%d
455
+ >92 lelong x disks=%d
456
+
457
+ 4096 lelong 0xa92b4efc Linux Software RAID
458
+ >4100 lelong x version 1.2 (%d)
459
+ >4096 use linuxraid
460
+
461
+ 0 lelong 0xa92b4efc Linux Software RAID
462
+ >4 lelong x version 1.1 (%d)
463
+ >0 use linuxraid
464
+
465
+ # Summary: Database file for mlocate
466
+ # Description: A database file as used by mlocate, a fast implementation
467
+ # of locate/updatedb. It uses merging to reuse the existing
468
+ # database and avoid rereading most of the filesystem. It's
469
+ # the default version of locate on Arch Linux (and others).
470
+ # File path: /var/lib/mlocate/mlocate.db by default (but configurable)
471
+ # Site: https://fedorahosted.org/mlocate/
472
+ # Format docs: https://linux.die.net/man/5/mlocate.db
473
+ # Type: mlocate database file
474
+ # URL: https://fedorahosted.org/mlocate/
475
+ # From: Wander Nauta <info@wandernauta.nl>
476
+ 0 string \0mlocate mlocate database
477
+ >12 byte x \b, version %d
478
+ >13 byte 1 \b, require visibility
479
+ >16 string x \b, root %s
480
+
481
+ # Dump files for iproute2 tool. Generated by the "ip r|a save" command. URL:
482
+ # https://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2
483
+ # From: Pavel Emelyanov <xemul@parallels.com>
484
+ 0 lelong 0x45311224 iproute2 routes dump
485
+ 0 lelong 0x47361222 iproute2 addresses dump
486
+
487
+ # Image and service files for CRIU tool.
488
+ # URL: https://criu.org
489
+ # From: Pavel Emelyanov <xemul@parallels.com>
490
+ 0 lelong 0x54564319 CRIU image file v1.1
491
+ 0 lelong 0x55105940 CRIU service file
492
+ 0 lelong 0x58313116 CRIU inventory
493
+
494
+ # Kdump compressed dump files
495
+ # https://github.com/makedumpfile/makedumpfile/blob/master/IMPLEMENTATION
496
+
497
+ 0 string KDUMP\x20\x20\x20 Kdump compressed dump
498
+ >0 use kdump-compressed-dump
499
+
500
+ 0 name kdump-compressed-dump
501
+ >8 long x v%d
502
+ >12 string >\0 \b, system %s
503
+ >77 string >\0 \b, node %s
504
+ >142 string >\0 \b, release %s
505
+ >207 string >\0 \b, version %s
506
+ >272 string >\0 \b, machine %s
507
+ >337 string >\0 \b, domain %s
508
+
509
+ # Flattened format
510
+ 0 string makedumpfile
511
+ >16 bequad 1
512
+ >>0x1010 string KDUMP\x20\x20\x20 Flattened kdump compressed dump
513
+ >>>0x1010 use kdump-compressed-dump
514
+
515
+ # Device Tree files
516
+ 0 search/1024 /dts-v1/ Device Tree File (v1)
517
+ # beat c code
518
+ !:strength +14
519
+
520
+
521
+ # e2fsck undo file
522
+ # David Gilman <davidgilman1@gmail.com>
523
+ 0 string E2UNDO02 e2fsck undo file, version 2
524
+ >44 lelong x \b, undo file is
525
+ >>44 lelong&1 0 not finished
526
+ >>44 lelong&1 1 finished
527
+ >48 lelong x \b, undo file features:
528
+ >>48 lelong&1 0 lacks filesystem offset
529
+ >>48 lelong&1 1 has filesystem offset
530
+ >>>64 lequad x at %#llx
531
+
532
+ # ansible vault (does not really belong here)
533
+ 0 string $ANSIBLE_VAULT; Ansible Vault
534
+ >&0 regex [0-9]+\\.[0-9]+ \b, version %s
535
+ >>&0 string ;
536
+ >>>&0 regex [A-Z0-9]+ \b, encryption %s
537
+
538
+ # From: Joerg Jenderek
539
+ # URL: https://www.gnu.org/software/grub
540
+ # Reference: https://ftp.gnu.org/gnu/grub/grub-2.06.tar.gz
541
+ # grub-2.06/include/grub/keyboard_layouts.h
542
+ # grub-2.06/grub-core/commands/keylayouts.c
543
+ # GRUB_KEYBOARD_LAYOUTS_FILEMAGIC
544
+ 0 string GRUBLAYO GRUB Keyboard
545
+ !:mime application/x-grub-keyboard
546
+ !:ext gkb
547
+ # GRUB_KEYBOARD_LAYOUTS_VERSION like: 10
548
+ >8 ulelong !10 \b, version %u
549
+ # 4 grub_uint32_t grub_keyboard_layout[160]
550
+ # for normal french keyboard this is letter a
551
+ >92 ubyte !0x71
552
+ >>92 ubyte >0x40 \b, english q is %c
553
+ #>732 ubyte x \b, english Q is %c
554
+ # for normal german keyboard this is letter z
555
+ >124 ubyte !0x79
556
+ >>124 ubyte >0x40 \b, english y is %c
557
+ #>764 ubyte x \b, english Y is %c
@@ -0,0 +1,78 @@
1
+
2
+ #------------------------------------------------------------------------------
3
+ # $File: lisp,v 1.27 2020/08/14 19:23:39 christos Exp $
4
+ # lisp: file(1) magic for lisp programs
5
+ #
6
+ # various lisp types, from Daniel Quinlan (quinlan@yggdrasil.com)
7
+
8
+ # updated by Joerg Jenderek
9
+ # GRR: This lot is too weak
10
+ #0 string ;;
11
+ # windows INF files often begin with semicolon and use CRLF as line end
12
+ # lisp files are mainly created on unix system with LF as line end
13
+ #>2 search/4096 !\r Lisp/Scheme program text
14
+ #>2 search/4096 \r Windows INF file
15
+
16
+ 0 search/4096 (setq\ Lisp/Scheme program text
17
+ !:mime text/x-lisp
18
+ 0 search/4096 (defvar\ Lisp/Scheme program text
19
+ !:mime text/x-lisp
20
+ 0 search/4096 (defparam\ Lisp/Scheme program text
21
+ !:mime text/x-lisp
22
+ 0 search/4096 (defun\ Lisp/Scheme program text
23
+ !:mime text/x-lisp
24
+ 0 search/4096 (autoload\ Lisp/Scheme program text
25
+ !:mime text/x-lisp
26
+ 0 search/4096 (custom-set-variables\ Lisp/Scheme program text
27
+ !:mime text/x-lisp
28
+
29
+ # URL: https://en.wikipedia.org/wiki/Emacs_Lisp
30
+ # Reference: https://ftp.gnu.org/old-gnu/emacs/elisp-manual-18-1.03.tar.gz
31
+ # Update: Joerg Jenderek
32
+ # Emacs 18 - this is always correct, but not very magical.
33
+ 0 string \012(
34
+ # look for emacs lisp keywords
35
+ # GRR: split regex because it is too long or get error like
36
+ # lisp, 36: Warning: cannot get string from `^(defun|defvar|defconst|defmacro|setq|fset|put|provide|require|'
37
+ >&0 regex \^(defun|defvar|defconst|defmacro|setq|fset) Emacs v18 byte-compiled Lisp data
38
+ !:mime application/x-elc
39
+ # https://searchcode.com/codesearch/view/2173420/
40
+ # not really pure text
41
+ !:apple EMAxTEXT
42
+ !:ext elc
43
+ # remaining regex
44
+ >&0 regex \^(put|provide|require|random) Emacs v18 byte-compiled Lisp data
45
+ !:mime application/x-elc
46
+ !:apple EMAxTEXT
47
+ !:ext elc
48
+ # missed cl.elc dbx.elc simple.elc look like normal lisp starting with ;;;
49
+
50
+ # Emacs 19+ - ver. recognition added by Ian Springer
51
+ # Also applies to XEmacs 19+ .elc files; could tell them apart with regexs
52
+ # - Chris Chittleborough <cchittleborough@yahoo.com.au>
53
+ # Update: Joerg Jenderek
54
+ 0 string ;ELC
55
+ # version\0\0\0
56
+ >4 byte >18 Emacs/XEmacs v%d byte-compiled Lisp data
57
+ # why less than 32 ? does not make sense to me. GNU Emacs version is 24.5 at April 2015
58
+ #>4 byte <32 Emacs/XEmacs v%d byte-compiled Lisp data
59
+ !:mime application/x-elc
60
+ !:apple EMAxTEXT
61
+ !:ext elc
62
+
63
+ # Files produced by GNU/Emacs pdumper
64
+ 0 string DUMPEDGNUEMACS GNU/Emacs pdumper image
65
+
66
+ # Files produced by CLISP Common Lisp From: Bruno Haible <haible@ilog.fr>
67
+ 0 string (SYSTEM::VERSION\040' CLISP byte-compiled Lisp program (pre 2004-03-27)
68
+ 0 string (|SYSTEM|::|VERSION|\040' CLISP byte-compiled Lisp program text
69
+
70
+ 0 long 0x70768BD2 CLISP memory image data
71
+ 0 long 0xD28B7670 CLISP memory image data, other endian
72
+
73
+ #.com and .bin for MIT scheme
74
+ 0 string \372\372\372\372 MIT scheme (library?)
75
+
76
+ # From: David Allouche <david@allouche.net>
77
+ 0 search/1 \<TeXmacs| TeXmacs document text
78
+ !:mime text/texmacs
@@ -0,0 +1,22 @@
1
+
2
+ #------------------------------------------------------------------------------
3
+ # $File: llvm,v 1.10 2023/03/11 17:54:17 christos Exp $
4
+ # llvm: file(1) magic for LLVM byte-codes
5
+ # URL: https://llvm.org/docs/BitCodeFormat.html
6
+ # From: Al Stone <ahs3@fc.hp.com>
7
+
8
+ 0 string llvm LLVM byte-codes, uncompressed
9
+ 0 string llvc0 LLVM byte-codes, null compression
10
+ 0 string llvc1 LLVM byte-codes, gzip compression
11
+ 0 string llvc2 LLVM byte-codes, bzip2 compression
12
+ 0 string CPCH LLVM Pre-compiled header file
13
+
14
+ 0 lelong 0x0b17c0de LLVM bitcode, wrapper
15
+ # Are these Mach-O ABI values? They appear to be.
16
+ >16 lelong 0x01000007 x86_64
17
+ >16 lelong 0x00000007 i386
18
+ >16 lelong 0x00000012 ppc
19
+ >16 lelong 0x01000012 ppc64
20
+ >16 lelong 0x0000000c arm
21
+
22
+ 0 string BC\xc0\xde LLVM IR bitcode
@@ -0,0 +1,12 @@
1
+
2
+ #------------------------------------------------------------------------------
3
+ # $File: locoscript,v 1.1 2021/01/03 20:56:25 christos Exp $
4
+ # locoscript: file(1) magic for LocoScript documents and related files
5
+ #
6
+ # See http://fileformats.archiveteam.org/wiki/LocoScript
7
+ 0 string JOY\x01\x01 LocoScript 1 document
8
+ 0 string JOY\x01\x02 LocoScript 2 document
9
+ 0 string JOY\x01\x04 LocoScript 3 document
10
+ 0 string JOY\x01\x06 LocoScript 4 document
11
+ 0 string DOC\x01\x01 LocoScript PC document
12
+ 0 string DOC\x01\x03 LocoScript Professional document