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,449 @@
1
+
2
+ #------------------------------------------------------------------------------
3
+ # $File: fonts,v 1.51 2022/08/16 11:16:39 christos Exp $
4
+ # fonts: file(1) magic for font data
5
+ #
6
+ 0 search/1 FONT ASCII vfont text
7
+ 0 short 0436 Berkeley vfont data
8
+ 0 short 017001 byte-swapped Berkeley vfont data
9
+
10
+ # PostScript fonts (must precede "printer" entries), quinlan@yggdrasil.com
11
+ # Modified by: Joerg Jenderek
12
+ # URL: https://en.wikipedia.org/wiki/PostScript_fonts
13
+ # http://fileformats.archiveteam.org/wiki/Adobe_Type_1
14
+ # Reference: http://mark0.net/download/triddefs_xml.7z
15
+ # defs/p/pfb.trid.xml
16
+ # Note: PFB stands for Printer Font Binary
17
+ 0 string %!PS-AdobeFont-1. PostScript Type 1 font text
18
+ #!:mime font/x-postscript-pfb
19
+ #!:ext pfb
20
+ >20 string >\0 (%s)
21
+ # http://www.nationalarchives.gov.uk/pronom/fmt/525
22
+ 6 string %!PS-AdobeFont-1.
23
+ # skip DROID fmt-525-signature-id-816.pfb by checking for content after header
24
+ >24 ubyte x PostScript Type 1 font program data
25
+ #!:mime application/octet-stream
26
+ !:mime font/x-postscript-pfb
27
+ !:ext pfb
28
+ # often followed by colon (3Ah) and space (20h) and font name like: DarkGardenMK LetterGothic
29
+ >>24 ubyte =0x3A
30
+ >>>26 string >\0 (%s)
31
+ # some times instead of colon %%CreationDate: and "font name" later
32
+ >>24 ubyte !0x3A
33
+ # font name directive followed by def like: c0633bt_.pfb
34
+ >>>25 search/1247 /FontName\040/
35
+ # show font name in parentheses like: Frankfurt Lithos CharterBT-BoldItalic Courier10PitchBT-Bold
36
+ >>>>&0 regex [A-Za-z0-9-]+ (%s)
37
+ # http://cd.textfiles.com/maxfonts/ATM/M/MIRROR__.PFB
38
+ 6 string %PS-AdobeFont-1. PostScript Type 1 font program data
39
+ !:mime font/x-postscript-pfb
40
+ !:ext pfb
41
+ # font name like: Times-Mirror
42
+ >25 string >\0 (%s)
43
+ 0 string %!FontType1 PostScript Type 1 font program data
44
+ #!:mime font/x-postscript-pfb
45
+ #!:ext pfb
46
+ 6 string %!FontType1 PostScript Type 1 font program data
47
+ #!:mime application/octet-stream
48
+ !:mime font/x-postscript-pfb
49
+ !:ext pfb
50
+ # font name like: CaslonOpenFace FetteFraktur Kaufmann Linotext MesozoicGothic Old-Town
51
+ >23 string >\0 (%s)
52
+ # http://cd.textfiles.com/maxfonts/ATM/P/PLAYBI.PFB
53
+ 230 string %!FontType1 PostScript Type 1 font program data
54
+ !:mime font/x-postscript-pfb
55
+ !:ext pfb
56
+ # font name like: Playbill
57
+ >247 string >\0 (%s)
58
+ 0 string %!PS-Adobe-3.0\ Resource-Font PostScript Type 1 font text
59
+ #!:mime font/x-postscript-pfb
60
+ #!:ext pfb
61
+
62
+ # Summary: PostScript Type 1 Printer Font Metrics
63
+ # URL: https://en.wikipedia.org/wiki/PostScript_fonts
64
+ # Reference: https://partners.adobe.com/public/developer/en/font/5178.PFM.pdf
65
+ # Modified by: Joerg Jenderek
66
+ # Note: moved from ./msdos magic
67
+ # dfVersion 256=0100h
68
+ 0 uleshort 0x0100
69
+ # GRR: line above is too general as it catches also TrueType font,
70
+ # raw G3 data FAX, WhatsApp encrypted and Panorama database
71
+ # dfType 129=0081h
72
+ >66 uleshort 0x0081
73
+ # dfVertRes 300=012Ch not needed as additional test
74
+ #>>70 uleshort 0x012c
75
+ # dfHorizRes 300=012Ch
76
+ #>>>72 uleshort 0x012c
77
+ # dfDriverInfo points to postscript information section
78
+ >>(101.l) string/c Postscript Printer Font Metrics
79
+ # above labeled "PFM data" by ./msdos (version 5.28) or "Adobe Printer Font Metrics" by TrID
80
+ !:mime application/x-font-pfm
81
+ # AppleShare Print Server
82
+ #!:apple ASPS????
83
+ !:ext pfm
84
+ # dfCopyright 60 byte null padded Copyright string. uncomment it to get old looking
85
+ #>>>6 string >\060 - %-.60s
86
+ # dfDriverInfo
87
+ >>>139 ulelong >0
88
+ # often abbreviated and same as filename
89
+ >>>>(139.l) string x %s
90
+ # dfSize
91
+ >>>2 ulelong x \b, %d bytes
92
+ # dfFace 210=D2h 9Eh
93
+ >>>105 ulelong >0
94
+ # Windows font name
95
+ >>>>(105.l) string x \b, %s
96
+ # dfItalic
97
+ >>>80 ubyte 1 italic
98
+ # dfUnderline
99
+ >>>81 ubyte 1 underline
100
+ # dfStrikeOut
101
+ >>>82 ubyte 1 strikeout
102
+ # dfWeight 400=0x0190 300=0x012c 500=0x01f4 600=0x0258 700=0x02bc
103
+ >>>83 uleshort >699 bold
104
+ # dfPitchAndFamily 16 17 48 49 64 65
105
+ >>>90 ubyte 16 serif
106
+ >>>90 ubyte 17 serif proportional
107
+ #>>>90 ubyte 48 other
108
+ >>>90 ubyte 49 proportional
109
+ >>>90 ubyte 64 script
110
+ >>>90 ubyte 65 script proportional
111
+
112
+ # X11 font files in SNF (Server Natural Format) format
113
+ # updated by Joerg Jenderek at Feb 2013 and Nov 2021
114
+ # http://computer-programming-forum.com/51-perl/8f22fb96d2e34bab.htm
115
+ # URL: http://fileformats.archiveteam.org/wiki/SNF
116
+ # Reference: https://cgit.freedesktop.org/xorg/lib/libXfont/tree/src/bitmap/snfstr.h
117
+ 0 belong 00000004
118
+ # version2 same as version1 in struct _snfFontInfo
119
+ >104 belong 00000004 X11 SNF font data, MSB first
120
+ # GRR: line above is too general as it catches also DEGAS low-res bitmap like:
121
+ # http://cd.textfiles.com/geminiatari/FILES/GRAPHICS/ANIMAT/SPID_PAT/BIGSPID.PI1
122
+ !:mime application/x-font-sfn
123
+ !:ext snf
124
+ # GRR: line below is too general as it catches also Xbase index file t3-CHAR.NDX
125
+ 0 lelong 00000004
126
+ >104 lelong 00000004 X11 SNF font data, LSB first
127
+ !:mime application/x-font-sfn
128
+ # Reference: http://mark0.net/download/triddefs_xml.7z/defs/s/snf-x11-lsb.trid.xml
129
+ !:ext snf
130
+
131
+ # X11 Bitmap Distribution Format, from Daniel Quinlan (quinlan@yggdrasil.com)
132
+ 0 search/1 STARTFONT\ X11 BDF font text
133
+
134
+ # From: Joerg Jenderek
135
+ # URL: https://grub.gibibit.com/New_font_format
136
+ # Reference: util/grub-mkfont.c
137
+ # include/grub/fontformat.h
138
+ # FONT_FORMAT_SECTION_NAMES_FILE
139
+ 0 string FILE
140
+ # FONT_FORMAT_PFF2_MAGIC
141
+ >8 string PFF2
142
+ # leng 4 only at the moment
143
+ >>4 ubelong 4
144
+ # FONT_FORMAT_SECTION_NAMES_FONT_NAME
145
+ >>>12 string NAME GRUB2 font
146
+ !:mime application/x-font-pf2
147
+ !:ext pf2
148
+ # length of font_name
149
+ >>>>16 ubelong >0
150
+ # font_name
151
+ >>>>>20 string >\0 "%-s"
152
+
153
+ # X11 fonts, from Daniel Quinlan (quinlan@yggdrasil.com)
154
+ # PCF must come before SGI additions ("MIPSEL MIPS-II COFF" collides)
155
+ 0 string \001fcp X11 Portable Compiled Font data,
156
+ >12 lelong ^0x08 bit: LSB,
157
+ >12 lelong &0x08 bit: MSB,
158
+ >12 lelong ^0x04 byte: LSB first
159
+ >12 lelong &0x04 byte: MSB first
160
+ 0 string D1.0\015 X11 Speedo font data
161
+
162
+ #------------------------------------------------------------------------------
163
+ # FIGlet fonts and controlfiles
164
+ # From figmagic supplied with Figlet version 2.2
165
+ # "David E. O'Brien" <obrien@FreeBSD.ORG>
166
+ 0 string flf FIGlet font
167
+ >3 string >2a version %-2.2s
168
+ 0 string flc FIGlet controlfile
169
+ >3 string >2a version %-2.2s
170
+
171
+ # libGrx graphics lib fonts, from Albert Cahalan (acahalan@cs.uml.edu)
172
+ # Used with djgpp (DOS Gnu C++), sometimes Linux or Turbo C++
173
+ 0 belong 0x14025919 libGrx font data,
174
+ >8 leshort x %dx
175
+ >10 leshort x \b%d
176
+ >40 string x %s
177
+ # Misc. DOS VGA fonts, from Albert Cahalan (acahalan@cs.uml.edu)
178
+ # Update: Joerg Jenderek
179
+ # URL: http://fileformats.archiveteam.org/wiki/CPI
180
+ # Reference: http://www.delorie.com/djgpp/doc/rbinter/it/58/17.html
181
+ 0 belong 0xff464f4e DOS code page font data collection
182
+ !:mime font/x-dos-cpi
183
+ !:ext cpi
184
+ 0 string \x7fDRFONT DR-DOS code page font data collection
185
+ !:mime font/x-drdos-cpi
186
+ !:ext cpi
187
+ 7 belong 0x00454741 DOS code page font data
188
+ 7 belong 0x00564944 DOS code page font data (from Linux?)
189
+ 4098 string DOSFONT DOSFONT2 encrypted font data
190
+
191
+ # From: Joerg Jenderek
192
+ # URL: http://fileformats.archiveteam.org/wiki/GEM_bitmap_font
193
+ # Reference: http://cd.textfiles.com/ataricompendium/BOOK/HTML/APPENDC.HTM#cnt
194
+ #
195
+ # usual case with lightening mask and skewing mask 5555h~UU
196
+ #62 ulelong 0x55555555
197
+ # skip cl8m8ocofedso.testfile by looking for face size lower/equal 72
198
+ #>2 uleshort <73
199
+ #>>0 use gdos-font
200
+ # BOX18.GFT COWBOY30.GFT ROYALK30.GFT
201
+ #62 ulelong 0
202
+ # skip ISO 9660 CD-ROM ./filesystem by looking for low positive face size
203
+ #>2 uleshort >2
204
+ # skip DOS 2.0 backup id file ./msdos by looking for face size lower/equal 72
205
+ #>>2 uleshort <73
206
+ # skip MS oem.hlp, some Windows ICO ./msdos by looking for valid long name like WYE
207
+ #>>>4 ulelong >0x001F1f1F
208
+ # skip Microsoft WinWord 2.0 ./msdos by looking for positive offset to font data
209
+ #>>>>76 ulelong >83
210
+ #>>>>>0 use gdos-font
211
+ 0 name gdos-font
212
+ >0 uleshort x GEM GDOS font
213
+ !:mime application/x-font-gdos
214
+ # also .eps found like AA070GEP.EPS AI360GEP.EPS
215
+ !:ext fnt/gtf
216
+ # font name like Big&Tall, Celtic #s, Courier, University Bold, WYE
217
+ >4 string x %.32s
218
+ # face size in points 3-72 SLSS03CG.FNT H1CELT72.FNT
219
+ >2 uleshort x %u
220
+ # face ID (must be unique)
221
+ >0 uleshort x \b, ID %#4.4x
222
+ # lowest character index in face (4 but usually 32 for disk-loaded fonts)
223
+ #>36 uleshort !32 \b, unusual character index %u
224
+ # width of the widest character like 0 8 10 12 16 24 32
225
+ #>50 uleshort x \b, %u char width
226
+ # width of the widest character cell like 8 11 12 14 15 16 33 67
227
+ #>52 uleshort x \b, %u cell width
228
+ # thickening size in pixel like 0 1 2 3 4 5 6 7 8
229
+ #>58 uleshort x \b, %u thick
230
+ # lightening mask to eliminate pixels, usually 5555h
231
+ >62 uleshort !0x5555 \b, lightening mask %#x
232
+ # skewing mask to determine when to perform additional rotation when skewing, usually 5555h
233
+ >64 uleshort !0x5555 \b, skewing mask %#x
234
+ # offset to optional horizontal offset table 0 58h~88 5eh 252h
235
+ #>68 ulelong x \b, %#x horizontal table offset
236
+ # offset of character offset table 54h for many *.GFT 55h 58h 5Eh 120h 1D4h 202h 220h
237
+ #>72 ulelong x \b, %#x coffset
238
+ # offset to font data like 116h 118h 158 20Ah 20Eh
239
+ >76 ulelong x \b, %#x foffset
240
+ # form width in bytes like 58 67 156 190 227 317 345
241
+ #>80 uleshort x \b, %u fwidth
242
+ # form height in bytes like 4 8 11 17 26 56 70 90 120 146 150
243
+ #>82 uleshort x \b, %u fheight
244
+ # pointer to the next font like 0 10000h 20000h 30000h 40000h 60000h 80000h E0000h D0000h
245
+ #>84 ulelong x \b, %#x noffset
246
+
247
+ # downloadable fonts for browser (prints type) anthon@mnt.org
248
+ # https://tools.ietf.org/html/rfc3073
249
+ 0 string PFR1 Portable Font Resource font data (new)
250
+ >102 string >0 \b: %s
251
+ 0 string PFR0 Portable Font Resource font data (old)
252
+ >4 beshort >0 version %d
253
+
254
+ # True Type fonts
255
+ # Modified by: Joerg Jenderek
256
+ # URL: https://en.wikipedia.org/wiki/TrueType
257
+ # Reference: https://developer.apple.com/fonts/TrueType-Reference-Manual/
258
+ #
259
+ # sfnt version "typ1" used by some Apple, but no example found
260
+ 0 string typ1
261
+ >0 use sfnt-font
262
+ >0 use sfnt-names
263
+ # sfnt version "true" used by some Apple
264
+ 0 string true
265
+ >0 use sfnt-font
266
+ >0 use sfnt-names
267
+ # GRR: below test is too general
268
+ # sfnt version often 0x00010000
269
+ 0 string \000\001\000\000
270
+ >0 use sfnt-font
271
+ >0 use sfnt-names
272
+ # validate and display sfnt font data like number of tables
273
+ 0 name sfnt-font
274
+ # file 5.30 version assumes 00FFh as maximal number of tables
275
+ #>4 ubeshort <0x0100
276
+ # maximal 27 tables found like in Skia.ttf
277
+ # 46 different table names mentioned on Apple specification
278
+ # skip 1st sequence of DOS 2 backup with path separator (\~92 or /~47) misinterpreted as table number
279
+ >4 ubeshort <47
280
+ # skip bad examples with garbage table names like in a5.show HYPERC MAC
281
+ # tag names consist of up to four characters padded with spaces at end like
282
+ # BASE DSIG OS/2 Zapf acnt glyf cvt vmtx xref ...
283
+ >>12 regex/4l \^[A-Za-z][A-Za-z][A-Za-z/][A-Za-z2\ ]
284
+ #>>>0 ubelong x \b, sfnt version %#x
285
+ >>>0 ubelong !0x4f54544f TrueType
286
+ !:mime font/sfnt
287
+ !:apple ????tfil
288
+ # .ttf for TrueType font
289
+ # EUDC.tte created by privat character editor %WINDIR%\system32\eudcedit.exe
290
+ !:ext ttf/tte
291
+ # sfnt version 4F54544Fh~OTTO
292
+ >>>0 ubelong =0x4f54544f OpenType
293
+ !:mime font/otf
294
+ !:apple ????OTTO
295
+ !:ext otf
296
+ >>>0 ubelong x Font data
297
+ # DSIG=44454947h table name implies a digitally signed font
298
+ # search range = number of tables * 16 =< maximal number of tables * 16 = 27 * 16 = 432
299
+ >>>12 search/432 DSIG \b, digitally signed
300
+ >>>4 ubeshort x \b, %d tables
301
+ # minimal 9 tables found like in NISC18030.ttf
302
+ #>>>4 ubeshort <10 TMIN
303
+ #>>>4 ubeshort >24 TBIG
304
+ # table directory entries
305
+ >>>12 string x \b, 1st "%4.4s"
306
+
307
+ # search and display 1st name in sfnt font which is often copyright text
308
+ # does not work inside font collections
309
+ 0 name sfnt-names
310
+ # search for naming table
311
+ >12 search/432/s name
312
+ # biggest offset 0x0100bd28 like Windows10 Fonts\simsunb.ttf
313
+ #>>>>&8 ubelong >0x0100bd27 BIGGEST OFFSET
314
+ >>&8 ubelong >0x00100000
315
+ # offset of name table
316
+ >>>&-4 ubelong x \b, name offset %#x
317
+ # GRR: pointer to name table only works if offset ~< FILE_BYTES_MAX = 100000h defined in src\file.h
318
+ >>&8 ubelong <0x00100000
319
+ >>>&-16 ubelong x
320
+ # name table
321
+ >>>>(&8.L) ubequad x
322
+ # invalid format selector
323
+ #>>>>>&-8 ubeshort !0 \b, invalid selector %x
324
+ # minimal 3 name records found like in c:\Program Files (x86)\Tesseract-OCR\tessdata\pdf.ttf
325
+ # maximal 1227 name records found like in Apple Chancery.ttf
326
+ #>>>>>&-6 ubeshort <0x4 mincount
327
+ #>>>>>&-6 ubeshort >130 maxcount
328
+ >>>>>&-6 ubeshort x \b, %d names
329
+ # offset to start of string storage from start of table
330
+ #>>>>>&-4 ubeshort x \b, record offset %d
331
+ # 1st name record
332
+ # string offset from start of storage area
333
+ #>>>>>&8 ubeshort x \b, string offset %d
334
+ # string length
335
+ #>>>>>&6 ubeshort x \b, string length %d
336
+ # minimal name string 7 like in c:\Program Files (x86)\Kodi\addons\webinterface.default\lib\video-js\font\VideoJS.ttf
337
+ # also found 0 like in SWZCONLN.TTF
338
+ #>>>>>&6 ubeshort <8 MIN STRING
339
+ # maximal name string 806 like in c:\Windows\Fonts\palabi.ttf
340
+ #>>>>>&6 ubeshort >805 MAX STRING
341
+ # platform identifier: 0~Apple Unicode, 1~Macintosh, 3~Microsoft
342
+ #>>>>>&-2 ubeshort >3 BAD PLATFORM
343
+ >>>>>&-2 ubeshort 0 \b, Unicode
344
+ >>>>>&-2 ubeshort 1 \b, Macintosh
345
+ >>>>>&-2 ubeshort 3 \b, Microsoft
346
+ # languageID (0~english Macintosh, 0409h~english Microsoft, ...)
347
+ >>>>>&2 ubeshort >0 \b, language %#x
348
+ # name identifiers
349
+ # often 0~copyright, 1~font, 2~font subfamily, 5~version, 13~license, 19~sample, ...
350
+ >>>>>&4 ubeshort >0 \b, type %d string
351
+ # platform specific encoding:
352
+ # 0~undefined character set, 1~UGL set with Unicode, 3~Unicode 2.0 BMP only, 4~Unicode 2.0
353
+ #>>>>>&0 ubeshort x \b, %d encoding
354
+ >>>>>&0 ubeshort 0
355
+ # handle only name string offset 0 because do not know how to add 2 relative offsets
356
+ >>>>>>&6 ubeshort 0
357
+ >>>>>>>&(&-14.S-18) ubyte !0
358
+ # GRR: instead 806 only first MAXstring = 96 characters are displayed as defined in src\file.h
359
+ # often copyright string that starts like \251 2006 The Monotype Corporation
360
+ >>>>>>>>&-1 string x \b, %-11.96s
361
+ # test for unicode string
362
+ >>>>>>>&(&-14.S-18) ubyte 0
363
+ >>>>>>>>&0 lestring16 x \b, %-11.96s
364
+ # unicode encoding
365
+ >>>>>&0 ubeshort >0
366
+ >>>>>>&6 ubeshort 0
367
+ >>>>>>>&(&-14.S-17) lestring16 x \b, %-11.96s
368
+
369
+ 0 string \007\001\001\000Copyright\ (c)\ 199 Adobe Multiple Master font
370
+ 0 string \012\001\001\000Copyright\ (c)\ 199 Adobe Multiple Master font
371
+
372
+ # TrueType/OpenType font collections (.ttc)
373
+ # URL: https://en.wikipedia.org/wiki/OpenType
374
+ # https://www.microsoft.com/typography/otspec/otff.htm
375
+ # Modified by: Joerg Jenderek
376
+ # Note: container for TrueType, OpenType font
377
+ 0 string ttcf
378
+ # skip ASCII text
379
+ >4 ubyte 0
380
+ # sfnt version often 0x00010000 of 1st table is TrueType
381
+ >>(12.L) ubelong !0x4f54544f TrueType
382
+ !:mime font/ttf
383
+ !:apple ????tfil
384
+ !:ext ttc
385
+ # sfnt version 4F54544Fh~OTTO of 1st table is OpenType font
386
+ >>(12.L) ubelong =0x4f54544f OpenType
387
+ !:mime font/otf
388
+ !:apple ????OTTO
389
+ # no example found for otc
390
+ !:ext ttc/otc
391
+ >>4 ubyte x font collection data
392
+ #!:mime font/collection
393
+ # TCC version
394
+ >>4 belong 0x00010000 \b, 1.0
395
+ >>4 belong 0x00020000 \b, 2.0
396
+ >>8 ubelong >0 \b, %d fonts
397
+ # array offset size = fonts * offsetsize = fonts * 4
398
+ >>(8.L*4) ubequad x
399
+ # 0x44454947 = 'DSIG'
400
+ >>>&4 belong 0x44534947 \b, digitally signed
401
+ # offset to 1st font
402
+ >>12 ubelong x \b, at %#x
403
+ # point to 1st font that starts with sfnt version
404
+ >>(12.L) use sfnt-font
405
+
406
+ # Opentype font data from Avi Bercovich
407
+ 0 string OTTO OpenType font data
408
+ !:mime application/vnd.ms-opentype
409
+
410
+ # From: Alex Myczko <alex@aiei.ch>
411
+ 0 string SplineFontDB: Spline Font Database
412
+ !:mime application/vnd.font-fontforge-sfd
413
+ >14 string x version %s
414
+
415
+ # EOT
416
+ 0x40 string \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0
417
+ >0x22 string LP Embedded OpenType (EOT)
418
+ # workaround until there's lepstring16
419
+ # >>0x52 lepstring16/h >\0 \b, %s family
420
+ >>0x52 short !0
421
+ >>>0x54 lestring16 x \b, %s family
422
+ !:mime application/vnd.ms-fontobject
423
+
424
+ # Web Open Font Format (.woff)
425
+ 0 name woff
426
+ >4 belong 0x00010000 \b, TrueType
427
+ >4 belong 0x4F54544F \b, CFF
428
+ >4 belong 0x74727565 \b, TrueType
429
+ >4 default x
430
+ >>4 belong x \b, flavor %d
431
+ >8 belong x \b, length %d
432
+ #>12 beshort x \b, numTables %d
433
+ #>14 beshort x \b, reserved %d
434
+ #>16 belong x \b, totalSfntSize %d
435
+
436
+ # https://www.w3.org/TR/WOFF/
437
+ 0 string wOFF Web Open Font Format
438
+ !:mime font/woff
439
+ >0 use woff
440
+ >20 beshort x \b, version %d
441
+ >22 beshort x \b.%d
442
+ # https://www.w3.org/TR/WOFF2/
443
+ 0 string wOF2 Web Open Font Format (Version 2)
444
+ !:mime font/woff2
445
+ !:ext woff2
446
+ >0 use woff
447
+ #>20 belong x \b, totalCompressedSize %d
448
+ >24 beshort x \b, version %d
449
+ >26 beshort x \b.%d
@@ -0,0 +1,82 @@
1
+
2
+ #------------------------------------------------------------------------------
3
+ # $File: forth,v 1.4 2021/04/26 15:56:00 christos Exp $
4
+ # forth: file(1) magic for various Forth environments
5
+ # From: Lubomir Rintel <lkundrak@v3.sk>
6
+ #
7
+
8
+ # Has a FORTH stack diagram and something that looks very much like a FORTH
9
+ # multi-line word definition. Probably a FORTH source.
10
+ 0 regex \[[:space:]]\\(([[:space:]].*)?\ --\ (.*[[:space:]])?\\)
11
+ >0 regex \^:\[[:space:]]
12
+ >>0 regex \^;$ FORTH program
13
+ !:mime text/x-forth
14
+
15
+ # Inline word definition complete with a stack diagram
16
+ 0 regex \^:[[:space:]].*[[:space:]]\\(([[:space:]].*)?\ --\ (.*[[:space:]])?\\)[[:space:]].*[[:space:]];$ FORTH program
17
+ !:mime text/x-forth
18
+
19
+ # Various dictionary images used by OpenFirware FORTH environment
20
+
21
+ 0 lelong 0xe1a00000
22
+ >8 lelong 0xe1a00000
23
+ # skip raspberry pi kernel image kernel7.img by checking for positive text length
24
+ >>24 lelong >0 ARM OpenFirmware FORTH Dictionary,
25
+ >>>24 lelong x Text length: %d bytes,
26
+ >>>28 lelong x Data length: %d bytes,
27
+ >>>32 lelong x Text Relocation Table length: %d bytes,
28
+ >>>36 lelong x Data Relocation Table length: %d bytes,
29
+ >>>40 lelong x Entry Point: %#08X,
30
+ >>>44 lelong x BSS length: %d bytes
31
+
32
+ 0 string MP
33
+ >28 lelong 1 x86 OpenFirmware FORTH Dictionary,
34
+ >>4 leshort x %d blocks
35
+ >>2 leshort x + %d bytes,
36
+ >>6 leshort x %d relocations,
37
+ >>8 leshort x Header length: %d paragraphs,
38
+ >>10 leshort x Data Size: %d
39
+ >>12 leshort x - %d 4K pages,
40
+ >>14 lelong x Initial Stack Pointer: %#08X,
41
+ >>20 lelong x Entry Point: %#08X,
42
+ >>24 lelong x First Relocation Item: %d,
43
+ >>26 lelong x Overlay Number: %d,
44
+ >>18 leshort x Checksum: %#08X
45
+
46
+ 0 belong 0x48000020 PowerPC OpenFirmware FORTH Dictionary,
47
+ >4 belong x Text length: %d bytes,
48
+ >8 belong x Data length: %d bytes,
49
+ >12 belong x BSS length: %d bytes,
50
+ >16 belong x Symbol Table length: %d bytes,
51
+ >20 belong x Entry Point: %#08X,
52
+ >24 belong x Text Relocation Table length: %d bytes,
53
+ >28 belong x Data Relocation Table length: %d bytes
54
+
55
+ 0 lelong 0x10000007 MIPS OpenFirmware FORTH Dictionary,
56
+ >4 lelong x Text length: %d bytes,
57
+ >8 lelong x Data length: %d bytes,
58
+ >12 lelong x BSS length: %d bytes,
59
+ >16 lelong x Symbol Table length: %d bytes,
60
+ >20 lelong x Entry Point: %#08X,
61
+ >24 lelong x Text Relocation Table length: %d bytes,
62
+ >28 lelong x Data Relocation Table length: %d bytes
63
+
64
+ # Dictionary images used by minimal C FORTH environments, any platform,
65
+ # using native byte order.
66
+
67
+ # Weak.
68
+ #0 short 0x5820 cForth 16-bit Dictionary,
69
+ #>2 short x Serial: %#08X,
70
+ #>4 short x Dictionary Start: %#08X,
71
+ #>6 short x Dictionary Size: %d bytes,
72
+ #>8 short x User Area Start: %#08X,
73
+ #>10 short x User Area Size: %d bytes,
74
+ #>12 short x Entry Point: %#08X
75
+
76
+ 0 long 0x581120 cForth 32-bit Dictionary,
77
+ >4 long x Serial: %#08X,
78
+ >8 long x Dictionary Start: %#08X,
79
+ >12 long x Dictionary Size: %d bytes,
80
+ >16 long x User Area Start: %#08X,
81
+ >20 long x User Area Size: %d bytes,
82
+ >24 long x Entry Point: %#08X
@@ -0,0 +1,9 @@
1
+
2
+ #------------------------------------------------------------------------------
3
+ # $File: fortran,v 1.10 2015/11/05 18:47:16 christos Exp $
4
+ # FORTRAN source
5
+ # Check that the first 100 lines start with C or whitespace first.
6
+ 0 regex/100l !\^[^Cc\ \t].*$
7
+ >0 regex/100l \^[Cc][\ \t] FORTRAN program text
8
+ !:mime text/x-fortran
9
+ !:strength - 5
@@ -0,0 +1,62 @@
1
+
2
+ #------------------------------------------------------------------------------
3
+ # $File: frame,v 1.14 2019/11/25 00:31:30 christos Exp $
4
+ # frame: file(1) magic for FrameMaker files
5
+ #
6
+ # This stuff came on a FrameMaker demo tape, most of which is
7
+ # copyright, but this file is "published" as witness the following:
8
+ #
9
+ # Note that this is the Framemaker Maker Interchange Format, not the
10
+ # Normal format which would be application/vnd.framemaker.
11
+ #
12
+ 0 string \<MakerFile FrameMaker document
13
+ !:mime application/x-mif
14
+ >11 string 5.5 (5.5
15
+ >11 string 5.0 (5.0
16
+ >11 string 4.0 (4.0
17
+ >11 string 3.0 (3.0
18
+ >11 string 2.0 (2.0
19
+ >11 string 1.0 (1.0
20
+ >14 byte x %c)
21
+ # URL: http://fileformats.archiveteam.org/wiki/Maker_Interchange_Format
22
+ # Reference: https://help.adobe.com/en_US/framemaker/mifreference/mifref.pdf
23
+ # Update: Joerg Jenderek 2019 Nov
24
+ 0 string \<MIFFile FrameMaker MIF (ASCII) file
25
+ # https://www.iana.org/assignments/media-types/application/vnd.mif
26
+ !:mime application/vnd.mif
27
+ # mif most but also find bookTOC.framemif
28
+ !:ext mif/framemif
29
+ # followed by space~20h
30
+ #>8 ubyte 0x20 \b, space before version
31
+ # 3 characters of version number of the MIF language like 1.0, 2.0 ... 2015 ...
32
+ >9 string x (%.3s
33
+ # if not greater sign then display 4th character of version
34
+ >12 ubyte =0x3e \b)
35
+ >12 ubyte !0x3e \b%c)
36
+ # comment starting with # shows the name+version number of generating program
37
+ >13 search/3 #
38
+ >>&0 string x "%s"
39
+ 0 search/1 \<MakerDictionary FrameMaker Dictionary text
40
+ !:mime application/x-mif
41
+ >17 string 3.0 (3.0)
42
+ >17 string 2.0 (2.0)
43
+ >17 string 1.0 (1.x)
44
+ 0 string \<MakerScreenFont FrameMaker Font file
45
+ !:mime application/x-mif
46
+ >17 string 1.01 (%s)
47
+ 0 string \<MML FrameMaker MML file
48
+ !:mime application/x-mif
49
+ 0 string \<BookFile FrameMaker Book file
50
+ !:mime application/x-mif
51
+ >10 string 3.0 (3.0
52
+ >10 string 2.0 (2.0
53
+ >10 string 1.0 (1.0
54
+ >13 byte x %c)
55
+ # XXX - this book entry should be verified, if you find one, uncomment this
56
+ #0 string \<Book\040 FrameMaker Book (ASCII) file
57
+ #!:mime application/x-mif
58
+ #>6 string 3.0 (3.0)
59
+ #>6 string 2.0 (2.0)
60
+ #>6 string 1.0 (1.0)
61
+ 0 string \<Maker\040Intermediate\040Print\040File FrameMaker IPL file
62
+ !:mime application/x-mif