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,44 @@
1
+
2
+ #------------------------------------------------------------------------------
3
+ # $File: rinex,v 1.3 2011/04/04 21:12:03 christos Exp $
4
+ # rinex: file(1) magic for RINEX files
5
+ # http://igscb.jpl.nasa.gov/igscb/data/format/rinex210.txt
6
+ # ftp://cddis.gsfc.nasa.gov/pub/reports/formats/rinex300.pdf
7
+ # data for testing: ftp://cddis.gsfc.nasa.gov/pub/gps/data
8
+ 60 string RINEX
9
+ >80 search/256 XXRINEXB RINEX Data, GEO SBAS Broadcast
10
+ >>&32 string x \b, date %15.15s
11
+ >>5 string x \b, version %6.6s
12
+ !:mime rinex/broadcast
13
+ >80 search/256 XXRINEXD RINEX Data, Observation (Hatanaka comp)
14
+ >>&32 string x \b, date %15.15s
15
+ >>5 string x \b, version %6.6s
16
+ !:mime rinex/observation
17
+ >80 search/256 XXRINEXC RINEX Data, Clock
18
+ >>&32 string x \b, date %15.15s
19
+ >>5 string x \b, version %6.6s
20
+ !:mime rinex/clock
21
+ >80 search/256 XXRINEXH RINEX Data, GEO SBAS Navigation
22
+ >>&32 string x \b, date %15.15s
23
+ >>5 string x \b, version %6.6s
24
+ !:mime rinex/navigation
25
+ >80 search/256 XXRINEXG RINEX Data, GLONASS Navigation
26
+ >>&32 string x \b, date %15.15s
27
+ >>5 string x \b, version %6.6s
28
+ !:mime rinex/navigation
29
+ >80 search/256 XXRINEXL RINEX Data, Galileo Navigation
30
+ >>&32 string x \b, date %15.15s
31
+ >>5 string x \b, version %6.6s
32
+ !:mime rinex/navigation
33
+ >80 search/256 XXRINEXM RINEX Data, Meteorological
34
+ >>&32 string x \b, date %15.15s
35
+ >>5 string x \b, version %6.6s
36
+ !:mime rinex/meteorological
37
+ >80 search/256 XXRINEXN RINEX Data, Navigation
38
+ >>&32 string x \b, date %15.15s
39
+ >>5 string x \b, version %6.6s
40
+ !:mime rinex/navigation
41
+ >80 search/256 XXRINEXO RINEX Data, Observation
42
+ >>&32 string x \b, date %15.15s
43
+ >>5 string x \b, version %6.6s
44
+ !:mime rinex/observation
@@ -0,0 +1,45 @@
1
+ #------------------------------------------------------------------------------
2
+ # $File: ringdove,v 1.1 2022/08/16 12:04:30 christos Exp $
3
+ # ringdove: file(1) magic for RingdoveEDA data files
4
+
5
+ # librnd and global
6
+ 0 regex/128l ha:rnd-menu-v[0-9]+[\ \t\r\n]*[{] librnd menu system (lihata)
7
+ 0 regex/128l ha:rnd-menu-patch-v[0-9]+[\ \t\r\n]*[{] librnd menu patch (lihata)
8
+ 0 regex/128l ha:coraleda-project-v[0-9]+[\ \t\r\n]*[{] CoralEDA/Ringdove project file (lihata)
9
+ 0 regex/128l ha:ringdove-project-v[0-9]+[\ \t\r\n]*[{] Ringdove project file (lihata)
10
+
11
+ # pcb-rnd
12
+ 0 regex/128l ha:pcb-rnd-board-v[0-9]+[\ \t\r\n]*[{] pcb-rnd board file (lihata)
13
+ 0 regex/128l li:pcb-rnd-subcircuit-v[0-9]+[\ \t\r\n]*[{] pcb-rnd subcircuit/footprint file (lihata)
14
+ 0 regex/128l ha:pcb-rnd-buffer-v[0-9]+[\ \t\r\n]*[{] pcb-rnd paste buffer content (lihata)
15
+ 0 regex/128l li:pcb-rnd-conf-v[0-9]+[\ \t\r\n]*[{] pcb-rnd configuration (lihata)
16
+ 0 regex/128l ha:pcb-rnd-drc-query-v[0-9]+[\ \t\r\n]*[{] pcb-rnd drc query string (lihata)
17
+ 0 regex/128l li:pcb-rnd-font-v[0-9]+[\ \t\r\n]*[{] pcb-rnd vector font (lihata)
18
+ 0 regex/128l ha:pcb-rnd-log-v[0-9]+[\ \t\r\n]*[{] pcb-rnd message log dump (lihata)
19
+ 0 regex/128l ha:pcb-rnd-padstack-v[0-9]+[\ \t\r\n]*[{] pcb-rnd padstack (lihata)
20
+ 0 regex/128l li:pcb-rnd-view-list-v[0-9]+[\ \t\r\n]*[{] pcb-rnd view list (lihata)
21
+ 0 regex/128l li:view-list-v[0-9]+[\ \t\r\n]*[{] pcb-rnd view list (lihata)
22
+ 0 search Netlist(Freeze) pcb-rnd or gEDA/PCB netlist forward annotation action script
23
+
24
+ # sch-rnd (cschem data model)
25
+ 0 regex/128l li:cschem-buffer-v[0-9]+[\ \t\r\n]*[{] sch-rnd/cschem buffer content (lihata)
26
+ 0 regex/128l li:sch-rnd-conf-v[0-9]+[\ \t\r\n]*[{] sch-rnd configuration (lihata)
27
+ 0 regex/128l ha:std_devmap.v[0-9]+[\ \t\r\n]*[{] sch-rnd devmap (device mapping; lihata)
28
+ 0 regex/128l li:cschem-group-v[0-9]+[\ \t\r\n]*[{] sch-rnd/cschem group or symbol (lihata)
29
+ 0 regex/128l ha:cschem-sheet-v[0-9]+[\ \t\r\n]*[{] sch-rnd/cschem schematic sheet (lihata)
30
+
31
+ # tEDAx (modular format)
32
+ 0 regex/1l tEDAx[\ \t\r\n]v tEDAx (Trivial EDA eXchange)
33
+ >0 regex begin\ symbol\ v with schematic symbol
34
+ >0 regex begin\ board\ v with Printed Circuit Board
35
+ >0 regex begin\ route_req\ v with PCB routing request
36
+ >0 regex begin\ route_res\ v with PCB routing result
37
+ >0 regex begin\ camv_layer\ v with camv-rnd exported layer
38
+ >0 regex begin\ netlist\ v with netlist
39
+ >0 regex begin\ backann\ v with Ringdove EDA back annotation
40
+ >0 regex begin\ footprint\ v with PCB footprint
41
+ >0 regex begin\ drc\ v with PCB DRC script
42
+ >0 regex begin\ drc_query_rule\ v with pcb-rnd drc_query rules
43
+ >0 regex begin\ drc_query_def\ v with pcb-rnd drc_query value/config definitions
44
+ >0 regex begin\ etest\ v with PCB electric test
45
+
@@ -0,0 +1,52 @@
1
+
2
+ #------------------------------------------------------------------------------
3
+ # $File: rpi,v 1.3 2022/04/02 14:39:34 christos Exp $
4
+ # rpi: file(1) magic for Raspberry Pi images
5
+ -44 lelong 0
6
+ >4 lelong 0
7
+ >>8 lelong 1
8
+ >>12 lelong 4
9
+ >>>16 string 283x
10
+ >>>>20 lelong 1
11
+ >>>>>24 lelong 4
12
+ >>>>>>28 string DTOK
13
+ >>>>>>>32 lelong 44
14
+ >>>>>>>>36 lelong 4
15
+ >>>>>>>>>40 string RPTL Raspberry PI kernel image
16
+
17
+ -56 lelong 0
18
+ >4 lelong 0
19
+ >>8 lelong 1
20
+ >>12 lelong 4
21
+ >>>16 string 283x
22
+ >>>>20 lelong 1
23
+ >>>>>24 lelong 4
24
+ >>>>>>28 string DTOK
25
+ >>>>>>>32 lelong 1
26
+ >>>>>>>>36 lelong 4
27
+ >>>>>>>>>40 string DDTK8
28
+ >>>>>>>>>>48 lelong 4
29
+ >>>>>>>>>>>52 string RPTL Raspberry PI kernel image
30
+
31
+ # From: Joerg Jenderek
32
+ # URL: https://www.raspberrypi.com/documentation/computers/raspberry-pi.html
33
+ # #raspberry-pi-4-boot-eeprom
34
+ # Reference: https://github.com/raspberrypi/rpi-eeprom/blob/master/rpi-eeprom-config
35
+ # Note: start with same magic as for BIOS (ia32) ROM Extension handled by ./intel
36
+ # masked with MAGIC_MASK and then compared with MAGIC
37
+ 0 belong&0xFFffF00F 0x55aaF00F Raspberry PI EEPROM
38
+ #!:mime application/octet-stream
39
+ !:mime application/x-raspberry-eeprom
40
+ # like: pieeprom-2020-09-03.bin
41
+ !:ext bin
42
+ # a 32 bit offset to the next section like: 000184d4 000184c8 00018534 ... 0000bb84 0000bbd4 0000bbd4
43
+ >4 ubelong x \b, offset %8.8x
44
+ #>(4.L) ubelong x NEXT=%8.8x
45
+ # self.length
46
+ >8 ubelong !0 \b, length %x
47
+ # self.filename
48
+ >12 string >0 \b, "%s"
49
+ # length is zero
50
+ >8 ubelong =0
51
+ # if length is zero then 2nd section magic here can be zero; this means sections parsing done
52
+ >>8 ubelong !0 \b, 2nd MAGIC=%8.8x
@@ -0,0 +1,45 @@
1
+
2
+ #------------------------------------------------------------------------------
3
+ # $File: rpm,v 1.12 2013/01/11 16:45:23 christos Exp $
4
+ #
5
+ # RPM: file(1) magic for Red Hat Packages Erik Troan (ewt@redhat.com)
6
+ #
7
+ 0 belong 0xedabeedb RPM
8
+ !:mime application/x-rpm
9
+ >4 byte x v%d
10
+ >5 byte x \b.%d
11
+ >6 beshort 1 src
12
+ >6 beshort 0 bin
13
+ >>8 beshort 1 i386/x86_64
14
+ >>8 beshort 2 Alpha/Sparc64
15
+ >>8 beshort 3 Sparc
16
+ >>8 beshort 4 MIPS
17
+ >>8 beshort 5 PowerPC
18
+ >>8 beshort 6 68000
19
+ >>8 beshort 7 SGI
20
+ >>8 beshort 8 RS6000
21
+ >>8 beshort 9 IA64
22
+ >>8 beshort 10 Sparc64
23
+ >>8 beshort 11 MIPSel
24
+ >>8 beshort 12 ARM
25
+ >>8 beshort 13 MiNT
26
+ >>8 beshort 14 S/390
27
+ >>8 beshort 15 S/390x
28
+ >>8 beshort 16 PowerPC64
29
+ >>8 beshort 17 SuperH
30
+ >>8 beshort 18 Xtensa
31
+ >>8 beshort 255 noarch
32
+
33
+ #delta RPM Daniel Novotny (dnovotny@redhat.com)
34
+ 0 string drpm Delta RPM
35
+ !:mime application/x-rpm
36
+ >12 string x %s
37
+ >>8 beshort 11 MIPSel
38
+ >>8 beshort 12 ARM
39
+ >>8 beshort 13 MiNT
40
+ >>8 beshort 14 S/390
41
+ >>8 beshort 15 S/390x
42
+ >>8 beshort 16 PowerPC64
43
+ >>8 beshort 17 SuperH
44
+ >>8 beshort 18 Xtensa
45
+ >>10 string x %s
@@ -0,0 +1,7 @@
1
+
2
+ #------------------------------------------------------------------------------
3
+ # $File: rpmsg,v 1.1 2019/04/19 00:40:47 christos Exp $
4
+ # rpmsg: file(1) magic for restricted-permission messages (or "rights-protected" messages)
5
+ # see https://en.wikipedia.org/wiki/Rpmsg
6
+
7
+ 0 string \x76\xe8\x04\x60\xc4\x11\xe3\x86 rpmsg Restricted Permission Message
@@ -0,0 +1,11 @@
1
+
2
+ #------------------------------------------------------------------------------
3
+ # $File: rst,v 1.3 2020/04/27 01:50:36 christos Exp $
4
+ # rst: ReStructuredText http://docutils.sourceforge.net/rst.html
5
+ 0 search/256 \=\=
6
+ !:strength + 30
7
+ >&0 regex/256 \^[\=]+$
8
+ >>&0 search/512 :Author: ReStructuredText file
9
+ >>&0 default x
10
+ >>>&0 regex/512 \^\\.\\.[A-Za-z] ReStructuredText file
11
+ !:ext rst
@@ -0,0 +1,94 @@
1
+
2
+ #------------------------------------------------------------------------------
3
+ # $File: rtf,v 1.9 2020/12/12 20:01:47 christos Exp $
4
+ # rtf: file(1) magic for Rich Text Format (RTF)
5
+ #
6
+ # Duncan P. Simpson, D.P.Simpson@dcs.warwick.ac.uk
7
+ # Update: Joerg Jenderek
8
+ # URL: https://en.wikipedia.org/wiki/Rich_Text_Format
9
+ # Reference: http://www.snake.net/software/RTF/RTF-Spec-1.7.rtf
10
+ # http://www.kleinlercher.at/tools/Windows_Protocols/Word2007RTFSpec9.pdf
11
+ 0 string {\\rtf
12
+ # skip DROID fmt-355-signature-id-522.rtf by looking for valid version
13
+ >5 ubyte !0xAB
14
+ # skip also \ in DROID fmt-50-signature-id-158.rtf by looking for valid version
15
+ >>5 ubyte !0x5C Rich Text Format data
16
+ !:mime text/rtf
17
+ !:apple ????RTF
18
+ !:ext rtf
19
+ >>>0 use rtf-info
20
+ # display information like version, language and code page of RTF
21
+ 0 name rtf-info
22
+ # 1 mostly, 2 for newer Pocket Word documents, space for test like fdo78502.rtf, { for some urtf
23
+ >5 ubyte !0x7b \b, version %c
24
+ # The word for character set must precede any text or most other control words
25
+ >6 string \\mac \b, Apple Macintosh
26
+ >6 string \\pc
27
+ # control word \pca
28
+ >>9 ubyte =0x61 \b, IBM PS/2, code page 850
29
+ >>9 ubyte !0x61 \b, IBM PC, code page 437
30
+ # unknown character set or ANSI later after control words like
31
+ # \adeflang1025 \info \title \author \category \manager
32
+ # "Burow, Steffanie - Im Tal des Schneeleoparden.rtf"
33
+ #>6 search/105 \\ansi \b, ANSI
34
+ >6 search/502 \\ansi \b, ANSI
35
+ >6 default x \b, unknown character set
36
+ # look for explicit codepage keyword
37
+ # "Burow, Steffanie - Im Tal des Schneeleoparden.rtf"
38
+ #>5 search/110 \\ansicpg
39
+ >5 search/500 \\ansicpg
40
+ # skip unknown or buggy codepage string 0 like in fdo78502.rtf
41
+ >>&0 ubyte !0x30 \b, code page
42
+ # codepage string: 437~United States IBM, ..., 1252~WesternEuropean, ..., 57011~Punjabi
43
+ >>>&-1 string x %-.3s
44
+ # skip space or \ and display possible 4th digit of code page string
45
+ >>>&2 ubyte >0x2F
46
+ >>>>&-1 ubyte <0x3A \b%c
47
+ # possible 5th digit of code page string
48
+ >>>>>&0 ubyte >0x2F
49
+ >>>>>>&-1 ubyte <0x3A \b%c
50
+ # look again at version byte to use default clause
51
+ >5 ubyte x
52
+ # Default language ID for South Asian/Middle Eastern text
53
+ # language ID: 1025, ..., 1065~Persian, ..., 2057~English_UnitedKingdom, ..., 58380~French_NorthAfrica
54
+ # Readme-0.72-Persian.rtf
55
+ #>6 search/1 \\adeflang \b, default middle east language ID
56
+ >>6 search/497 \\adeflang \b, default middle east language ID
57
+ # https://docs.microsoft.com/en-us/openspecs/office_standards/ms-oe376/6c085406-a698-4e12-9d4d-c3b0ee3dbc4a
58
+ >>>&0 string x %.4s
59
+ # skip \ and NL and show possible 5th digit of language string
60
+ >>>&4 ubyte >0x2F
61
+ >>>>&-1 ubyte <0x3A \b%c
62
+ # else look for default language to be used when the \plain control word is encountered
63
+ >>6 default x
64
+ # "Burow, Steffanie - Im Tal des Schneeleoparden.rtf"
65
+ #>>>6 search/127 \\deflang
66
+ >>>6 search/505 \\deflang
67
+ >>>>&0 string >0 \b, default language ID %-.4s
68
+ # possible 5th digit of language string
69
+ >>>>&4 ubyte >0x2F
70
+ >>>>>&-1 ubyte <0x3A \b%c
71
+
72
+ # Reference: http://latex2rtf.sourceforge.net/rtfspec_63.html
73
+ # Note: no real world example found
74
+ 0 string {\\urtf Rich Text Format unicoded data
75
+ !:mime text/rtf
76
+ #!:apple ????RTF
77
+ !:ext rtf
78
+ >1 use rtf-info
79
+
80
+ # URL: https://en.wikipedia.org/wiki/Microsoft_Word
81
+ # Reference: http://fileformats.archiveteam.org/wiki/Microsoft_Word
82
+ # Note: called by TrID "Pocket Word document"
83
+ # by PlanMaker "Pocket Word-Handheld PC" for pwd
84
+ # by PlanMaker "Pocket Word-Pocket PC" for psw
85
+ 0 string {\\pwd Pocket Word document or template
86
+ # by SoftMaker Office http://extension.nirsoft.net/pwd
87
+ #!:mime application/msword
88
+ # https://reposcope.com/mimetype/application/x-pocket-word
89
+ !:mime application/x-pocket-word
90
+ # PWD for Handheld PC variant and PSW for Pocket PC variant
91
+ # PWT for template
92
+ !:ext pwd/psw/pwt
93
+ >0 use rtf-info
94
+
@@ -0,0 +1,55 @@
1
+
2
+ #------------------------------------------------------------------------------
3
+ # $File: ruby,v 1.10 2019/07/21 09:40:17 christos Exp $
4
+ # ruby: file(1) magic for Ruby scripting language
5
+ # URL: https://www.ruby-lang.org/
6
+ # From: Reuben Thomas <rrt@sc3d.org>
7
+
8
+ # Ruby scripts
9
+ 0 search/1/w #!\ /usr/bin/ruby Ruby script text executable
10
+ !:strength + 15
11
+ !:mime text/x-ruby
12
+ 0 search/1/w #!\ /usr/local/bin/ruby Ruby script text executable
13
+ !:strength + 15
14
+ !:mime text/x-ruby
15
+ 0 search/1 #!/usr/bin/env\ ruby Ruby script text executable
16
+ !:strength + 15
17
+ !:mime text/x-ruby
18
+ 0 search/1 #!\ /usr/bin/env\ ruby Ruby script text executable
19
+ !:strength + 15
20
+ !:mime text/x-ruby
21
+
22
+ # What looks like ruby, but does not have a shebang
23
+ # (modules and such)
24
+ # From: Lubomir Rintel <lkundrak@v3.sk>
25
+ 0 search/8192 require
26
+ >0 regex \^[[:space:]]*require[[:space:]]'[A-Za-z_/.]+'
27
+ >>0 regex def\ [a-z]|\ do$
28
+ >>>&0 regex \^[[:space:]]*end([[:space:]]+[;#].*)?$ Ruby script text
29
+ !:strength + 30
30
+ !:mime text/x-ruby
31
+ 0 regex \^[[:space:]]*(class|module)[[:space:]][A-Z]
32
+ >0 regex (modul|includ)e\ [A-Z]|def\ [a-z]
33
+ >>&0 regex \^[[:space:]]*end([[:space:]]+[;#].*)?$ Ruby script text
34
+ !:strength + 30
35
+ !:mime text/x-ruby
36
+ # Classes with no modules or defs, beats simple ASCII
37
+ 0 regex \^[[:space:]]*(class|module)[[:space:]][A-Z]
38
+ >&0 regex \^[[:space:]]*end([[:space:]]+[;#if].*)?$ Ruby script text
39
+ !:strength + 10
40
+ !:mime text/x-ruby
41
+ # Looks for function definition to balance python magic
42
+ # def name (args)
43
+ # end
44
+ 0 search/8192 def\
45
+ >0 regex \^[[:space:]]*def\ [a-z]|def\ [[:alpha:]]+::[a-z]
46
+ >>&0 regex \^[[:space:]]*end([[:space:]]+[;#].*)?$ Ruby script text
47
+ !:strength + 10
48
+ !:mime text/x-ruby
49
+
50
+ 0 search/8192 require
51
+ >0 regex \^[[:space:]]*require[[:space:]]'[A-Za-z_/.]+' Ruby script text
52
+ !:mime text/x-ruby
53
+ 0 search/8192 include
54
+ >0 regex \^[[:space:]]*include\ ([A-Z]+[a-z]*(::))+ Ruby script text
55
+ !:mime text/x-ruby
@@ -0,0 +1,21 @@
1
+
2
+ #------------------------------------------------------------------------------
3
+ # $File: rust,v 1.2 2022/11/18 15:58:15 christos Exp $
4
+ # Magic for Rust and related languages programs
5
+ #
6
+
7
+ # Rust compiler metadata
8
+ # From: Alexandre Iooss <erdnaxe@crans.org>
9
+ # URL: https://github.com/rust-lang/rust/blob/1.64.0/compiler/rustc_metadata/src/rmeta/mod.rs
10
+ 0 string rust\x00\x00\x00
11
+ >12 string \014rustc\x20 Rust compiler metadata
12
+ !:ext rmeta
13
+ >>7 byte x \b, version %d
14
+
15
+ # Rust incremental compilation metadata
16
+ # From: Alexandre Iooss <erdnaxe@crans.org>
17
+ # URL: https://github.com/rust-lang/rust/blob/1.64.0/compiler/rustc_incremental/src/persist/file_format.rs
18
+ 0 string RSIC
19
+ >4 uleshort =0 Rust incremental compilation metadata
20
+ !:ext bin
21
+ >>6 pstring x \b, rustc %s
polyfile/magic_defs/sc ADDED
@@ -0,0 +1,7 @@
1
+
2
+ #------------------------------------------------------------------------------
3
+ # $File: sc,v 1.6 2009/09/19 16:28:12 christos Exp $
4
+ # sc: file(1) magic for "sc" spreadsheet
5
+ #
6
+ 38 string Spreadsheet sc spreadsheet file
7
+ !:mime application/x-sc
@@ -0,0 +1,24 @@
1
+
2
+ #------------------------------------------------------------------------------
3
+ # $File: sccs,v 1.8 2020/06/20 21:32:52 christos Exp $
4
+ # sccs: file(1) magic for SCCS archives
5
+ #
6
+ # SCCS v4 archive structure:
7
+ # \001h01207
8
+ # \001s 00276/00000/00000
9
+ # \001d D 1.1 87/09/23 08:09:20 ian 1 0
10
+ # \001c date and time created 87/09/23 08:09:20 by ian
11
+ # \001e
12
+ # \001u
13
+ # \001U
14
+ # ... etc.
15
+ # Now '\001h' happens to be the same as the 3B20's a.out magic number (0550).
16
+ # *Sigh*. And these both came from various parts of the USG.
17
+ # Maybe we should just switch everybody from SCCS to RCS!
18
+ # Further, you can't just say '\001h0', because the five-digit number
19
+ # is a checksum that could (presumably) have any leading digit,
20
+ # Fortunately we have regular expression matching:
21
+ 0 string \001h
22
+ >2 regex [0-9][0-9][0-9][0-9][0-9]$
23
+ >>8 string \001s\040 SCCS v4 archive data
24
+ >2 string V6,sum= SCCS v6 archive data
@@ -0,0 +1,144 @@
1
+
2
+ #------------------------------------------------------------------------------
3
+ # $File: scientific,v 1.14 2023/04/29 17:28:09 christos Exp $
4
+ # scientific: file(1) magic for scientific formats
5
+ #
6
+ # From: Joe Krahn <krahn@niehs.nih.gov>
7
+
8
+ ########################################################
9
+ # CCP4 data and plot files:
10
+ 0 string MTZ\040 MTZ reflection file
11
+
12
+ 92 string PLOT%%84 Plot84 plotting file
13
+ >52 byte 1 , Little-endian
14
+ >55 byte 1 , Big-endian
15
+
16
+ ########################################################
17
+ # Electron density MAP/MASK formats
18
+
19
+ 0 string EZD_MAP NEWEZD Electron Density Map
20
+ 109 string MAP\040( Old EZD Electron Density Map
21
+
22
+ 0 string/c :-)\040Origin BRIX Electron Density Map
23
+ >170 string >0 , Sigma:%.12s
24
+ #>4 string >0 %.178s
25
+ #>4 addr x %.178s
26
+
27
+ 7 string 18\040!NTITLE XPLOR ASCII Electron Density Map
28
+ 9 string \040!NTITLE\012\040REMARK CNS ASCII electron density map
29
+
30
+ 208 string MAP\040 CCP4 Electron Density Map
31
+ # Assumes same stamp for float and double (normal case)
32
+ >212 byte 17 \b, Big-endian
33
+ >212 byte 34 \b, VAX format
34
+ >212 byte 68 \b, Little-endian
35
+ >212 byte 85 \b, Convex native
36
+
37
+ ############################################################
38
+ # X-Ray Area Detector images
39
+ 0 string R-AXIS4\ \ \ R-Axis Area Detector Image:
40
+ >796 lelong <20 Little-endian, IP #%d,
41
+ >>768 lelong >0 Size=%dx
42
+ >>772 lelong >0 \b%d
43
+ >796 belong <20 Big-endian, IP #%d,
44
+ >>768 belong >0 Size=%dx
45
+ >>772 belong >0 \b%d
46
+
47
+ 0 string RAXIS\ \ \ \ \ R-Axis Area Detector Image, Win32:
48
+ >796 lelong <20 Little-endian, IP #%d,
49
+ >>768 lelong >0 Size=%dx
50
+ >>772 lelong >0 \b%d
51
+ >796 belong <20 Big-endian, IP #%d,
52
+ >>768 belong >0 Size=%dx
53
+ >>772 belong >0 \b%d
54
+
55
+
56
+ 1028 string MMX\000\000\000\000\000\000\000\000\000\000\000\000\000 MAR Area Detector Image,
57
+ >1072 ulong >1 Compressed(%d),
58
+ >1100 ulong >1 %d headers,
59
+ >1104 ulong >0 %d x
60
+ >1108 ulong >0 %d,
61
+ >1120 ulong >0 %d bits/pixel
62
+
63
+ # Type: GEDCOM genealogical (family history) data
64
+ # From: Giuseppe Bilotta
65
+ # Update: Joerg Jenderek
66
+ # URL: http://fileformats.archiveteam.org/wiki/GEDCOM
67
+ # https://en.wikipedia.org/wiki/GEDCOM
68
+ # Reference: http://mark0.net/download/triddefs_xml.7z/defs/g/
69
+ # ged.trid.xml ged-utf8.trid.xml ged-utf16.trid.xml
70
+ # Note: called "GEDCOM Family History" by TrID and "Genealogical Data Communication (GEDCOM) Format" by DROID via PUID fmt/851
71
+ 0 search/1/c 0\ HEAD GEDCOM genealogy text
72
+ #!:mime text/plain
73
+ #!:mime application/x-gedcom
74
+ # https://www.iana.org/assignments/media-types/text/vnd.familysearch.gedcom
75
+ !:mime text/vnd.familysearch.gedcom
76
+ !:ext ged
77
+ # no gedcom sample found and ged suffix also used for other formats
78
+ #!:ext ged/gedcom
79
+ >&0 search 1\ GEDC
80
+ >>&0 search 2\ VERS version
81
+ # 4 5.0 5.3 5.4 5.5 5.5.1 5.5.5 5.6 7.0 or no version
82
+ >>>&1 string >\0 %s
83
+ # From: Phil Endecott <phil05@chezphil.org>
84
+ # 0\040HEAD as UTF-16 big endian without BOM
85
+ 0 string \000\060\000\040\000\110\000\105\000\101\000\104 GEDCOM genealogy text
86
+ !:mime text/vnd.familysearch.gedcom
87
+ !:ext ged
88
+ # look for VERS tag encoded as UTF-16 big endian
89
+ >12 search/0x65 V\0E\0R\0S version
90
+ # version like: 5.5.1
91
+ >>&2 bestring16 x %s
92
+ >>0 string x \b, UTF-16 (without BOM) big-endian text
93
+ # 0\040HEAD as UTF-16 little endian without BOM
94
+ 0 string \060\000\040\000\110\000\105\000\101\000\104\000 GEDCOM genealogy text
95
+ !:mime text/vnd.familysearch.gedcom
96
+ !:ext ged
97
+ # look for VERS tag encoded as UTF-16 lttle endian
98
+ >12 search/0x65 V\0E\0R\0S version
99
+ # version like: 5.5.1
100
+ >>&3 lestring16 x %s
101
+ >>2 string x \b, UTF-16 (without BOM) little-endian text
102
+ # Note: UTF-16 with BOM variants already described above by first test as "GEDCOM genealogy text"
103
+ # 0\040HEAD as UTF-16 big endian with BOM
104
+ #0 string \376\377\000\060\000\040\000\110\000\105\000\101\000\104 GEDCOM data
105
+ # 0\040HEAD as UTF-16 little endian with BOM
106
+ #0 string \377\376\060\000\040\000\110\000\105\000\101\000\104\000 GEDCOM data
107
+
108
+ # PDB: Protein Data Bank files
109
+ # Adam Buchbinder <adam.buchbinder@gmail.com>
110
+ #
111
+ # https://www.wwpdb.org/documentation/format32/sect2.html
112
+ # https://www.ch.ic.ac.uk/chemime/
113
+ #
114
+ # The PDB file format is fixed-field, 80 columns. From the spec:
115
+ #
116
+ # COLS DATA
117
+ # 1 - 6 "HEADER"
118
+ # 11 - 50 String(40)
119
+ # 51 - 59 Date
120
+ # 63 - 66 IDcode
121
+ #
122
+ # Thus, positions 7-10, 60-62 and 67-80 are spaces. The Date must be in the
123
+ # format DD-MMM-YY, e.g., 01-JAN-70, and the IDcode consists of numbers and
124
+ # uppercase letters. However, examples have been seen without the date string,
125
+ # e.g., the example on the chemime site.
126
+ 0 string HEADER\ \ \ \040
127
+ >&0 regex/1l \^.{40}
128
+ >>&0 regex/1l [0-9]{2}-[A-Z]{3}-[0-9]{2}\ {3}
129
+ >>>&0 regex/1ls [A-Z0-9]{4}.{14}$
130
+ >>>>&0 regex/1l [A-Z0-9]{4} Protein Data Bank data, ID Code %s
131
+ !:mime chemical/x-pdb
132
+ >>>>0 regex/1l [0-9]{2}-[A-Z]{3}-[0-9]{2} \b, %s
133
+
134
+ # Type: GDSII Stream file
135
+ 0 belong 0x00060002 GDSII Stream file
136
+ >4 byte 0x00
137
+ >>5 byte x version %d.0
138
+ >4 byte >0x00 version %d
139
+ >>5 byte x \b.%d
140
+
141
+ # Type: LXT (interLaced eXtensible Trace)
142
+ # chrysn <chrysn@fsfe.org>
143
+ 0 beshort 0x0138 interLaced eXtensible Trace (LXT) file
144
+ >2 beshort >0 (Version %u)
@@ -0,0 +1,6 @@
1
+
2
+ #------------------------------------------------------------------------------
3
+ # $File: securitycerts,v 1.4 2009/09/19 16:28:12 christos Exp $
4
+ 0 search/1 -----BEGIN\ CERTIFICATE------ RFC1421 Security Certificate text
5
+ 0 search/1 -----BEGIN\ NEW\ CERTIFICATE RFC1421 Security Certificate Signing Request text
6
+ 0 belong 0xedfeedfe Sun 'jks' Java Keystore File data
@@ -0,0 +1,24 @@
1
+ # Type: SE Linux policy modules *.pp reference policy
2
+ # for Fedora 5 to 9, RHEL5, and Debian Etch and Lenny.
3
+ # URL: https://doc.coker.com.au/computers/selinux-magic
4
+ # From: Russell Coker <russell@coker.com.au>
5
+
6
+ 0 lelong 0xf97cff8f SE Linux modular policy
7
+ >4 lelong x version %d,
8
+ >8 lelong x %d sections,
9
+ >>(12.l) lelong 0xf97cff8d
10
+ >>>(12.l+27) lelong x mod version %d,
11
+ >>>(12.l+31) lelong 0 Not MLS,
12
+ >>>(12.l+31) lelong 1 MLS,
13
+ >>>(12.l+23) lelong 2
14
+ >>>>(12.l+47) string >\0 module name %s
15
+ >>>(12.l+23) lelong 1 base
16
+
17
+ 1 string policy_module( SE Linux policy module source
18
+ 2 string policy_module( SE Linux policy module source
19
+
20
+ 0 string ##\ <summary> SE Linux policy interface source
21
+
22
+ #0 search gen_context( SE Linux policy file contexts
23
+
24
+ #0 search gen_sens( SE Linux policy MLS constraints source
@@ -0,0 +1,37 @@
1
+
2
+ #------------------------------------------------------------------------------
3
+ # $File: sendmail,v 1.12 2022/10/31 13:22:26 christos Exp $
4
+ # sendmail: file(1) magic for sendmail config files
5
+ #
6
+ # XXX - byte order?
7
+ #
8
+ # Update: Joerg Jenderek
9
+ # GRR: this test is too general as it catches also
10
+ # READ.ME.FIRST.AWP Sendmail frozen configuration
11
+ # - version ====|====|====|====|====|====|====|====|====|====|====|====|===
12
+ # Email_23_f217153422.ts Sendmail frozen configuration
13
+ # - version \330jK\354
14
+ 0 byte 046
15
+ # https://www.sendmail.com/sm/open_source/docs/older_release_notes/
16
+ # freezed configuration file (dbm format?) created from sendmail.cf with -bz
17
+ # by older sendmail. til version 8.6 support for frozen configuration files is removed
18
+ # valid version numbers look like "7.14.4" and should be similar to output of commands
19
+ # "sendmail -d0 -bt < /dev/null |grep -i Version" or "egrep '^DZ' /etc/sendmail.cf"
20
+ >16 regex/s =^[0-78][0-9.]{4} Sendmail frozen configuration
21
+ # normally only /etc/sendmail.fc or /var/adm/sendmail/sendmail.fc
22
+ !:ext fc
23
+ >>16 string >\0 - version %s
24
+ 0 short 0x271c
25
+ # look for valid version number
26
+ >16 regex/s =^[0-78][0-9.]{4} Sendmail frozen configuration
27
+ !:ext fc
28
+ >>16 string >\0 - version %s
29
+
30
+ #------------------------------------------------------------------------------
31
+ # sendmail: file(1) magic for sendmail m4(1) files
32
+ #
33
+ # From Hendrik Scholz <hendrik@scholz.net>
34
+ # i.e. files in /usr/share/sendmail/cf/
35
+ #
36
+ 0 string divert(-1)\n sendmail m4 text file
37
+
@@ -0,0 +1,42 @@
1
+
2
+ #------------------------------------------------------------------------------
3
+ # $File: sequent,v 1.14 2019/04/19 00:42:27 christos Exp $
4
+ # sequent: file(1) magic for Sequent machines
5
+ #
6
+ # Sequent information updated by Don Dwiggins <atsun!dwiggins>.
7
+ # For Sequent's multiprocessor systems (incomplete).
8
+ 0 lelong 0x00ea BALANCE NS32000 .o
9
+ >16 lelong >0 not stripped
10
+ >124 lelong >0 version %d
11
+ 0 lelong 0x10ea BALANCE NS32000 executable (0 @ 0)
12
+ >16 lelong >0 not stripped
13
+ >124 lelong >0 version %d
14
+ 0 lelong 0x20ea BALANCE NS32000 executable (invalid @ 0)
15
+ >16 lelong >0 not stripped
16
+ >124 lelong >0 version %d
17
+ 0 lelong 0x30ea BALANCE NS32000 standalone executable
18
+ >16 lelong >0 not stripped
19
+ >124 lelong >0 version %d
20
+ #
21
+ # Symmetry information added by Jason Merrill <jason@jarthur.claremont.edu>.
22
+ # Symmetry magic nums will not be reached if DOS COM comes before them;
23
+ # byte 0xeb is matched before these get a chance.
24
+ 0 leshort 0x12eb SYMMETRY i386 .o
25
+ >16 lelong >0 not stripped
26
+ >124 lelong >0 version %d
27
+ 0 leshort 0x22eb SYMMETRY i386 executable (0 @ 0)
28
+ >16 lelong >0 not stripped
29
+ >124 lelong >0 version %d
30
+ 0 leshort 0x32eb SYMMETRY i386 executable (invalid @ 0)
31
+ >16 lelong >0 not stripped
32
+ >124 lelong >0 version %d
33
+ # https://en.wikipedia.org/wiki/Sequent_Computer_Systems
34
+ # below test line conflicts with MS-DOS 2.11 floppies and Acronis loader
35
+ #0 leshort 0x42eb SYMMETRY i386 standalone executable
36
+ 0 leshort 0x42eb
37
+ # skip unlike negative version
38
+ >124 lelong >-1
39
+ # assuming version 28867614 is very low probable
40
+ >>124 lelong !28867614 SYMMETRY i386 standalone executable
41
+ >>>16 lelong >0 not stripped
42
+ >>>124 lelong >0 version %d