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,886 @@
1
+
2
+ #------------------------------------------------------------------------------
3
+ # $File: database,v 1.69 2023/01/12 00:14:04 christos Exp $
4
+ # database: file(1) magic for various databases
5
+ #
6
+ # extracted from header/code files by Graeme Wilford (eep2gw@ee.surrey.ac.uk)
7
+ #
8
+ #
9
+ # GDBM magic numbers
10
+ # Will be maintained as part of the GDBM distribution in the future.
11
+ # <downsj@teeny.org>
12
+ 0 belong 0x13579acd GNU dbm 1.x or ndbm database, big endian, 32-bit
13
+ !:mime application/x-gdbm
14
+ 0 belong 0x13579ace GNU dbm 1.x or ndbm database, big endian, old
15
+ !:mime application/x-gdbm
16
+ 0 belong 0x13579acf GNU dbm 1.x or ndbm database, big endian, 64-bit
17
+ !:mime application/x-gdbm
18
+ 0 lelong 0x13579acd GNU dbm 1.x or ndbm database, little endian, 32-bit
19
+ !:mime application/x-gdbm
20
+ 0 lelong 0x13579ace GNU dbm 1.x or ndbm database, little endian, old
21
+ !:mime application/x-gdbm
22
+ 0 lelong 0x13579acf GNU dbm 1.x or ndbm database, little endian, 64-bit
23
+ !:mime application/x-gdbm
24
+ 0 string GDBM GNU dbm 2.x database
25
+ !:mime application/x-gdbm
26
+ #
27
+ # Berkeley DB
28
+ #
29
+ # Ian Darwin's file /etc/magic files: big/little-endian version.
30
+ #
31
+ # Hash 1.85/1.86 databases store metadata in network byte order.
32
+ # Btree 1.85/1.86 databases store the metadata in host byte order.
33
+ # Hash and Btree 2.X and later databases store the metadata in host byte order.
34
+
35
+ 0 long 0x00061561 Berkeley DB
36
+ !:mime application/x-dbm
37
+ >8 belong 4321
38
+ >>4 belong >2 1.86
39
+ >>4 belong <3 1.85
40
+ >>4 belong >0 (Hash, version %d, native byte-order)
41
+ >8 belong 1234
42
+ >>4 belong >2 1.86
43
+ >>4 belong <3 1.85
44
+ >>4 belong >0 (Hash, version %d, little-endian)
45
+
46
+ 0 belong 0x00061561 Berkeley DB
47
+ >8 belong 4321
48
+ >>4 belong >2 1.86
49
+ >>4 belong <3 1.85
50
+ >>4 belong >0 (Hash, version %d, big-endian)
51
+ >8 belong 1234
52
+ >>4 belong >2 1.86
53
+ >>4 belong <3 1.85
54
+ >>4 belong >0 (Hash, version %d, native byte-order)
55
+
56
+ 0 long 0x00053162 Berkeley DB 1.85/1.86
57
+ >4 long >0 (Btree, version %d, native byte-order)
58
+ 0 belong 0x00053162 Berkeley DB 1.85/1.86
59
+ >4 belong >0 (Btree, version %d, big-endian)
60
+ 0 lelong 0x00053162 Berkeley DB 1.85/1.86
61
+ >4 lelong >0 (Btree, version %d, little-endian)
62
+
63
+ 12 long 0x00061561 Berkeley DB
64
+ >16 long >0 (Hash, version %d, native byte-order)
65
+ 12 belong 0x00061561 Berkeley DB
66
+ >16 belong >0 (Hash, version %d, big-endian)
67
+ 12 lelong 0x00061561 Berkeley DB
68
+ >16 lelong >0 (Hash, version %d, little-endian)
69
+
70
+ 12 long 0x00053162 Berkeley DB
71
+ >16 long >0 (Btree, version %d, native byte-order)
72
+ 12 belong 0x00053162 Berkeley DB
73
+ >16 belong >0 (Btree, version %d, big-endian)
74
+ 12 lelong 0x00053162 Berkeley DB
75
+ >16 lelong >0 (Btree, version %d, little-endian)
76
+
77
+ 12 long 0x00042253 Berkeley DB
78
+ >16 long >0 (Queue, version %d, native byte-order)
79
+ 12 belong 0x00042253 Berkeley DB
80
+ >16 belong >0 (Queue, version %d, big-endian)
81
+ 12 lelong 0x00042253 Berkeley DB
82
+ >16 lelong >0 (Queue, version %d, little-endian)
83
+
84
+ # From Max Bowsher.
85
+ 12 long 0x00040988 Berkeley DB
86
+ >16 long >0 (Log, version %d, native byte-order)
87
+ 12 belong 0x00040988 Berkeley DB
88
+ >16 belong >0 (Log, version %d, big-endian)
89
+ 12 lelong 0x00040988 Berkeley DB
90
+ >16 lelong >0 (Log, version %d, little-endian)
91
+
92
+ #
93
+ #
94
+ # Round Robin Database Tool by Tobias Oetiker <oetiker@ee.ethz.ch>
95
+ 0 string/b RRD\0 RRDTool DB
96
+ >4 string/b x version %s
97
+
98
+ >>10 short !0 16bit aligned
99
+ >>>10 bedouble 8.642135e+130 big-endian
100
+ >>>>18 short x 32bit long (m68k)
101
+
102
+ >>10 short 0
103
+ >>>12 long !0 32bit aligned
104
+ >>>>12 bedouble 8.642135e+130 big-endian
105
+ >>>>>20 long 0 64bit long
106
+ >>>>>20 long !0 32bit long
107
+ >>>>12 ledouble 8.642135e+130 little-endian
108
+ >>>>>24 long 0 64bit long
109
+ >>>>>24 long !0 32bit long (i386)
110
+ >>>>12 string \x43\x2b\x1f\x5b\x2f\x25\xc0\xc7 middle-endian
111
+ >>>>>24 short !0 32bit long (arm)
112
+
113
+ >>8 quad 0 64bit aligned
114
+ >>>16 bedouble 8.642135e+130 big-endian
115
+ >>>>24 long 0 64bit long (s390x)
116
+ >>>>24 long !0 32bit long (hppa/mips/ppc/s390/SPARC)
117
+ >>>16 ledouble 8.642135e+130 little-endian
118
+ >>>>28 long 0 64bit long (alpha/amd64/ia64)
119
+ >>>>28 long !0 32bit long (armel/mipsel)
120
+
121
+ #----------------------------------------------------------------------
122
+ # ROOT: file(1) magic for ROOT databases
123
+ #
124
+ 0 string root\0 ROOT file
125
+ >4 belong x Version %d
126
+ >33 belong x (Compression: %d)
127
+
128
+ # XXX: Weak magic.
129
+ # Alex Ott <ott@jet.msk.su>
130
+ ## Paradox file formats
131
+ #2 leshort 0x0800 Paradox
132
+ #>0x39 byte 3 v. 3.0
133
+ #>0x39 byte 4 v. 3.5
134
+ #>0x39 byte 9 v. 4.x
135
+ #>0x39 byte 10 v. 5.x
136
+ #>0x39 byte 11 v. 5.x
137
+ #>0x39 byte 12 v. 7.x
138
+ #>>0x04 byte 0 indexed .DB data file
139
+ #>>0x04 byte 1 primary index .PX file
140
+ #>>0x04 byte 2 non-indexed .DB data file
141
+ #>>0x04 byte 3 non-incrementing secondary index .Xnn file
142
+ #>>0x04 byte 4 secondary index .Ynn file
143
+ #>>0x04 byte 5 incrementing secondary index .Xnn file
144
+ #>>0x04 byte 6 non-incrementing secondary index .XGn file
145
+ #>>0x04 byte 7 secondary index .YGn file
146
+ #>>>0x04 byte 8 incrementing secondary index .XGn file
147
+
148
+ ## XBase database files
149
+ # updated by Joerg Jenderek at Feb 2013
150
+ # https://www.dbase.com/Knowledgebase/INT/db7_file_fmt.htm
151
+ # https://www.clicketyclick.dk/databases/xbase/format/dbf.html
152
+ # inspect VVYYMMDD , where 1<= MM <= 12 and 1<= DD <= 31
153
+ 0 ubelong&0x0000FFFF <0x00000C20
154
+ !:strength +10
155
+ # skip Infocom game Z-machine
156
+ >2 ubyte >0
157
+ # skip Androids *.xml
158
+ >>3 ubyte >0
159
+ >>>3 ubyte <32
160
+ # 1 < version VV
161
+ >>>>0 ubyte >1
162
+ # skip HELP.CA3 by test for reserved byte ( NULL )
163
+ >>>>>27 ubyte 0
164
+ # reserved bytes not always 0 ; also found 0x3901 (T4.DBF) ,0x7101 (T5.DBF,T6.DBF)
165
+ #>>>>>30 ubeshort x 30NULL?%x
166
+ # possible production flag,tag numbers(<=0x30),tag length(<=0x20), reserved (NULL)
167
+ >>>>>>24 ubelong&0xffFFFFff >0x01302000
168
+ # .DBF or .MDX
169
+ >>>>>>24 ubelong&0xffFFFFff <0x01302001
170
+ # for Xbase Database file (*.DBF) reserved (NULL) for multi-user
171
+ >>>>>>>24 ubelong&0xffFFFFff =0
172
+ # test for 2 reserved NULL bytes,transaction and encryption byte flag
173
+ >>>>>>>>12 ubelong&0xFFFFfEfE 0
174
+ # test for MDX flag
175
+ >>>>>>>>>28 ubyte x
176
+ >>>>>>>>>28 ubyte&0xf8 0
177
+ # header size >= 32
178
+ >>>>>>>>>>8 uleshort >31
179
+ # skip PIC15736.PCX by test for language driver name or field name
180
+ >>>>>>>>>>>32 ubyte >0
181
+ #!:mime application/x-dbf; charset=unknown-8bit ??
182
+ #!:mime application/x-dbase
183
+ >>>>>>>>>>>>0 use xbase-type
184
+ # database file
185
+ >>>>>>>>>>>>28 ubyte&0x04 =0 \b DBF
186
+ !:ext dbf
187
+ >>>>>>>>>>>>28 ubyte&0x04 =4 \b DataBaseContainer
188
+ !:ext dbc
189
+ >>>>>>>>>>>>4 lelong 0 \b, no records
190
+ >>>>>>>>>>>>4 lelong >0 \b, %d record
191
+ # plural s appended
192
+ >>>>>>>>>>>>>4 lelong >1 \bs
193
+ # https://www.clicketyclick.dk/databases/xbase/format/dbf_check.html#CHECK_DBF
194
+ # 1 <= record size <= 4000 (dBase 3,4) or 32 * KB (=0x8000)
195
+ >>>>>>>>>>>>10 uleshort x * %d
196
+ # file size = records * record size + header size
197
+ >>>>>>>>>>>>1 ubyte x \b, update-date
198
+ >>>>>>>>>>>>1 use xbase-date
199
+ # https://msdn.microsoft.com/de-de/library/cc483186(v=vs.71).aspx
200
+ #>>>>>>>>>>>>29 ubyte =0 \b, codepage ID=%#x
201
+ # 2~cp850 , 3~cp1252 , 0x1b~?? ; what code page is 0x1b ?
202
+ >>>>>>>>>>>>29 ubyte >0 \b, codepage ID=%#x
203
+ #>>>>>>>>>>>>28 ubyte&0x01 0 \b, no index file
204
+ # MDX or CDX index
205
+ >>>>>>>>>>>>28 ubyte&0x01 1 \b, with index file .MDX
206
+ >>>>>>>>>>>>28 ubyte&0x02 2 \b, with memo .FPT
207
+ #>>>>>>>>>>>>28 ubyte&0x04 4 \b, DataBaseContainer
208
+ # 1st record offset + 1 = header size
209
+ >>>>>>>>>>>>8 uleshort >0
210
+ >>>>>>>>>>>>(8.s+1) ubyte >0
211
+ >>>>>>>>>>>>>8 uleshort >0 \b, at offset %d
212
+ >>>>>>>>>>>>>(8.s+1) ubyte >0
213
+ >>>>>>>>>>>>>>&-1 string >\0 1st record "%s"
214
+ # for multiple index files (*.MDX) Production flag,tag numbers(<=0x30),tag length(<=0x20), reserved (NULL)
215
+ >>>>>>>24 ubelong&0x0133f7ff >0
216
+ # test for reserved NULL byte
217
+ >>>>>>>>47 ubyte 0
218
+ # test for valid TAG key format (0x10 or 0)
219
+ >>>>>>>>>559 ubyte&0xeF 0
220
+ # test MM <= 12
221
+ >>>>>>>>>>45 ubeshort <0x0C20
222
+ >>>>>>>>>>>45 ubyte >0
223
+ >>>>>>>>>>>>46 ubyte <32
224
+ >>>>>>>>>>>>>46 ubyte >0
225
+ #!:mime application/x-mdx
226
+ >>>>>>>>>>>>>>0 use xbase-type
227
+ >>>>>>>>>>>>>>0 ubyte x \b MDX
228
+ >>>>>>>>>>>>>>1 ubyte x \b, creation-date
229
+ >>>>>>>>>>>>>>1 use xbase-date
230
+ >>>>>>>>>>>>>>44 ubyte x \b, update-date
231
+ >>>>>>>>>>>>>>44 use xbase-date
232
+ # No.of tags in use (1,2,5,12)
233
+ >>>>>>>>>>>>>>28 uleshort x \b, %d
234
+ # No. of entries in tag (0x30)
235
+ >>>>>>>>>>>>>>25 ubyte x \b/%d tags
236
+ # Length of tag
237
+ >>>>>>>>>>>>>>26 ubyte x * %d
238
+ # 1st tag name_
239
+ >>>>>>>>>>>>>548 string x \b, 1st tag "%.11s"
240
+ # 2nd tag name
241
+ #>>>>>>>>>>>>(26.b+548) string x \b, 2nd tag "%.11s"
242
+ #
243
+ # Print the xBase names of different version variants
244
+ 0 name xbase-type
245
+ >0 ubyte <2
246
+ # 1 < version
247
+ >0 ubyte >1
248
+ >>0 ubyte 0x02 FoxBase
249
+ !:mime application/x-dbf
250
+ # like: ACCESS.DBF USER.DBF dbase3date.dbf mitarbei.dbf produkte.dbf umlaut-test-v2.dbf
251
+ # FoxBase+/dBaseIII+, no memo
252
+ >>0 ubyte 0x03 FoxBase+/dBase III
253
+ !:mime application/x-dbf
254
+ # like: 92DATA.DBF MSCATLOG.DBF SYLLABI2.DBF SYLLABUS.DBF T4.DBF Teleadr.dbf us_city.dbf
255
+ # dBASE IV no memo file
256
+ >>0 ubyte 0x04 dBase IV
257
+ !:mime application/x-dbf
258
+ # like: Quattro-test11.dbf umlaut-test-v4.dbf
259
+ # dBASE V no memo file
260
+ >>0 ubyte 0x05 dBase V
261
+ !:mime application/x-dbf
262
+ # like: dbase4double.dbf Quattro-test2.dbf umlaut-test7.dbf
263
+ !:ext dbf
264
+ # probably Apollo Database Server 9.7? xBase (0x6)
265
+ >>0 ubyte 0x06 Apollo
266
+ !:mime application/x-dbf
267
+ # like: ALIAS.DBF CRYPT.DBF PROCS.DBF USERS.DBF
268
+ # https://docs.microsoft.com/en-us/previous-versions/visualstudio/foxpro/st4a0s68(v=vs.80)
269
+ >>0 ubyte 0x2F FoxBase+/Dbase III plus, no memo
270
+ !:mime application/x-dbf
271
+ # no example
272
+ >>0 ubyte 0x30 Visual FoxPro
273
+ !:mime application/x-dbf
274
+ # like: 26FRX.DBF 30DBC.DBF 30DBCPRO.DBF BEHINDSC.DBF USER_LEV.DBF
275
+ # Microsoft Visual FoxPro Database Container File like: FOXPRO-DB-TEST.DBC TESTDATA.DBC TASTRADE.DBC
276
+ >>0 ubyte 0x31 Visual FoxPro, autoincrement
277
+ !:mime application/x-dbf
278
+ # like: AI_Table.DBF dbase_31.dbf w_cityFoxpro.dbf
279
+ # Visual FoxPro, with field type Varchar or Varbinary
280
+ >>0 ubyte 0x32 Visual FoxPro, with field type Varchar
281
+ !:mime application/x-dbf
282
+ # like: dbase_32.dbf
283
+ # dBASE IV SQL, no memo;dbv memo var size (Flagship)
284
+ >>0 ubyte 0x43 dBase IV, with SQL table
285
+ !:mime application/x-dbf
286
+ # like: ASSEMBLY.DBF INVENTRY.DBF STAFF.DBF
287
+ # https://docs.microsoft.com/en-us/previous-versions/visualstudio/foxpro/st4a0s68(v=vs.80)
288
+ >>0 ubyte 0x62 dBase IV, with SQL table
289
+ #!:mime application/x-dbf
290
+ # no example
291
+ # dBASE IV, with memo!!
292
+ >>0 ubyte 0x7b dBase IV, with memo
293
+ !:mime application/x-dbf
294
+ # like: test3memo.DBF dbase5.DBF
295
+ # https://docs.microsoft.com/en-us/previous-versions/visualstudio/foxpro/st4a0s68(v=vs.80)
296
+ >>0 ubyte 0x82 dBase IV, with SQL system
297
+ #!:mime application/x-dbf
298
+ # no example
299
+ # FoxBase+/dBaseIII+ with memo .DBT!
300
+ >>0 ubyte 0x83 FoxBase+/dBase III, with memo .DBT
301
+ !:mime application/x-dbf
302
+ # like: T2.DBF t3.DBF biblio.dbf dbase_83.dbf dbase3dbt0_4.dbf fsadress.dbf stop.dbf
303
+ # VISUAL OBJECTS (first 1.0 versions) for the Dbase III files (NTX clipper driver); memo file
304
+ >>0 ubyte 0x87 VISUAL OBJECTS, with memo file
305
+ !:mime application/x-dbf
306
+ # like: ACCESS.DBF dbase3date.dbf dbase3float.dbf holdings.dbf mitarbei.dbf
307
+ # https://docs.microsoft.com/en-us/previous-versions/visualstudio/foxpro/st4a0s68(v=vs.80)
308
+ >>0 ubyte 0x8A FoxBase+/dBase III, with memo .DBT
309
+ #!:mime application/x-dbf
310
+ # no example
311
+ # dBASE IV with memo!
312
+ >>0 ubyte 0x8B dBase IV, with memo .DBT
313
+ !:mime application/x-dbf
314
+ # like: animals.dbf archive.dbf callin.dbf dbase_8b.dbf phnebook.dbf t6.dbf
315
+ # dBase IV with SQL Table,no memo?
316
+ >>0 ubyte 0x8E dBase IV, with SQL table
317
+ !:mime application/x-dbf
318
+ # like: dbase5.DBF test3memo.DBF test-memo.DBF
319
+ # .dbv and .dbt memo (Flagship)?
320
+ >>0 ubyte 0xB3 Flagship
321
+ !:mime application/x-dbf
322
+ # no example
323
+ # https://docs.microsoft.com/en-us/previous-versions/visualstudio/foxpro/st4a0s68(v=vs.80)
324
+ >>0 ubyte 0xCA dBase IV with memo .DBT
325
+ #!:mime application/x-dbf
326
+ # no example
327
+ # dBASE IV with SQL table, with memo .DBT
328
+ >>0 ubyte 0xCB dBase IV with SQL table, with memo .DBT
329
+ !:mime application/x-dbf
330
+ # like: dbase5.DBF test3memo.DBF test-memo.DBF
331
+ # HiPer-Six format;Clipper SIX, with SMT memo file
332
+ >>0 ubyte 0xE5 Clipper SIX with memo
333
+ !:mime application/x-dbf
334
+ # like: dbase5.DBF test3memo.DBF test-memo.DBF testClipper.dbf DATA.DBF
335
+ # https://docs.microsoft.com/en-us/previous-versions/visualstudio/foxpro/st4a0s68(v=vs.80)
336
+ >>0 ubyte 0xF4 dBase IV, with SQL table, with memo
337
+ #!:mime application/x-dbf
338
+ # no example
339
+ >>0 ubyte 0xF5 FoxPro with memo
340
+ !:mime application/x-dbf
341
+ # like: CUSTOMER.DBF FOXUSER1.DBF Invoice.DBF NG.DBF OBJSAMP.DBF dbase_f5.dbf kunde.dbf
342
+ # probably Apollo Database Server 9.7 with SQL and memo mask? xBase (0xF6)
343
+ >>0 ubyte 0xF6 Apollo, with SQL table with memo
344
+ !:mime application/x-dbf
345
+ # like: SCRIPTS.DBF
346
+ # https://docs.microsoft.com/en-us/previous-versions/visualstudio/foxpro/st4a0s68(v=vs.80)
347
+ #>>0 ubyte 0xFA FoxPro 2.x, with memo
348
+ #!:mime application/x-dbf
349
+ # no example
350
+ # unknown version (should not happen)
351
+ >>0 default x xBase
352
+ !:mime application/x-dbf
353
+ >>>0 ubyte x (%#x)
354
+ # flags in version byte
355
+ # DBT flag (with dBASE III memo .DBT)!!
356
+ # >>0 ubyte&0x80 >0 DBT_FLAG=%x
357
+ # memo flag ??
358
+ # >>0 ubyte&0x08 >0 MEMO_FLAG=%x
359
+ # SQL flag ??
360
+ # >>0 ubyte&0x70 >0 SQL_FLAG=%x
361
+ # test and print the date of xBase .DBF .MDX
362
+ 0 name xbase-date
363
+ # inspect YYMMDD , where 1<= MM <= 12 and 1<= DD <= 31
364
+ >0 ubelong x
365
+ >1 ubyte <13
366
+ >>1 ubyte >0
367
+ >>>2 ubyte >0
368
+ >>>>2 ubyte <32
369
+ >>>>>0 ubyte x
370
+ # YY is interpreted as 20YY or 19YY
371
+ >>>>>>0 ubyte <100 \b %.2d
372
+ # YY is interpreted 1900+YY; TODO: display yy or 20yy instead 1YY
373
+ >>>>>>0 ubyte >99 \b %d
374
+ >>>>>1 ubyte x \b-%d
375
+ >>>>>2 ubyte x \b-%d
376
+
377
+ # dBase memo files .DBT or .FPT
378
+ # https://msdn.microsoft.com/en-us/library/8599s21w(v=vs.80).aspx
379
+ 16 ubyte <4
380
+ >16 ubyte !2
381
+ >>16 ubyte !1
382
+ # next free block index is positive
383
+ >>>0 ulelong >0
384
+ # skip many JPG. ZIP, BZ2 by test for reserved bytes NULL , 0|2 , 0|1 , low byte of block size
385
+ >>>>17 ubelong&0xFFfdFEff 0x00000000
386
+ # skip many RAR by test for low byte 0 ,high byte 0|2|even of block size, 0|a|e|d7 , 0|64h
387
+ >>>>>20 ubelong&0xFF01209B 0x00000000
388
+ # dBASE III
389
+ >>>>>>16 ubyte 3
390
+ # skip with invalid "low" 1st item "\0\0\0\0" StateRepository-Deployment.srd-shm "\001\010\0\0" gcry_cast5.mod
391
+ >>>>>>>512 ubyte >040
392
+ # skip with valid 1st item "rintf" keylayouts.mod
393
+ # by looking for valid terminating character Ctrl-Z like in test.dbt
394
+ >>>>>>>>513 search/3308 \032
395
+ # skip GRUB plan9.mod with invalid second terminating character 007
396
+ # by checking second terminating character Ctrl-Z like in test.dbt
397
+ >>>>>>>>>&0 ubyte 032
398
+ # dBASE III DBT with two Ctr-Z terminating characters
399
+ >>>>>>>>>>0 use dbase3-memo-print
400
+ # second terminating character \0 like in dbase-memo.dbt or GRUB nativedisk.mod
401
+ >>>>>>>>>&0 ubyte 0
402
+ # skip GRUB nativedisk.mod with grub_mod_init\0grub_mod_fini\0grub_fs_autoload_hook\0
403
+ >>>>>>>>>>0x1ad string !grub_mod_init
404
+ # like dbase-memo.dbt
405
+ >>>>>>>>>>>0 use dbase3-memo-print
406
+ # dBASE III DBT without version, dBASE IV DBT , FoxPro FPT , or many ZIP , DBF garbage
407
+ >>>>>>16 ubyte 0
408
+ # unusual dBASE III DBT like angest.dbt, dBASE IV DBT with block size 0 , FoxPro FPT , or garbage PCX DBF
409
+ >>>>>>>20 uleshort 0
410
+ # FoxPro FPT , unusual dBASE III DBT like biblio.dbt or garbage
411
+ >>>>>>>>8 ulong =0
412
+ >>>>>>>>>6 ubeshort >0
413
+ # skip emacs.PIF
414
+ >>>>>>>>>>4 ushort 0
415
+ # check for valid FoxPro field type
416
+ >>>>>>>>>>>512 ubelong <3
417
+ # skip LXMDCLN4.OUT LXMDCLN6.OUT LXMDALG6.OUT with invalid blocksize 170=AAh
418
+ >>>>>>>>>>>>6 ubeshort&0x002f 0
419
+ >>>>>>>>>>>>>0 use foxpro-memo-print
420
+ # dBASE III DBT , garbage
421
+ # skip WORD1XW.DOC with improbably high free block index
422
+ >>>>>>>>>0 ulelong <0x400000
423
+ # skip WinStore.App.exe by looking for printable 2nd character of 1st memo item
424
+ >>>>>>>>>>513 ubyte >037
425
+ # skip DOS executables CPQ0TD.DRV E30ODI.COM IBM0MONO.DRV by looking for printable 1st character of 1st memo item
426
+ >>>>>>>>>>>512 ubyte >037
427
+ # skip few (14/758) Microsoft Event Trace Logs (boot_BASE+CSWITCH_1.etl DlTel-Merge.etl UpdateUx.006.etl) with invalid "high" 1st item \377\377
428
+ >>>>>>>>>>>>512 ubyte <0377
429
+ # skip some Commodore 64 Art Studio (Deep_Strike.aas dragon's_lair_ii.aas), some Atari DEGAS Elite bitmap (ELEPHANT.PC3 ST.PC2)
430
+ # some probably old GRUB modules (part_sun.mod) and virtual-boy-wario-land.vb.
431
+ # by looking for valid terminating character Ctrl-Z
432
+ >>>>>>>>>>>>>513 search/523 \032
433
+ # Atari DEGAS bitmap ST.PC2 with 0370 as second terminating character
434
+ #>>>>>>>>>>>>>>&0 ubyte x 2ND_CHAR_IS=%o
435
+ # dBASE III DBT with two Ctr-Z terminating characters like dbase3dbt0_1.dbt dbase_83.dbt
436
+ >>>>>>>>>>>>>>&0 ubyte 032
437
+ >>>>>>>>>>>>>>>0 use dbase3-memo-print
438
+ # second terminating character \0 like in pcidump.mod or fsadress.dbt umlaut-dbf-cmd.dbt
439
+ >>>>>>>>>>>>>>&0 ubyte 0
440
+ # look for old GRUB module pcidump.mod with specific content "pcidump\0Show raw dump of the PCI configuration space"
441
+ >>>>>>>>>>>>>>>514 search/0x11E pcidump\0Show
442
+ # dBASE III DBT with Ctr-Z + \0 terminating characters like fsadress.dbt
443
+ >>>>>>>>>>>>>>>514 default x
444
+ # unusual dBASE III DBT like fsadress.dbt umlaut-dbf-cmd.dbt
445
+ >>>>>>>>>>>>>>>>0 use dbase3-memo-print
446
+ # dBASE III DBT like angest.dbt, or garbage PCX DBF
447
+ >>>>>>>>8 ubelong !0
448
+ # skip PCX and some DBF by test for for reserved NULL bytes
449
+ >>>>>>>>>510 ubeshort 0
450
+ # skip bad symples with improbably high free block index above 2 GiB file limit
451
+ >>>>>>>>>>0 ulelong <0x400000
452
+ # skip AI070GEP.EPS by printable 1st character of 1st memo item
453
+ >>>>>>>>>>>512 ubyte >037
454
+ # skip some Microsoft Visual C, OMF library like: BZ2.LIB WATTCPWL.LIB ZLIB.LIB
455
+ >>>>>>>>>>>>512 ubyte <0200
456
+ # skip gluon-ffhat-1.0-tp-link-tl-wr1043n-nd-v2-sysupgrade.bin by printable 2nd character
457
+ >>>>>>>>>>>>>513 ubyte >037
458
+ # skip few (8/758) Microsoft Event Trace Logs (WBEngine.3.etl Wifi.etl) with valid 1st item like
459
+ # "9600.20369.amd64fre.winblue_ltsb_escrow.220427-1727"
460
+ # "9600.19846.amd64fre.winblue_ltsb_escrow.200923-1735"
461
+ # "10586.494.amd64fre.th2_release_sec.160630-1736"
462
+ # by looking for valid terminating character Ctrl-Z
463
+ >>>>>>>>>>>>>>513 search/0x11E \032
464
+ # followed by second character Ctrl-Z implies typical DBT
465
+ >>>>>>>>>>>>>>>&0 ubyte 032
466
+ # examples like: angest.dbt
467
+ >>>>>>>>>>>>>>>>0 use dbase3-memo-print
468
+ >>>>>>>>>>>>>>>&0 ubyte 0
469
+ # no example found here with terminating sequence CTRL-Z + \0
470
+ >>>>>>>>>>>>>>>>0 use dbase3-memo-print
471
+ # dBASE IV DBT with positive block size
472
+ >>>>>>>20 uleshort >0
473
+ # dBASE IV DBT with valid block length like 512, 1024
474
+ # multiple of 2 in between 16 and 16 K ,implies upper and lower bits are zero
475
+ # skip also 3600h 3E00h size
476
+ >>>>>>>>20 uleshort&0xE00f 0
477
+ >>>>>>>>>0 use dbase4-memo-print
478
+
479
+ # Print the information of dBase III DBT memo file
480
+ 0 name dbase3-memo-print
481
+ >0 ubyte x dBase III DBT
482
+ !:mime application/x-dbt
483
+ !:ext dbt
484
+ # instead 3 as version number 0 for unusual examples like biblio.dbt
485
+ >16 ubyte !3 \b, version number %u
486
+ # Number of next available block for appending data
487
+ #>0 lelong =0 \b, next free block index %u
488
+ >0 lelong !0 \b, next free block index %u
489
+ # no positive block length
490
+ #>20 uleshort =0 \b, block length %u
491
+ >20 uleshort !0 \b, block length %u
492
+ # dBase III memo field terminated often by \032\032
493
+ # like: "WHAT IS XBASE" test.dbt "Borges, Malte" biblio.dbt "First memo\032\032" T2.DBT
494
+ >512 string >\0 \b, 1st item "%s"
495
+ # For DEBUGGING
496
+ #>512 ubelong x \b, 1ST item %#8.8x
497
+ #>513 search/0x225 \032 FOUND_TERMINATOR
498
+ #>>&0 ubyte 032 2xCTRL_Z
499
+ # fsadress.dbt has 1 Ctrl-Z terminator followed by nil byte
500
+ #>>&0 ubyte 0 1xCTRL_Z
501
+
502
+ # https://www.clicketyclick.dk/databases/xbase/format/dbt.html
503
+ # Print the information of dBase IV DBT memo file
504
+ 0 name dbase4-memo-print
505
+ >0 lelong x dBase IV DBT
506
+ !:mime application/x-dbt
507
+ !:ext dbt
508
+ # 8 character shorted main name of corresponding dBASE IV DBF file
509
+ >8 ubelong >0x20000000
510
+ # skip unusual like for angest.dbt
511
+ >>20 uleshort >0
512
+ >>>8 string >\0 \b of %-.8s.DBF
513
+ # value 0 implies 512 as size
514
+ #>4 ulelong =0 \b, blocks size %u
515
+ # size of blocks not reliable like 0x2020204C in angest.dbt
516
+ >4 ulelong !0
517
+ >>4 ulelong&0x0000003f 0 \b, blocks size %u
518
+ # dBase IV DBT with positive block length (found 512 , 1024)
519
+ >20 uleshort >0 \b, block length %u
520
+ # next available block
521
+ #>0 lelong =0 \b, next free block index %u
522
+ >0 lelong !0 \b, next free block index %u
523
+ >20 uleshort >0
524
+ >>(20.s) ubelong x
525
+ >>>&-4 use dbase4-memofield-print
526
+ # unusual dBase IV DBT without block length (implies 512 as length)
527
+ >20 uleshort =0
528
+ >>512 ubelong x
529
+ >>>&-4 use dbase4-memofield-print
530
+ # Print the information of dBase IV memo field
531
+ 0 name dbase4-memofield-print
532
+ # free dBase IV memo field
533
+ >0 ubelong !0xFFFF0800
534
+ >>0 lelong x \b, next free block %u
535
+ >>4 lelong x \b, next used block %u
536
+ # used dBase IV memo field
537
+ >0 ubelong =0xFFFF0800
538
+ # length of memo field
539
+ >>4 lelong x \b, field length %d
540
+ >>>8 string >\0 \b, 1st used item "%s"
541
+ # http://www.dbfree.org/webdocs/1-documentation/0018-developers_stuff_(advanced)/os_related_stuff/xbase_file_format.htm
542
+ # Print the information of FoxPro FPT memo file
543
+ 0 name foxpro-memo-print
544
+ >0 belong x FoxPro FPT
545
+ !:mime application/x-fpt
546
+ !:ext fpt
547
+ # Size of blocks for FoxPro ( 64,256 ); probably a multiple of two
548
+ >6 ubeshort x \b, blocks size %u
549
+ # next available block
550
+ #>0 belong =0 \b, next free block index %u
551
+ >0 belong !0 \b, next free block index %u
552
+ # field type ( 0~picture, 1~memo, 2~object )
553
+ >512 ubelong <3 \b, field type %u
554
+ # length of memo field
555
+ >512 ubelong 1
556
+ >>516 belong >0 \b, field length %d
557
+ >>>520 string >\0 \b, 1st item "%s"
558
+
559
+ # Summary: DBASE Compound Index file *.CDX and FoxPro index *.IDX
560
+ # From: Joerg Jenderek
561
+ # URL: https://www.clicketyclick.dk/databases/xbase/format/cdx.html
562
+ # https://www.clicketyclick.dk/databases/xbase/format/idx.html
563
+ # https://www.clicketyclick.dk/databases/xbase/format/idx_comp.html
564
+ # Reference: https://mark0.net/download/triddefs_xml.7z/defs/s/sybase-ianywhere-cdx.trid.xml
565
+ # https://mark0.net/download/triddefs_xml.7z/defs/c/cdx-vfp7.trid.xml
566
+ # like: kunde.cdx
567
+ 0 ulelong 0x1C00
568
+ >0 use xbase-index
569
+ # like: SYLLABI2.CDX SYLLABUS.CDX
570
+ 0 ulelong 0x0800
571
+ >0 use xbase-index
572
+ # often in xBase index pointer to root node 400h
573
+ 0 ulelong 0x0400
574
+ # skip most Maple help database *.hdb with version tag handled by ./maple
575
+ >1028 string !version
576
+ # skip Maple help database hsum.hdb checking for valid reserved area
577
+ >>492 quad =0
578
+ # skip remaining Maple help database *.hdb by checking key length
579
+ #>>>12 uleshort !0x000F KEY_LENGTHVALID
580
+ >>>0 use xbase-index
581
+ # display information about dBase/FoxPro index
582
+ 0 name xbase-index
583
+ >0 ulelong x xBase
584
+ !:mime application/x-dbase-index
585
+ >14 ubyte &0x40 compound index
586
+ # DCX for FoxPro database index like: TESTDATA.DCX
587
+ !:ext cdx/dcx
588
+ >14 ubyte ^0x40 index
589
+ # only 1 example like: TEST.IDX
590
+ !:ext idx
591
+ # pointer to root node like: 1C00h 800h often 400h
592
+ >0 ulelong !0x400 \b, root pointer %#x
593
+ # Pointer to free node list: often 0 but -1 if not present
594
+ >4 ulelong !0 \b, free node pointer %#x
595
+ # MAYBE number of pages in file (Foxbase, FoxPro 1.x) or
596
+ # http://www.foxpert.com/foxpro/knowlbits/files/knowlbits_200708_1.HTM
597
+ # Whenever Visual FoxPro updates the index file it increments this reserved field
598
+ # Reserved for internal use like: 02000000h 03000000h 460c0000h 780f0000h 89000000h 9fdc0100h often 0
599
+ >8 ulelong !0 \b, reserved counter %#x
600
+ # length of key like: mostly 000Ah 0028h (TEST.IDX)
601
+ >12 uleshort !0x000A \b, key length %#x
602
+ # index options like: 24h E0h E8h
603
+ # 1~a unique index 8~index has FOR clause 32~compact index format 64~compound index header
604
+ # 16~Bit vector (SoftC) 128~Structure index (FoxPro)
605
+ >14 ubyte x \b, index options (%#x
606
+ >14 ubyte &0x01 \b, unique
607
+ >14 ubyte &0x08 \b, has FOR clause
608
+ >14 ubyte &0x10 \b, bit vector (SoftC)
609
+ >14 ubyte &0x20 \b, compact format
610
+ #>14 ubyte &0x40 \b, compound header
611
+ >14 ubyte &0x80 \b, structure
612
+ >14 ubyte x \b)
613
+ # WHAT EXACTLY IS THAT? index signature like: 0 (sybase-ianywhere-cdx.trid.xml) 1 (cdx-vfp7.trid.xml)
614
+ >15 ubyte !0 \b, index signature %u
615
+ # reserved area (0-bytes) til about 500, but not for uncompressed Index files *.idx
616
+ >16 quad !0 \b, at 16 reserved %#llx
617
+ >492 quad !0 \b, at 492 reserved %#llx
618
+ # for IDX variant
619
+ #>14 ubyte ^0x40 IDX
620
+ # for CDX variant
621
+ >14 ubyte &0x40
622
+ # Ascending or descending: 0~ascending 1~descending
623
+ >>502 uleshort x \b, sort order %u
624
+ # Total expression length (FoxPro 2) like: 0 1
625
+ >>504 uleshort !0 \b, expression length %u
626
+ # FOR expression pool length like: 1
627
+ >>506 uleshort !1 \b, FOR expression pool length %#x
628
+ # reserved for internal use like: 0
629
+ >>508 uleshort !0 \b, at 0x508 reserved %#x
630
+ # Key expression pool length like: 1
631
+ >>510 uleshort !1 \b, key expression pool length %#x
632
+ # 512 - 1023 Key & FOR expression pool (uncompiled)
633
+ >>512 quad !0 \b, key expression pool %#llx
634
+ #>>520 quad !0 \b, key expression pool %#llx
635
+
636
+ # Summary: dBASE IV Printer Form *.PRF
637
+ # From: Joerg Jenderek
638
+ # URL: https://en.wikipedia.org/wiki/.dbf#Other_file_types_found_in_dBASE
639
+ # Reference: https://mark0.net/download/triddefs_xml.7z/defs/p/prf-dbase.trid.xml
640
+ 0 ubeshort 0x0400
641
+ # skip some Xbase Index files *.ndx and Infocom (Z-machine 4) *.z4 handled by ./adventure
642
+ # by looking for valid printer driver name extension
643
+ >0x58 search/8 .PR2
644
+ >>0 use xbase-prf
645
+ # display information of dbase print form like printer driver *.PR2
646
+ 0 name xbase-prf dBase Printer Form
647
+ !:mime application/x-dbase-prf
648
+ !:ext prf
649
+ # MAYBE version? like: 4~DBASE IV
650
+ #>0 ubyte x \b, version %u
651
+ # MAYBE flag like: 1~with output file name 0~not
652
+ #>2 ubyte !0 \b, flag %u
653
+ # optional printer text output file name like E:\DBASE\IV\T6.txt
654
+ >3 string >\0 \b, output file %s
655
+ # probably padding with nils til 0x53
656
+ #>0x48 uquad !0 \b, at 0x48 padding %#llx
657
+ # dBASE IV printer driver name like: Generic.PR2 ASCII.PR2
658
+ >0x56 string >\0 \b, using printer driver %s
659
+ # 2 is probably last character of previous dBASE printer driver name
660
+ #>0x60 ubyte !0x32 \b, at 0x60 %#x
661
+ # probably padding with nils til 0xa8
662
+ #>0x61 uquad !0 \b, at 0x61 padding %#llx
663
+ # unknown 0x03020300 0x03020100 at 0xa8
664
+ >0xa8 ubelong x \b, at 0xa8 unknown %#8.8x
665
+ # probably padding with nils til 0x2aa
666
+ #>0x2a0 uquad !0 \b, at 0x2a0 padding %#llx
667
+ # unknown 0x100ff7f01000001 at 0x2AB
668
+ >0x2ab ubequad !0x100ff7f01000001 \b, at 0x2ab unknown %#llx
669
+ # unknown 0x0042 at 0x2b3
670
+ >0x2b3 ubeshort !0x0042 \b, at 0x2b3 unknown %#4.4x
671
+ # unknown last 4 bytes at 0x2b6 like: 0 0x23
672
+ >0x2b6 ubelong !0 \b, at 0x2b6 unknown %#8.8x
673
+
674
+ # TODO:
675
+ # DBASE index file *.NDX
676
+ # dBASE compiled Format *.FMO
677
+ # FoxPro Database memo file *.DCT
678
+ # FoxPro Forms Memo *.SCT
679
+ # FoxPro Generated Menu Program *.MPR
680
+ # FoxPro Report *.FRX
681
+ # FoxPro Report Memo *.FRT
682
+ # Foxpro Generated Screen Program *.SPR
683
+ # Foxpro memo *.PJT
684
+ ## End of XBase database stuff
685
+
686
+ # MS Access database
687
+ 4 string Standard\ Jet\ DB Microsoft Access Database
688
+ !:mime application/x-msaccess
689
+ 4 string Standard\ ACE\ DB Microsoft Access Database
690
+ !:mime application/x-msaccess
691
+
692
+ # From: Joerg Jenderek
693
+ # URL: http://fileformats.archiveteam.org/wiki/Extensible_Storage_Engine
694
+ # Reference: https://github.com/libyal/libesedb/archive/master.zip
695
+ # libesedb-master/documentation/
696
+ # Extensible Storage Engine (ESE) Database File (EDB) format.asciidoc
697
+ # Note: also known as "JET Blue". Used by numerous Windows components such as
698
+ # Windows Search, Mail, Exchange and Active Directory.
699
+ 4 ubelong 0xefcdab89
700
+ # unknown1
701
+ >132 ubelong 0 Extensible storage engine
702
+ !:mime application/x-ms-ese
703
+ # file_type 0~database 1~stream
704
+ >>12 ulelong 0 DataBase
705
+ # Security DataBase (sdb)
706
+ !:ext edb/sdb
707
+ >>12 ulelong 1 STreaMing
708
+ !:ext stm
709
+ # format_version 620h
710
+ >>8 uleshort x \b, version %#x
711
+ >>10 uleshort >0 revision %#4.4x
712
+ >>0 ubelong x \b, checksum %#8.8x
713
+ # Page size 4096 8192 32768
714
+ >>236 ulequad x \b, page size %lld
715
+ # database_state
716
+ >>52 ulelong 1 \b, JustCreated
717
+ >>52 ulelong 2 \b, DirtyShutdown
718
+ #>>52 ulelong 3 \b, CleanShutdown
719
+ >>52 ulelong 4 \b, BeingConverted
720
+ >>52 ulelong 5 \b, ForceDetach
721
+ # Windows NT major version when the databases indexes were updated.
722
+ >>216 ulelong x \b, Windows version %d
723
+ # Windows NT minor version
724
+ >>220 ulelong x \b.%d
725
+
726
+ # From: Joerg Jenderek
727
+ # URL: https://forensicswiki.org/wiki/Windows_Application_Compatibility
728
+ # Note: files contain application compatibility fixes, application compatibility modes and application help messages.
729
+ 8 string sdbf
730
+ >7 ubyte 0
731
+ # TAG_TYPE_LIST+TAG_INDEXES
732
+ >>12 uleshort 0x7802 Windows application compatibility Shim DataBase
733
+ # version? 2 3
734
+ #>>>0 ulelong x \b, version %d
735
+ !:mime application/x-ms-sdb
736
+ !:ext sdb
737
+
738
+ # TDB database from Samba et al - Martin Pool <mbp@samba.org>
739
+ 0 string TDB\ file TDB database
740
+ >32 lelong 0x2601196D version 6, little-endian
741
+ >>36 lelong x hash size %d bytes
742
+
743
+ # SE Linux policy database
744
+ 0 lelong 0xf97cff8c SE Linux policy
745
+ >16 lelong x v%d
746
+ >20 lelong 1 MLS
747
+ >24 lelong x %d symbols
748
+ >28 lelong x %d ocons
749
+
750
+ # ICE authority file data (Wolfram Kleff)
751
+ 2 string ICE ICE authority data
752
+
753
+ # X11 Xauthority file (Wolfram Kleff)
754
+ 10 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
755
+ 11 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
756
+ 12 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
757
+ 13 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
758
+ 14 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
759
+ 15 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
760
+ 16 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
761
+ 17 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
762
+ 18 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
763
+
764
+ # From: Maxime Henrion <mux@FreeBSD.org>
765
+ # PostgreSQL's custom dump format, Maxime Henrion <mux@FreeBSD.org>
766
+ 0 string PGDMP PostgreSQL custom database dump
767
+ >5 byte x - v%d
768
+ >6 byte x \b.%d
769
+ >5 beshort <0x101 \b-0
770
+ >5 beshort >0x100
771
+ >>7 byte x \b-%d
772
+
773
+ # Type: Advanced Data Format (ADF) database
774
+ # URL: https://www.grc.nasa.gov/WWW/cgns/adf/
775
+ # From: Nicolas Chauvat <nicolas.chauvat@logilab.fr>
776
+ 0 string @(#)ADF\ Database CGNS Advanced Data Format
777
+
778
+ # Tokyo Cabinet magic data
779
+ # http://tokyocabinet.sourceforge.net/index.html
780
+ 0 string ToKyO\ CaBiNeT\n Tokyo Cabinet
781
+ >14 string x \b (%s)
782
+ >32 byte 0 \b, Hash
783
+ !:mime application/x-tokyocabinet-hash
784
+ >32 byte 1 \b, B+ tree
785
+ !:mime application/x-tokyocabinet-btree
786
+ >32 byte 2 \b, Fixed-length
787
+ !:mime application/x-tokyocabinet-fixed
788
+ >32 byte 3 \b, Table
789
+ !:mime application/x-tokyocabinet-table
790
+ >33 byte &1 \b, [open]
791
+ >33 byte &2 \b, [fatal]
792
+ >34 byte x \b, apow=%d
793
+ >35 byte x \b, fpow=%d
794
+ >36 byte &0x01 \b, [large]
795
+ >36 byte &0x02 \b, [deflate]
796
+ >36 byte &0x04 \b, [bzip]
797
+ >36 byte &0x08 \b, [tcbs]
798
+ >36 byte &0x10 \b, [excodec]
799
+ >40 lequad x \b, bnum=%lld
800
+ >48 lequad x \b, rnum=%lld
801
+ >56 lequad x \b, fsiz=%lld
802
+
803
+ # Type: QDBM Quick Database Manager
804
+ # From: Benoit Sibaud <bsibaud@april.org>
805
+ 0 string \\[depot\\]\n\f Quick Database Manager, little endian
806
+ 0 string \\[DEPOT\\]\n\f Quick Database Manager, big endian
807
+
808
+ # Type: TokyoCabinet database
809
+ # URL: http://tokyocabinet.sourceforge.net/
810
+ # From: Benoit Sibaud <bsibaud@april.org>
811
+ 0 string ToKyO\ CaBiNeT\n TokyoCabinet database
812
+ >14 string x (version %s)
813
+
814
+ # From: Stephane Blondon https://www.yaal.fr
815
+ # Database file for Zope (done by FileStorage)
816
+ 0 string FS21 Zope Object Database File Storage v3 (data)
817
+ 0 string FS30 Zope Object Database File Storage v4 (data)
818
+
819
+ # Cache file for the database of Zope (done by ClientStorage)
820
+ 0 string ZEC3 Zope Object Database Client Cache File (data)
821
+
822
+ # IDA (Interactive Disassembler) database
823
+ 0 string IDA1 IDA (Interactive Disassembler) database
824
+
825
+ # Hopper (reverse engineering tool) https://www.hopperapp.com/
826
+ 0 string hopperdb Hopper database
827
+
828
+ # URL: https://en.wikipedia.org/wiki/Panorama_(database_engine)
829
+ # Reference: http://www.provue.com/Panorama/
830
+ # From: Joerg Jenderek
831
+ # NOTE: test only versions 4 and 6.0 with Windows
832
+ # length of Panorama database name
833
+ 5 ubyte >0
834
+ # look after database name for "some" null bits
835
+ >(5.B+7) ubelong&0xF3ffF000 0
836
+ # look for first keyword
837
+ >>&1 search/2 DESIGN Panorama database
838
+ #!:mime application/x-panorama-database
839
+ !:apple KASXZEPD
840
+ !:ext pan
841
+ # database name
842
+ >>>5 pstring x \b, "%s"
843
+
844
+ #
845
+ #
846
+ # askSam Database by Stefan A. Haubenthal <polluks@web.de>
847
+ 0 string askw40\0 askSam DB
848
+
849
+ #
850
+ #
851
+ # MUIbase Database Tool by Stefan A. Haubenthal <polluks@web.de>
852
+ 0 string MBSTV\040 MUIbase DB
853
+ >6 string x version %s
854
+
855
+ #
856
+ # CDB database
857
+ 0 string NBCDB\012 NetBSD Constant Database
858
+ >7 byte x \b, version %d
859
+ >8 string x \b, for '%s'
860
+ >24 lelong x \b, datasize %d
861
+ >28 lelong x \b, entries %d
862
+ >32 lelong x \b, index %d
863
+ >36 lelong x \b, seed %#x
864
+
865
+ #
866
+ # Redis RDB - https://redis.io/topics/persistence
867
+ 0 string REDIS Redis RDB file,
868
+ >5 regex [0-9][0-9][0-9][0-9] version %s
869
+
870
+ # Mork database.
871
+ # Used by older versions of Mozilla Suite and Firefox,
872
+ # and current versions of Thunderbird.
873
+ # From: David Korth <gerbilsoft@gerbilsoft.com>
874
+ 0 string //\ <!--\ <mdb:mork:z\ v=" Mozilla Mork database
875
+ >23 string x \b, version %.3s
876
+
877
+ # URL: https://en.wikipedia.org/wiki/Management_Information_Format
878
+ # Reference: https://www.dmtf.org/sites/default/files/standards/documents/DSP0005.pdf
879
+ # From: Joerg Jenderek
880
+ # Note: only tested with monitor asset reports of Dell Display Manager
881
+ # skip start like Language=fr|CA|iso8859-1
882
+ 0 search/27/C Start\040Component DMI Management Information Format
883
+ #!:mime text/plain
884
+ !:mime text/x-dmtf-mif
885
+ !:ext mif
886
+