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,269 @@
1
+
2
+ #------------------------------------------------------------------------------
3
+ # $File: printer,v 1.33 2023/01/22 15:03:03 christos Exp $
4
+ # printer: file(1) magic for printer-formatted files
5
+ #
6
+
7
+ # PostScript, updated by Daniel Quinlan (quinlan@yggdrasil.com)
8
+ 0 string %! PostScript document text
9
+ !:mime application/postscript
10
+ !:apple ASPSTEXT
11
+ >2 string PS-Adobe- conforming
12
+ >>11 string >\0 DSC level %.3s
13
+ >>>15 string EPS \b, type %s
14
+ >>>15 string Query \b, type %s
15
+ >>>15 string ExitServer \b, type %s
16
+ >>>15 search/1000 %%LanguageLevel:\040
17
+ >>>>&0 string >\0 \b, Level %s
18
+ # Some PCs have the annoying habit of adding a ^D as a document separator
19
+ 0 string \004%! PostScript document text
20
+ !:mime application/postscript
21
+ !:apple ASPSTEXT
22
+ >3 string PS-Adobe- conforming
23
+ >>12 string >\0 DSC level %.3s
24
+ >>>16 string EPS \b, type %s
25
+ >>>16 string Query \b, type %s
26
+ >>>16 string ExitServer \b, type %s
27
+ >>>16 search/1000 %%LanguageLevel:\040
28
+ >>>>&0 string >\0 \b, Level %s
29
+ 0 string \033%-12345X%!PS PostScript document
30
+
31
+ # DOS EPS Binary File Header
32
+ # From: Ed Sznyter <ews@Black.Market.NET>
33
+ # Update: Joerg Jenderek
34
+ # URL: http://fileformats.archiveteam.org/wiki/Encapsulated_PostScript
35
+ # Reference: http://mark0.net/download/triddefs_xml.7z/defs/eps-adobe.trid.xml
36
+ # Note: called "Encapsulated PostScript binary" by TrID and
37
+ # verified partly by ImageMagick `identify -verbose *` as EPT (Encapsulated PostScript with TIFF preview)
38
+ 0 belong 0xC5D0D3C6
39
+ # skip DROID fmt-122-signature-id-174.eps fmt-123-signature-id-178.eps fmt-124-signature-id-180.eps
40
+ # by looking for content after header
41
+ # GRR: in version 5.44 unequal and not endian variant not working!
42
+ >32 ulelong >0 DOS EPS Binary File
43
+ !:mime image/x-eps
44
+ # TODO: check that "long" is false on big endian machines
45
+ # Postscript often (850/857) comes after header; so values like: 30 32 or 2788 10644 43350 71828
46
+ >>4 long >0 at byte %d
47
+ # 1 space char after length value to get phrase like "length 263893 PostScript document text"
48
+ >>>8 long >0 length %d
49
+ # PostScript document text handled by ./printer
50
+ >>>>(4.l) indirect x
51
+ # Reference: http://mark0.net/download/triddefs_xml.7z/defs/e/eps-wmf.trid.xml
52
+ # Note: called "Encapsulated PostScript binary (with WMF preview)" by TrID
53
+ # verified partly by XnView `nconvert -info *.EP?` as TIFF epsp
54
+ >>>>12 long >0 at byte %d
55
+ !:ext eps
56
+ # GRR: in file version 5.44 calling indirect of ./msdos produce phrase like "length 452\012- Windows metafile"
57
+ >>>>16 long >0 length %d
58
+ # Windows metafile data handled by ./msdos
59
+ >>>>>(12.l) indirect x
60
+ # Reference: http://mark0.net/download/triddefs_xml.7z/defs/e/eps-tiff.trid.xml
61
+ # Note: called "Encapsulated PostScript binary (with TIFF preview)" by TrID
62
+ >>>>20 long >0 at byte %d
63
+ # For the variant with the TIFF preview image sometimes the file extension ept is used
64
+ !:ext eps/ept
65
+ # GRR: in file version 5.44 calling indirect of ./images produce phrase like "length 43320\012- TIFF image data,"
66
+ >>>>>24 long >0 length %d
67
+ # TIFF image data handled by ./images
68
+ >>>>>>(20.l) indirect x
69
+
70
+ # Summary: Adobe's PostScript Printer Description File
71
+ # Extension: .ppd
72
+ # Reference: https://partners.adobe.com/public/developer/en/ps/5003.PPD_Spec_v4.3.pdf, Section 3.8
73
+ # Submitted by: Yves Arrouye <arrouye@marin.fdn.fr>
74
+ #
75
+ 0 string *PPD-Adobe:\x20 PPD file
76
+ >&0 string x \b, version %s
77
+ !:ext ppd
78
+ !:mime application/vnd.cups-ppd
79
+
80
+ # HP Printer Job Language
81
+ 0 string \033%-12345X@PJL HP Printer Job Language data
82
+ # HP Printer Job Language
83
+ # The header found on Win95 HP plot files is the "Silliest Thing possible"
84
+ # (TM)
85
+ # Every driver puts the language at some random position, with random case
86
+ # (LANGUAGE and Language)
87
+ # For example the LaserJet 5L driver puts the "PJL ENTER LANGUAGE" in line 10
88
+ # From: Uwe Bonnes <bon@elektron.ikp.physik.th-darmstadt.de>
89
+ #
90
+ 0 string \033%-12345X@PJL HP Printer Job Language data
91
+ >&0 string >\0 %s
92
+ >>&0 string >\0 %s
93
+ >>>&0 string >\0 %s
94
+ >>>>&0 string >\0 %s
95
+ #>15 string \ ENTER\ LANGUAGE\ =
96
+ #>31 string PostScript PostScript
97
+
98
+ # From: Stefan Thurner <thurners@nicsys.de>
99
+ 0 string \033%-12345X@PJL
100
+ >&0 search/10000 %! PJL encapsulated PostScript document text
101
+
102
+ # Rick Richardson <rickrich@gmail.com>
103
+
104
+ # For Fuji-Xerox Printers - HBPL stands for Host Based Printer Language
105
+ # For Oki Data Printers - HIPERC
106
+ # For Konica Minolta Printers - LAVAFLOW
107
+ # For Samsung Printers - QPDL
108
+ # For HP Printers - ZJS stands for Zenographics ZJStream
109
+ 0 string \033%-12345X@PJL HP Printer Job Language data
110
+ >0 search/10000 @PJL\ ENTER\ LANGUAGE=HBPL - HBPL
111
+ >0 search/10000 @PJL\ ENTER\ LANGUAGE=HIPERC - Oki Data HIPERC
112
+ >0 search/10000 @PJL\ ENTER\ LANGUAGE=LAVAFLOW - Konica Minolta LAVAFLOW
113
+ >0 search/10000 @PJL\ ENTER\ LANGUAGE=QPDL - Samsung QPDL
114
+ >0 search/10000 @PJL\ ENTER\ LANGUAGE\ =\ QPDL - Samsung QPDL
115
+ >0 search/10000 @PJL\ ENTER\ LANGUAGE=ZJS - HP ZJS
116
+ # Summary: Hewlett-Packard printer firmware update
117
+ # From: Joerg Jenderek
118
+ # URL: https://support.hp.com/us-en/drivers/selfservice/hp-envy-6000e-all-in-one-printer-series/2100187505/model/2100187513
119
+ # Note: firmware update tested with ENVY 6000 All-in-One Printer
120
+ 0 string @PJL\ ENTER\ LANGUAGE=FWUPDATE2 HP Printer firmware update
121
+ #!:mime application/octet-stream
122
+ #!:mime application/x-hp-firmware
123
+ # https://ftp.hp.com/pub/softlib/software13/printers/en6000/2214/EN6000_2214B.exe
124
+ # vasari_base_dist_pp1_001.2214B_nonassert_appsigned_lbi_rootfs_secure_signed.ful2
125
+ !:ext ful2
126
+
127
+ # HP Printer Control Language, Daniel Quinlan (quinlan@yggdrasil.com)
128
+ 0 string \033E\033 HP PCL printer data
129
+ >3 string \&l0A - default page size
130
+ >3 string \&l1A - US executive page size
131
+ >3 string \&l2A - US letter page size
132
+ >3 string \&l3A - US legal page size
133
+ >3 string \&l26A - A4 page size
134
+ >3 string \&l80A - Monarch envelope size
135
+ >3 string \&l81A - No. 10 envelope size
136
+ >3 string \&l90A - Intl. DL envelope size
137
+ >3 string \&l91A - Intl. C5 envelope size
138
+ >3 string \&l100A - Intl. B5 envelope size
139
+ >3 string \&l-81A - No. 10 envelope size (landscape)
140
+ >3 string \&l-90A - Intl. DL envelope size (landscape)
141
+
142
+ # IMAGEN printer-ready files:
143
+ 0 string @document( Imagen printer
144
+ # this only works if "language xxx" is first item in Imagen header.
145
+ >10 string language\ impress (imPRESS data)
146
+ >10 string language\ daisy (daisywheel text)
147
+ >10 string language\ diablo (daisywheel text)
148
+ >10 string language\ printer (line printer emulation)
149
+ >10 string language\ tektronix (Tektronix 4014 emulation)
150
+ # Add any other languages that your Imagen uses - remember
151
+ # to keep the word `text' if the file is human-readable.
152
+ # [GRR 950115: missing "postscript" or "ultrascript" (whatever it was called)]
153
+ #
154
+ # Now magic for IMAGEN font files...
155
+ 0 string Rast RST-format raster font data
156
+ >45 string >0 face %s
157
+ # From Jukka Ukkonen
158
+ 0 string \033[K\002\0\0\017\033(a\001\0\001\033(g Canon Bubble Jet BJC formatted data
159
+
160
+ # From <mike@flyn.org>
161
+ # These are the /etc/magic entries to decode data sent to an Epson printer.
162
+ 0 string \x1B\x40\x1B\x28\x52\x08\x00\x00REMOTE1P Epson Stylus Color 460 data
163
+
164
+
165
+ #------------------------------------------------------------------------------
166
+ # zenographics: file(1) magic for Zenographics ZjStream printer data
167
+ # Rick Richardson <rickrich@gmail.com>
168
+ 0 string JZJZ
169
+ >0x12 string ZZ Zenographics ZjStream printer data (big-endian)
170
+ 0 string ZJZJ
171
+ >0x12 string ZZ Zenographics ZjStream printer data (little-endian)
172
+
173
+
174
+ #------------------------------------------------------------------------------
175
+ # Oak Technologies printer stream
176
+ # Rick Richardson <rickrich@gmail.com>
177
+ 0 string OAK
178
+ >0x07 byte 0
179
+ >0x0b byte 0 Oak Technologies printer stream
180
+
181
+ # This would otherwise be recognized as PostScript - nick@debian.org
182
+ 0 string %!VMF SunClock's Vector Map Format data
183
+
184
+ #------------------------------------------------------------------------------
185
+ # HP LaserJet 1000 series downloadable firmware file
186
+ 0 string \xbe\xefABCDEFGH HP LaserJet 1000 series downloadable firmware
187
+
188
+ # From: Paolo <oopla@users.sf.net>
189
+ # Epson ESC/Page, ESC/PageColor
190
+ 0 string \x1b\x01@EJL Epson ESC/Page language printer data
191
+
192
+ # Summary: Hewlett-Packard Graphics Language
193
+ # From: Joerg Jenderek
194
+ # URL: http://fileformats.archiveteam.org/wiki/HP-GL
195
+ # https://en.wikipedia.org/wiki/HPGL
196
+ # Reference: http://mark0.net/download/triddefs_xml.7z/defs/h/hpg.trid.xml
197
+ # Note: called "Hewlett-Packard Graphics Language" by TrID and
198
+ # "Hewlett Packard Graphics Language" by DROID via PUID x-fmt/293 and
199
+ # HPGL by XnView command `nconvert -info *`
200
+ # initialize, start a plotting job
201
+ 0 string IN;
202
+ >0 use hpgl
203
+ # fill.plt
204
+ 0 string INPS
205
+ >0 use hpgl
206
+ # http://ftp.funet.fi/index/graphics/packages/hpgl2ps/hpgl2ps.tar.Z/hpgl2ps/test1.hpgl
207
+ 0 string DF;
208
+ >0 use hpgl
209
+ # http://ftp.funet.fi/index/graphics/packages/hpgl2ps/hpgl2ps.tar.Z/hpgl2ps/test3.hpgl
210
+ # Select Pen n
211
+ 0 string SP
212
+ >0 use hpgl
213
+ # charsize.hp pages.hp set the scaling points (P1 and P2) to their default positions
214
+ 0 string IP0
215
+ >0 use hpgl
216
+ # ci.hp
217
+ 0 string CO\040
218
+ >0 use hpgl
219
+ # iw.hp 286x192.5_lh.hpg 286x192.5_lq.hpg
220
+ 0 string PS\040
221
+ >0 use hpgl
222
+ # thick.hp
223
+ 0 string PS9
224
+ >0 use hpgl
225
+ # ul.hp
226
+ 0 string PS4
227
+ >0 use hpgl
228
+ # la.hp
229
+ 0 string BP
230
+ >0 use hpgl
231
+ # miter.hp
232
+ 0 string PA
233
+ >0 use hpgl
234
+ # pw.hpg number of pens x
235
+ 0 string NP
236
+ >0 use hpgl
237
+ # win_1.hp
238
+ #0 string \003INCA WHAT_IS_THAT
239
+ #>0 use hpgl
240
+ # Reference: http://mark0.net/download/triddefs_xml.7z/defs/h/hpgl2.trid.xml
241
+ # Note: called "Hewlett-Packard Graphics Language 2" by TrID
242
+ 0 string \033%-1B Hewlett-Packard Graphics Language 2
243
+ !:mime application/vnd.hp-HPGL
244
+ # like: dt.plt
245
+ !:ext plt
246
+ #!:ext plt/gl2/hpg2/spl
247
+ # remaining part after escsape sequnce
248
+ >5 string x with "%-.10s"
249
+ # display Hewlett-Packard Graphics Language vector graphic information
250
+ 0 name hpgl
251
+ >0 string x Hewlett-Packard Graphics Language
252
+ #!:mime vector/x-hpgl
253
+ # https://www.iana.org/assignments/media-types/application/vnd.hp-HPGL
254
+ !:mime application/vnd.hp-HPGL
255
+ # no example with HPL suffix found
256
+ !:ext hpgl/hpg/hp/plt
257
+ # like: "IN;" "DF;IN;LT;PU1000,1000;PD2000,10" "SP6;DI0,1;SR0.70,1.90;SC0,800,"
258
+ # "CO Concentric circles drawn with different linewidths;"
259
+ >0 string x \b, starting with "%-.54s"
260
+ # continue but not for 1 long line without CR or LF
261
+ >>&0 ubyte <0x0E
262
+ #>>&0 ubyte <0x0E TERMINATOR=%x
263
+ # second line after 1 terminator character
264
+ >>>&0 string >\r with "%-.10s"
265
+ # next character again CR or LF
266
+ >>>&0 ubyte <0x0E
267
+ #>>>&0 ubyte <0x0E 2ND_CHARACTER=%x
268
+ # second line after 2 terminator characters
269
+ >>>>&0 string >\r with "%-.10s"
@@ -0,0 +1,10 @@
1
+
2
+ #------------------------------------------------------------------------------
3
+ # $File: project,v 1.5 2017/03/17 21:35:28 christos Exp $
4
+ # project: file(1) magic for Project management
5
+ #
6
+ # Magic strings for ftnchek project files. Alexander Mai
7
+ 0 string FTNCHEK_\ P project file for ftnchek
8
+ >10 string 1 version 2.7
9
+ >10 string 2 version 2.8 to 2.10
10
+ >10 string 3 version 2.11 or later
@@ -0,0 +1,14 @@
1
+
2
+ #------------------------------------------------------------------------------
3
+ # $File: psdbms,v 1.8 2017/03/17 21:35:28 christos Exp $
4
+ # psdbms: file(1) magic for psdatabase
5
+ #
6
+ # Update: Joerg Jenderek
7
+ # GRR: line below too general as it catches also some Panorama database *.pan ,
8
+ # AppleWorks word processor
9
+ 0 belong&0xff00ffff 0x56000000
10
+ # assume version starts with digit
11
+ >1 regex/s =^[0-9] ps database
12
+ >>1 string >\0 version %s
13
+ # kernel name
14
+ >>4 string >\0 from kernel %s
@@ -0,0 +1,14 @@
1
+
2
+ #------------------------------------------------------------------------------
3
+ # $File: psl,v 1.3 2019/04/19 00:42:27 christos Exp $
4
+ # psl: file(1) magic for Public Suffix List representations
5
+ # From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
6
+ # URL: https://publicsuffix.org
7
+ # see also: https://thread.gmane.org/gmane.network.dns.libpsl.bugs/162/focus=166
8
+
9
+ 0 search/512 \n\n//\ ===BEGIN\ ICANN\ DOMAINS===\n\n Public Suffix List data
10
+
11
+ 0 string .DAFSA@PSL_
12
+ >15 string \n Public Suffix List data (optimized)
13
+ >>11 byte >0x2f
14
+ >>>11 byte <0x3a (Version %c)
@@ -0,0 +1,13 @@
1
+
2
+ #------------------------------------------------------------------------------
3
+ # $File: pulsar,v 1.5 2009/09/19 16:28:12 christos Exp $
4
+ # pulsar: file(1) magic for Pulsar POP3 daemon binary files
5
+ #
6
+ # http://pulsar.sourceforge.net
7
+ # mailto:rok.papez@lugos.si
8
+ #
9
+
10
+ 0 belong 0x1ee7f11e Pulsar POP3 daemon mailbox cache file.
11
+ >4 ubelong x Version: %d.
12
+ >8 ubelong x \b%d
13
+
@@ -0,0 +1,17 @@
1
+
2
+ #------------------------------------------------------------------------------
3
+ # $File: puzzle,v 1.2 2021/10/07 15:40:40 christos Exp $
4
+ # wsdl: Magic for various puzzles
5
+
6
+ # PUZ crossword puzzles from Alan De Smet
7
+ # Test files can be found at
8
+ # https://theworld.com/~wij/puzzles/wij-themed.html or using the
9
+ # "Universal" or "WS Journal" links on the right side of
10
+ # https://www.cruciverb.com/ .
11
+
12
+ 2 string ACROSS&DOWN PUZ crossword puzzle
13
+ >0x2c byte x %d x
14
+ >0x2d byte x %d,
15
+ >0x2e leshort x %d clues,
16
+ >0x1e leshort 0x0000 plain text solution
17
+ >0x1e leshort !0x0000 scrambled solution
@@ -0,0 +1,14 @@
1
+
2
+ #------------------------------------------------------------------------------
3
+ # $File: pwsafe,v 1.2 2019/04/19 00:42:27 christos Exp $
4
+ # pwsafe: file(1) magic for passwordsafe file
5
+ #
6
+ # Password Safe
7
+ # http://passwordsafe.sourceforge.net/
8
+ # file format specs
9
+ # https://passwordsafe.svn.sourceforge.net/viewvc/passwordsafe/trunk/pwsafe/pwsafe/docs/formatV3.txt
10
+ # V2 https://passwordsafe.svn.sourceforge.net/viewvc/passwordsafe/trunk/pwsafe/pwsafe/docs/formatV2.txt
11
+ # V1 https://passwordsafe.svn.sourceforge.net/viewvc/passwordsafe/trunk/pwsafe/pwsafe/docs/notes.txt
12
+ # V2 and V1 have no easy identifier that I can find
13
+ # .psafe3
14
+ 0 string PWS3 Password Safe V3 database
@@ -0,0 +1,12 @@
1
+
2
+ #------------------------------------------------------------------------------
3
+ # $File: pyramid,v 1.7 2009/09/19 16:28:12 christos Exp $
4
+ # pyramid: file(1) magic for Pyramids
5
+ #
6
+ # XXX - byte order?
7
+ #
8
+ 0 long 0x50900107 Pyramid 90x family executable
9
+ 0 long 0x50900108 Pyramid 90x family pure executable
10
+ >16 long >0 not stripped
11
+ 0 long 0x5090010b Pyramid 90x family demand paged pure executable
12
+ >16 long >0 not stripped
@@ -0,0 +1,305 @@
1
+
2
+ #------------------------------------------------------------------------------
3
+ # $File: python,v 1.45 2022/07/24 23:59:37 christos Exp $
4
+ # python: file(1) magic for python
5
+ #
6
+ # Outlook puts """ too for urgent messages
7
+ # From: David Necas <yeti@physics.muni.cz>
8
+ # often the module starts with a multiline string
9
+ 0 string/t """ Python script text executable
10
+ # MAGIC as specified in Python/import.c (1.0 to 3.7)
11
+ # and in Lib/importlib/_bootstrap_external.py (3.5+)
12
+ # two bytes of magic followed by "\r\n" in little endian order
13
+ 0 belong 0x02099900 python 1.0 byte-compiled
14
+ !:mime application/x-bytecode.python
15
+ 0 belong 0x03099900 python 1.1/1.2 byte-compiled
16
+ !:mime application/x-bytecode.python
17
+ 0 belong 0x892e0d0a python 1.3 byte-compiled
18
+ !:mime application/x-bytecode.python
19
+ 0 belong 0x04170d0a python 1.4 byte-compiled
20
+ !:mime application/x-bytecode.python
21
+ 0 belong 0x994e0d0a python 1.5 byte-compiled
22
+ !:mime application/x-bytecode.python
23
+ 0 belong 0xfcc40d0a python 1.6 byte-compiled
24
+ !:mime application/x-bytecode.python
25
+ 0 belong 0xfdc40d0a python 1.6 byte-compiled
26
+ !:mime application/x-bytecode.python
27
+ 0 belong 0x87c60d0a python 2.0 byte-compiled
28
+ !:mime application/x-bytecode.python
29
+ 0 belong 0x88c60d0a python 2.0 byte-compiled
30
+ !:mime application/x-bytecode.python
31
+ 0 belong 0x2aeb0d0a python 2.1 byte-compiled
32
+ !:mime application/x-bytecode.python
33
+ 0 belong 0x2beb0d0a python 2.1 byte-compiled
34
+ !:mime application/x-bytecode.python
35
+ 0 belong 0x2ded0d0a python 2.2 byte-compiled
36
+ !:mime application/x-bytecode.python
37
+ 0 belong 0x2eed0d0a python 2.2 byte-compiled
38
+ !:mime application/x-bytecode.python
39
+ 0 belong 0x3bf20d0a python 2.3 byte-compiled
40
+ !:mime application/x-bytecode.python
41
+ 0 belong 0x3cf20d0a python 2.3 byte-compiled
42
+ !:mime application/x-bytecode.python
43
+ 0 belong 0x45f20d0a python 2.3 byte-compiled
44
+ !:mime application/x-bytecode.python
45
+ 0 belong 0x59f20d0a python 2.4 byte-compiled
46
+ !:mime application/x-bytecode.python
47
+ 0 belong 0x63f20d0a python 2.4 byte-compiled
48
+ !:mime application/x-bytecode.python
49
+ 0 belong 0x6df20d0a python 2.4 byte-compiled
50
+ !:mime application/x-bytecode.python
51
+ 0 belong 0x6ef20d0a python 2.4 byte-compiled
52
+ !:mime application/x-bytecode.python
53
+ 0 belong 0x77f20d0a python 2.5 byte-compiled
54
+ !:mime application/x-bytecode.python
55
+ 0 belong 0x81f20d0a python 2.5 byte-compiled
56
+ !:mime application/x-bytecode.python
57
+ 0 belong 0x8bf20d0a python 2.5 byte-compiled
58
+ !:mime application/x-bytecode.python
59
+ 0 belong 0x8cf20d0a python 2.5 byte-compiled
60
+ !:mime application/x-bytecode.python
61
+ 0 belong 0x95f20d0a python 2.5 byte-compiled
62
+ !:mime application/x-bytecode.python
63
+ 0 belong 0x9ff20d0a python 2.5 byte-compiled
64
+ !:mime application/x-bytecode.python
65
+ 0 belong 0xa9f20d0a python 2.5 byte-compiled
66
+ !:mime application/x-bytecode.python
67
+ 0 belong 0xb3f20d0a python 2.5 byte-compiled
68
+ !:mime application/x-bytecode.python
69
+ 0 belong 0xb4f20d0a python 2.5 byte-compiled
70
+ !:mime application/x-bytecode.python
71
+ 0 belong 0xc7f20d0a python 2.6 byte-compiled
72
+ !:mime application/x-bytecode.python
73
+ 0 belong 0xd1f20d0a python 2.6 byte-compiled
74
+ !:mime application/x-bytecode.python
75
+ 0 belong 0xd2f20d0a python 2.6 byte-compiled
76
+ !:mime application/x-bytecode.python
77
+ 0 belong 0xdbf20d0a python 2.7 byte-compiled
78
+ !:mime application/x-bytecode.python
79
+ 0 belong 0xe5f20d0a python 2.7 byte-compiled
80
+ !:mime application/x-bytecode.python
81
+ 0 belong 0xeff20d0a python 2.7 byte-compiled
82
+ !:mime application/x-bytecode.python
83
+ 0 belong 0xf9f20d0a python 2.7 byte-compiled
84
+ !:mime application/x-bytecode.python
85
+ 0 belong 0x03f30d0a python 2.7 byte-compiled
86
+ !:mime application/x-bytecode.python
87
+ 0 belong 0x04f30d0a python 2.7 byte-compiled
88
+ !:mime application/x-bytecode.python
89
+ 0 belong 0x0af30d0a PyPy2.7 byte-compiled
90
+ !:mime application/x-bytecode.python
91
+ 0 belong 0xb80b0d0a python 3.0 byte-compiled
92
+ !:mime application/x-bytecode.python
93
+ 0 belong 0xc20b0d0a python 3.0 byte-compiled
94
+ !:mime application/x-bytecode.python
95
+ 0 belong 0xcc0b0d0a python 3.0 byte-compiled
96
+ !:mime application/x-bytecode.python
97
+ 0 belong 0xd60b0d0a python 3.0 byte-compiled
98
+ !:mime application/x-bytecode.python
99
+ 0 belong 0xe00b0d0a python 3.0 byte-compiled
100
+ !:mime application/x-bytecode.python
101
+ 0 belong 0xea0b0d0a python 3.0 byte-compiled
102
+ !:mime application/x-bytecode.python
103
+ 0 belong 0xf40b0d0a python 3.0 byte-compiled
104
+ !:mime application/x-bytecode.python
105
+ 0 belong 0xf50b0d0a python 3.0 byte-compiled
106
+ !:mime application/x-bytecode.python
107
+ 0 belong 0xff0b0d0a python 3.0 byte-compiled
108
+ !:mime application/x-bytecode.python
109
+ 0 belong 0x090c0d0a python 3.0 byte-compiled
110
+ !:mime application/x-bytecode.python
111
+ 0 belong 0x130c0d0a python 3.0 byte-compiled
112
+ !:mime application/x-bytecode.python
113
+ 0 belong 0x1d0c0d0a python 3.0 byte-compiled
114
+ !:mime application/x-bytecode.python
115
+ 0 belong 0x1f0c0d0a python 3.0 byte-compiled
116
+ !:mime application/x-bytecode.python
117
+ 0 belong 0x270c0d0a python 3.0 byte-compiled
118
+ !:mime application/x-bytecode.python
119
+ 0 belong 0x3b0c0d0a python 3.0 byte-compiled
120
+ !:mime application/x-bytecode.python
121
+ 0 belong 0x450c0d0a python 3.1 byte-compiled
122
+ !:mime application/x-bytecode.python
123
+ 0 belong 0x4f0c0d0a python 3.1 byte-compiled
124
+ !:mime application/x-bytecode.python
125
+ 0 belong 0x580c0d0a python 3.2 byte-compiled
126
+ !:mime application/x-bytecode.python
127
+ 0 belong 0x620c0d0a python 3.2 byte-compiled
128
+ !:mime application/x-bytecode.python
129
+ 0 belong 0x6c0c0d0a python 3.2 byte-compiled
130
+ !:mime application/x-bytecode.python
131
+ 0 belong 0x760c0d0a python 3.3 byte-compiled
132
+ !:mime application/x-bytecode.python
133
+ 0 belong 0x800c0d0a python 3.3 byte-compiled
134
+ !:mime application/x-bytecode.python
135
+ 0 belong 0x8a0c0d0a python 3.3 byte-compiled
136
+ !:mime application/x-bytecode.python
137
+ 0 belong 0x940c0d0a python 3.3 byte-compiled
138
+ !:mime application/x-bytecode.python
139
+ 0 belong 0x9e0c0d0a python 3.3 byte-compiled
140
+ !:mime application/x-bytecode.python
141
+ 0 belong 0xb20c0d0a python 3.4 byte-compiled
142
+ !:mime application/x-bytecode.python
143
+ 0 belong 0xbc0c0d0a python 3.4 byte-compiled
144
+ !:mime application/x-bytecode.python
145
+ 0 belong 0xc60c0d0a python 3.4 byte-compiled
146
+ !:mime application/x-bytecode.python
147
+ 0 belong 0xd00c0d0a python 3.4 byte-compiled
148
+ !:mime application/x-bytecode.python
149
+ 0 belong 0xda0c0d0a python 3.4 byte-compiled
150
+ !:mime application/x-bytecode.python
151
+ 0 belong 0xe40c0d0a python 3.4 byte-compiled
152
+ !:mime application/x-bytecode.python
153
+ 0 belong 0xee0c0d0a python 3.4 byte-compiled
154
+ !:mime application/x-bytecode.python
155
+ 0 belong 0xf80c0d0a python 3.5.1- byte-compiled
156
+ !:mime application/x-bytecode.python
157
+ 0 belong 0x020d0d0a python 3.5.1- byte-compiled
158
+ !:mime application/x-bytecode.python
159
+ 0 belong 0x0c0d0d0a python 3.5.1- byte-compiled
160
+ !:mime application/x-bytecode.python
161
+ 0 belong 0x160d0d0a python 3.5.1- byte-compiled
162
+ !:mime application/x-bytecode.python
163
+ 0 belong 0x170d0d0a python 3.5.2+ byte-compiled
164
+ !:mime application/x-bytecode.python
165
+ 0 belong 0x200d0d0a python 3.6 byte-compiled
166
+ !:mime application/x-bytecode.python
167
+ 0 belong 0x210d0d0a python 3.6 byte-compiled
168
+ !:mime application/x-bytecode.python
169
+ 0 belong 0x2a0d0d0a python 3.6 byte-compiled
170
+ !:mime application/x-bytecode.python
171
+ 0 belong 0x2b0d0d0a python 3.6 byte-compiled
172
+ !:mime application/x-bytecode.python
173
+ 0 belong 0x2c0d0d0a python 3.6 byte-compiled
174
+ !:mime application/x-bytecode.python
175
+ 0 belong 0x2d0d0d0a python 3.6 byte-compiled
176
+ !:mime application/x-bytecode.python
177
+ 0 belong 0x2f0d0d0a python 3.6 byte-compiled
178
+ !:mime application/x-bytecode.python
179
+ 0 belong 0x300d0d0a python 3.6 byte-compiled
180
+ !:mime application/x-bytecode.python
181
+ 0 belong 0x310d0d0a python 3.6 byte-compiled
182
+ !:mime application/x-bytecode.python
183
+ 0 belong 0x320d0d0a python 3.6 byte-compiled
184
+ !:mime application/x-bytecode.python
185
+ 0 belong 0x330d0d0a python 3.6 byte-compiled
186
+ !:mime application/x-bytecode.python
187
+ 0 belong 0x3e0d0d0a python 3.7 byte-compiled
188
+ !:mime application/x-bytecode.python
189
+ 0 belong 0x3f0d0d0a python 3.7 byte-compiled
190
+ !:mime application/x-bytecode.python
191
+
192
+ # magic 3392+ implements PEP 552: Deterministic pycs
193
+ 0 name pyc-pep552
194
+ # the flag field determines how .pyc validity is checked
195
+ >4 ulelong&1 0 timestamp-based,
196
+ >>8 uledate x .py timestamp: %s UTC,
197
+ >>12 ulelong x .py size: %d bytes
198
+ >4 ulelong&1 !0 hash-based, check-source flag
199
+ >>4 ulelong&2 0 unset,
200
+ >>4 ulelong&2 !0 set,
201
+ >>8 ulequad x hash: 0x%llx
202
+
203
+ # uleshort magic followed by \x0d\0xa
204
+ 2 string \x0d\x0a
205
+ # extra check: only two bits of flag field are currently used
206
+ >4 ulelong <0x4
207
+ # \x0d as part of magic should suffice till Python 3.14 (magic 3600)
208
+ >>1 ubyte 0x0d Byte-compiled Python module for
209
+ !:mime application/x-bytecode.python
210
+ # now look at the magic number to determine the version
211
+ >>>0 uleshort <3400 CPython 3.7,
212
+ >>>0 default x
213
+ >>>>0 uleshort <3420 CPython 3.8,
214
+ >>>>0 default x
215
+ >>>>>0 uleshort <3430 CPython 3.9,
216
+ >>>>>0 default x
217
+ >>>>>>0 uleshort <3450 CPython 3.10,
218
+ >>>>>>0 default x
219
+ >>>>>>>0 uleshort <3500 CPython 3.11,
220
+ >>>>>>>0 default x CPython 3.12 or newer,
221
+ >>>0 use pyc-pep552
222
+ >>0 uleshort 240 Byte-compiled Python module for PyPy3.7,
223
+ !:mime application/x-bytecode.python
224
+ >>>0 use pyc-pep552
225
+ >>0 uleshort 256 Byte-compiled Python module for PyPy3.8,
226
+ !:mime application/x-bytecode.python
227
+ >>>0 use pyc-pep552
228
+ >>0 uleshort 336 Byte-compiled Python module for PyPy3.9,
229
+ !:mime application/x-bytecode.python
230
+ >>>0 use pyc-pep552
231
+
232
+ 0 search/1/w #!\040/usr/bin/python Python script text executable
233
+ !:strength + 15
234
+ !:mime text/x-script.python
235
+ 0 search/1/w #!\040/usr/local/bin/python Python script text executable
236
+ !:strength + 15
237
+ !:mime text/x-script.python
238
+ 0 search/10/w #!\040/usr/bin/env\040python Python script text executable
239
+ !:strength + 15
240
+ !:mime text/x-script.python
241
+
242
+
243
+ # from module.submodule import func1, func2
244
+ 0 search/8192 import
245
+ >0 regex \^from[\040\t]+([A-Za-z0-9_]|\\.)+[\040\t]+import.*$ Python script text executable
246
+ !:strength + 15
247
+ !:mime text/x-script.python
248
+
249
+ # def __init__ (self, ...):
250
+ 0 search/4096 def\ __init__
251
+ >&0 search/64 self Python script text executable
252
+ !:strength + 15
253
+ !:mime text/x-script.python
254
+
255
+ # if __name__ == "__main__":
256
+ 0 search/4096 if\ __name__
257
+ >&0 search/64 '__main__' Python script text executable
258
+ >&0 search/64 "__main__" Python script text executable
259
+ !:strength + 15
260
+ !:mime text/x-script.python
261
+
262
+ # import module [as abrev]
263
+ 0 search/8192 import
264
+ >0 regex \^import\ [_[:alpha:]]+\ as\ [[:alpha:]][[:space:]]*$ Python script text executable
265
+ !:mime text/x-script.python
266
+
267
+ # comments
268
+ #0 search/4096 '''
269
+ #>&0 regex .*'''$ Python script text executable
270
+ #!:mime text/x-script.python
271
+
272
+ #0 search/4096 """
273
+ #>&0 regex .*"""$ Python script text executable
274
+ #!:mime text/x-script.python
275
+
276
+ # try:
277
+ # except: or finally:
278
+ # block
279
+ 0 search/4096 try:
280
+ >&0 regex \^[[:space:]]*except.*:$ Python script text executable
281
+ !:strength + 15
282
+ !:mime text/x-script.python
283
+ >&0 search/4096 finally: Python script text executable
284
+ !:mime text/x-script.python
285
+
286
+ # class name[(base classes,)]: [pass]
287
+ 0 search/8192 class
288
+ >0 regex \^class\ [_[:alpha:]]+(\\(.*\\))?(\ )*:([\ \t]+pass)?$ Python script text executable
289
+ !:strength + 15
290
+ !:mime text/x-script.python
291
+
292
+ # def name(*args, **kwargs):
293
+ 0 search/8192 def\
294
+ >0 regex \^[[:space:]]{0,50}def\ {1,50}[_a-zA-Z]{1,100}
295
+ >>&0 regex \\(([[:alpha:]*_,\ ]){0,255}\\):$ Python script text executable
296
+ !:strength + 15
297
+ !:mime text/x-script.python
298
+
299
+ # https://numpy.org/devdocs/reference/generated/numpy.lib.format.html
300
+ 0 string \223NUMPY NumPy data file
301
+ !:mime application/x-numpy-data
302
+ >6 byte x \b, version %d
303
+ >7 byte x \b.%d
304
+ #>8 leshort x \b, header length=%d
305
+ >10 string x \b, description %s