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,773 @@
1
+
2
+ #------------------------------------------------------------------------------
3
+ # $File: apple,v 1.48 2023/05/01 14:20:21 christos Exp $
4
+ # apple: file(1) magic for Apple file formats
5
+ #
6
+ 0 search/1/t FiLeStArTfIlEsTaRt binscii (apple ][) text
7
+ 0 string \x0aGL Binary II (apple ][) data
8
+ 0 string \x76\xff Squeezed (apple ][) data
9
+ 0 string NuFile NuFile archive (apple ][) data
10
+ 0 string N\xf5F\xe9l\xe5 NuFile archive (apple ][) data
11
+ 0 belong 0x00051600 AppleSingle encoded Macintosh file
12
+ 0 belong 0x00051607 AppleDouble encoded Macintosh file
13
+
14
+ # Type: Apple Emulator A2R format
15
+ # From: Greg Wildman <greg@apple2.org.za>
16
+ # Ref: https://applesaucefdc.com/a2r2-reference/
17
+ # Ref: https://applesaucefdc.com/a2r/
18
+ 0 string A2R
19
+ >3 string \x31\xFF\x0A\x0D\x0A Applesauce A2R 1.x Disk Image
20
+ >3 string \x32\xFF\x0A\x0D\x0A Applesauce A2R 2.x Disk Image
21
+ >3 string \x33\xFF\x0A\x0D\x0A Applesauce A2R 3.x Disk Image
22
+ >8 string INFO
23
+ >>49 byte 01 \b, 5.25″ SS 40trk
24
+ >>49 byte 02 \b, 3.5″ DS 80trk
25
+ >>49 byte 03 \b, 5.25″ DS 80trk
26
+ >>49 byte 04 \b, 5.25″ DS 40trk
27
+ >>49 byte 05 \b, 3.5″ DS 80trk
28
+ >>49 byte 06 \b, 8″ DS
29
+ >>50 byte 01 \b, write protected
30
+ >>51 byte 01 \b, cross track synchronized
31
+ >>17 string/T x \b, %.32s
32
+
33
+ # Type: Apple Emulator WOZ format
34
+ # From: Greg Wildman <greg@apple2.org.za>
35
+ # Ref: https://applesaucefdc.com/woz/reference/
36
+ # Ref: https://applesaucefdc.com/woz/reference2/
37
+ 0 string WOZ
38
+ >3 string \x31\xFF\x0A\x0D\x0A Apple ][ WOZ 1.0 Disk Image
39
+ >3 string \x32\xFF\x0A\x0D\x0A Apple ][ WOZ 2.0 Disk Image
40
+ >12 string INFO
41
+ >>21 byte 01 \b, 5.25 inch
42
+ >>21 byte 02 \b, 3.5 inch
43
+ >>22 byte 01 \b, write protected
44
+ >>23 byte 01 \b, cross track synchronized
45
+ >>25 string/T x \b, %.32s
46
+
47
+ # Type: Apple Macintosh Emulator MOOF format
48
+ # From: Greg Wildman <greg@apple2.org.za>
49
+ # Ref: https://applesaucefdc.com/moof-reference/
50
+ 0 string MOOF
51
+ >4 string \xFF\x0A\x0D\x0A Apple Macintosh MOOF Disk Image
52
+ >12 string INFO
53
+ >>21 byte 01 \b, SSDD GCR (400K)
54
+ >>21 byte 02 \b, DSDD GCR (800K)
55
+ >>21 byte 03 \b, DSHD MFM (1.44M)
56
+ >>22 byte 01 \b, write protected
57
+ >>23 byte 01 \b, cross track synchronized
58
+ >>25 string/T x \b, %.32s
59
+
60
+ # Type: Apple Emulator disk images
61
+ # From: Greg Wildman <greg@apple2.org.za>
62
+ # ProDOS boot loader?
63
+ 0 string \x01\x38\xB0\x03\x4C Apple ProDOS Image
64
+ # Detect Volume Directory block ($02)
65
+ >0x400 string \x00\x00\x03\x00
66
+ >>0x404 byte &0xF0
67
+ >>>0x405 string x \b, Volume /%s
68
+ >>>0x429 uleshort x \b, %u Blocks
69
+ # ProDOS ordered ?
70
+ >0xb00 string \x00\x00\x03\x00
71
+ >>0xb04 byte &0xF0
72
+ >>>0xb05 string x \b, Volume /%s
73
+ >>>0xb29 uleshort x \b, %u Blocks
74
+ #
75
+ # Proboot HD
76
+ 0 string \x01\x8A\x48\xD8\x2C\x82\xC0\x8D\x0E\xC0\x8D\x0C Apple ProDOS ProBoot Image
77
+ >0x400 string \x00\x00\x03\x00
78
+ >>0x404 byte &0xF0
79
+ >>>0x405 string x \b, Volume /%s
80
+ >>>0x429 uleshort x \b, %u Blocks
81
+ >0xb00 string \x00\x00\x03\x00
82
+ >>0xb04 byte &0xF0
83
+ >>>0xb05 string x \b, Volume /%s
84
+ >>>0xb29 uleshort x \b, %u Blocks
85
+ 0 string \x01\xA8\x8A\x20\x7B\xF8\x29\x07\x09\xC0\x99\x30 Apple ProDOS ProBoot Image
86
+ >0x400 string \x00\x00\x03\x00
87
+ >>0x404 byte &0xF0
88
+ >>>0x405 string x \b, Volume /%s
89
+ >>>0x429 uleshort x \b, %u Blocks
90
+ >0xb00 string \x00\x00\x03\x00
91
+ >>0xb04 byte &0xF0
92
+ >>>0xb05 string x \b, Volume /%s
93
+ >>>0xb29 uleshort x \b, %u Blocks
94
+ 0 string \x01\x4A\xD0\x34\xE6\x3D\x8A\x20\x7B\xF8\x09\xC0 Apple ProDOS ProBoot Image
95
+ >0x400 string \x00\x00\x03\x00
96
+ >>0x404 byte &0xF0
97
+ >>>0x405 string x \b, Volume /%s
98
+ >>>0x429 uleshort x \b, %u Blocks
99
+ >0xb00 string \x00\x00\x03\x00
100
+ >>0xb04 byte &0xF0
101
+ >>>0xb05 string x \b, Volume /%s
102
+ >>>0xb29 uleshort x \b, %u Blocks
103
+ #
104
+ # ProDOS formatted
105
+ 0 string \x01\xBD\x88\xC0\x20\x2F\xFB\x20\x58\xFC\x20\x40 Apple ProDOS Unbootable Image
106
+ >0x400 string \x00\x00\x03\x00
107
+ >>0x404 byte &0xF0
108
+ >>>0x405 string x \b, Volume /%s
109
+ >>>0x429 uleshort x \b, %u Blocks
110
+ >0xb00 string \x00\x00\x03\x00
111
+ >>0xb04 byte &0xF0
112
+ >>>0xb05 string x \b, Volume /%s
113
+ >>>0xb29 uleshort x \b, %u Blocks
114
+ 0 string \x01\x38\xB0\x03\x4C\x1C\x09\x78\x86\x43\xC9\x03 Apple ProDOS Unbootable Image
115
+ >0x400 string \x00\x00\x03\x00
116
+ >>0x404 byte &0xF0
117
+ >>>0x405 string x \b, Volume /%s
118
+ >>>0x429 uleshort x \b, %u Blocks
119
+ >0xb00 string \x00\x00\x03\x00
120
+ >>0xb04 byte &0xF0
121
+ >>>0xb05 string x \b, Volume /%s
122
+ >>>0xb29 uleshort x \b, %u Blocks
123
+ #
124
+ # DOS3 boot loader
125
+ 0 string \x01\xA5\x27\xC9\x09\xD0
126
+ >0x11001 byte 0x11
127
+ >>0x11003 ubyte x Apple DOS 3.%u Image
128
+ >>0x11006 ubyte x \b, Volume #%03u
129
+ >>0x11034 ubyte x \b, %u Tracks
130
+ >>0x11035 ubyte x \b, %u Sectors
131
+ >>0x11036 uleshort x \b, %u bytes per sector
132
+ #
133
+ # DOS3 uninitialized disk
134
+ 0 string \x01\xA6\x2B\xBD\x88\xC0\x8A\x4A\x4A
135
+ >0x11001 byte 0x11
136
+ >>0x11003 ubyte x Apple DOS 3.%u Unbootable Image
137
+ >>>0x11006 ubyte x \b, Volume #%03u
138
+ >>>0x11034 ubyte x \b, %u Tracks
139
+ >>>0x11035 ubyte x \b, %u Sectors
140
+ >>>0x11036 uleshort x \b, %u bytes per sector
141
+ #
142
+ # Pascal boot loader?
143
+ 0 string \x01\xE0\x60\xF0\x03\x4C\xE3\x08\xAD
144
+ >0xd6 pstring SYSTEM.APPLE
145
+ >>0xb00 leshort 0x0000
146
+ >>>0xb04 leshort 0x0000 Apple Pascal Image
147
+ >>>>0xb06 pstring x \b, Volume %s:
148
+ >>>>0xb0e leshort x \b, %u Blocks
149
+ >>>>0xb10 leshort x \b, %u Files
150
+ #
151
+ # Diversi Dos boot loader?
152
+ 0 string \x01\xA8\xAD\x81\xC0\xEE\x09\x08\xAD
153
+ >0x11001 string \x11\x0F\x03 Apple Diversi Dos Image
154
+ >>0x11006 byte x \b, Volume %u
155
+ >>0x11034 byte x \b, %u Tracks
156
+ >>0x11035 byte x \b, %u Sectors
157
+ >>0x11036 leshort x \b, %u bytes per sector
158
+
159
+ # Type: Apple Emulator 2IMG format
160
+ # From: Radek Vokal <rvokal@redhat.com>
161
+ # Update: Greg Wildman <greg@apple2.org.za>
162
+ 0 string 2IMG Apple ][ 2IMG Disk Image
163
+ >4 clear x
164
+ >4 string XGS! \b, XGS
165
+ >4 string CTKG \b, Catakig
166
+ >4 string ShIm \b, Sheppy's ImageMaker
167
+ >4 string SHEP \b, Sheppy's ImageMaker
168
+ >4 string WOOF \b, Sweet 16
169
+ >4 string B2TR \b, Bernie ][ the Rescue
170
+ >4 string \!nfc \b, ASIMOV2
171
+ >4 string \>BD\< \b, Brutal Deluxe's Cadius
172
+ >4 string CdrP \b, CiderPress
173
+ >4 string Vi][ \b, Virtual ][
174
+ >4 string PRFS \b, ProFUSE
175
+ >4 string FISH \b, FishWings
176
+ >4 string RVLW \b, Revival for Windows
177
+ >4 default x
178
+ >>4 string x \b, Creator tag "%-4.4s"
179
+ >0xc byte 00 \b, DOS 3.3 sector order
180
+ >>0x10 byte 00 \b, Volume 254
181
+ >>0x10 byte&0x7f x \b, Volume %u
182
+ >0xc byte 01 \b, ProDOS sector order
183
+ # Detect Volume Directory block ($02) + 2mg header offset
184
+ >>0x440 string \x00\x00\x03\x00
185
+ >>>0x444 byte &0xF0
186
+ >>>>0x445 string x \b, Volume /%s
187
+ >>>>0x469 uleshort x \b, %u Blocks
188
+ >0xc byte 02 \b, NIB data
189
+
190
+ # Type: Peter Ferrie QBoot
191
+ # From: Greg Wildman <greg@apple2.org.za>
192
+ # Ref: https://github.com/peterferrie/qboot
193
+ 0 string \x01\x4A\xA8\x69\x0F\x85\x27\xC9
194
+ >8 string \x12\xF0\x10\xE6\x3D\x86\xDA\x8A Apple ][ QBoot Image
195
+
196
+ # Type: Peter Ferrie 0Boot
197
+ # From: Greg Wildman <greg@apple2.org.za>
198
+ # Ref: https://github.com/peterferrie/0boot
199
+ 0 string \x01\x4A\xA8\x69\x0F\x85\x27\xC9
200
+ >8 string \x12\xF0\x10\xE6\x3D\x86\xDA\x8A Apple ][ 0Boot Image
201
+
202
+ # Different proprietary boot sectors
203
+ 0 string \x01\x0F\x21\x74\x00\x01\x6B\x00\x02\x30\x81\x5D Apple ][ Disk Image
204
+ 0 string \x01\x20\x58\xFC\xA2\x00\x8E\x78\x04\x8E\xF4\x03 Apple ][ Disk Image
205
+ 0 string \x01\x20\x58\xFC\xAD\x51\xC0\xAD\x54\xC0\xA6\x2B Apple ][ Disk Image
206
+ 0 string \x01\x20\x89\xFE\x20\x93\xFE\xA6\x2B\xBD\x88\xC0 Apple ][ Disk Image
207
+ 0 string \x01\x20\x93\xFE\x20\x89\xFE\x4C\x25\x08\x68\x85 Apple ][ Disk Image
208
+ 0 string \x01\x20\x93\xFE\x20\x89\xFE\x4C\x2D\x08\x68\x85 Apple ][ Disk Image
209
+ 0 string \x01\x38\x90\x2A\xC9\x01\xF0\x33\xA8\xC8\xC0\x10 Apple ][ Disk Image
210
+ 0 string \x01\x38\xB0\x03\x4C\x32\xA1\x87\x43\xC9\x03\x08 Apple ][ Disk Image
211
+ 0 string \x01\x4C\x04\x08\xA9\x2A\x8D\x02\x08\x86\x2B\xEE Apple ][ Disk Image
212
+ 0 string \x01\x4C\x60\x08\x09\xD0\x18\xA5\x2B\x4A\x4A\x4A Apple ][ Disk Image
213
+ 0 string \x01\x4C\x92\x08\x01\x08\xA2\x00\xB5\x00\x9D\x00 Apple ][ Disk Image
214
+ 0 string \x01\x4C\xB3\x08\x09\xD0\x18\xA5\x2B\x4A\x4A\x4A Apple ][ Disk Image
215
+ 0 string \x01\x8D\xFB\x03\x8E\xFC\x03\x8C\xFD\x03\x8A\x29 Apple ][ Disk Image
216
+ 0 string \x01\xA2\xFF\x9A\xD8\x20\x20\x08\x20\x34\x08\xAD Apple ][ Disk Image
217
+ 0 string \x01\xA5\x27\xBD\x88\xC0\x2C\x10\xC0\xA2\x00\xA9 Apple ][ Disk Image
218
+ 0 string \x01\xA5\x2B\xAE\x51\xC0\xEA\xAA\xBD\x88\xC0\x20 Apple ][ Disk Image
219
+ 0 string \x01\xA6\x27\xBD\x0B\x08\x48\xBD\x0A\x08\x48\x85 Apple ][ Disk Image
220
+ 0 string \x01\xA6\x2B\xBD\x88\xC0\x20\x58\xFC\xA9\x01\x85 Apple ][ Disk Image
221
+ 0 string \x01\xA6\x2B\xBD\x88\xC0\x20\x58\xFC\xA9\x25\x85 Apple ][ Disk Image
222
+ 0 string \x01\xA8\xC0\x0F\x90\x16\xF0\x12\xA0\xFF\x18\xAD Apple ][ Disk Image
223
+ 0 string \x01\xA9\x00\x85\xF0\xA9\x04\x85\xF1\xA0\x00\xA9 Apple ][ Disk Image
224
+ 0 string \x01\xA9\x5C\x8D\xF2\x03\xA9\xC6\x8D\xF3\x03\x49 Apple ][ Disk Image
225
+ 0 string \x01\xA9\x60\x8D\x01\x08\x20\x2F\xFB\x20\x58\xFC Apple ][ Disk Image
226
+ 0 string \x01\xA9\x60\x8D\x01\x08\x20\x49\x08\xA9\x0A\x85 Apple ][ Disk Image
227
+ 0 string \x01\xA9\x60\x8D\x01\x08\x2C\x82\xC0\xBD\x88\xC0 Apple ][ Disk Image
228
+ 0 string \x01\xA9\x60\x8D\x01\x08\x86\x43\x8A\x4A\x4A\x4A Apple ][ Disk Image
229
+ 0 string \x01\xA9\x60\x8D\x01\x08\xA2\x00\x86\xFF\xB5\x00 Apple ][ Disk Image
230
+ 0 string \x01\xA9\x60\x8D\x01\x08\xA2\x00\xB5\x00\x9D\x00 Apple ][ Disk Image
231
+ 0 string \x01\xA9\x60\x8D\x01\x08\xA9\xB2\x8D\xF2\x03\xA9 Apple ][ Disk Image
232
+ 0 string \x01\xA9\x60\x8D\x01\x08\xA9\xFF\x8D\xF3\x03\x8D Apple ][ Disk Image
233
+ 0 string \x01\xAC\x00\x08\xF0\x19\xB9\x30\x08\x85\x3D\xCE Apple ][ Disk Image
234
+ 0 string \x01\xAC\x23\x08\x30\x2E\xB9\x24\x08\x85\x3D\xCE Apple ][ Disk Image
235
+ 0 string \x01\xAD\x00\x08\xC9\x09\xB0\x20\x69\x02\x8D\x00 Apple ][ Disk Image
236
+ 0 string \x01\xB0\x00\xA9\x3C\x8D\x02\x08\x86\x2B\x8A\x4A Apple ][ Disk Image
237
+ 0 string \x01\xB0\x00\xA9\x3C\x8D\x02\x08\xA9\xF5\x8D\xF2 Apple ][ Disk Image
238
+ 0 string \x01\xB0\x00\xA9\x3F\x8D\x02\x08\x86\x2B\x8E\xF4 Apple ][ Disk Image
239
+ 0 string \x01\xB0\x00\xA9\x48\x8D\x02\x08\x86\x2B\x8E\xF4 Apple ][ Disk Image
240
+ 0 string \x01\xBD\x88\xC0\x8A\x4A\x4A\x4A\x4A\x09\xC0\x8D Apple ][ Disk Image
241
+ 0 string \x01\xBD\x88\xC0\x8A\x4A\x4A\x4A\x4A\x8D\x2F\x08 Apple ][ Disk Image
242
+ 0 string \x01\xD8\x2C\x81\xC0\xA9\x60\x4D\x58\xFF\xD0\xFE Apple ][ Disk Image
243
+ 0 string \x01\xD8\x78\xBD\x88\xC0\xA9\xFD\x85\x37\x85\x39 Apple ][ Disk Image
244
+ 0 string \x01\xE0\x60\xF0\x03\x4C\x16\x09\xAD\x00\x08\xC9 Apple ][ Disk Image
245
+ 0 string \x01\xE0\x60\xF0\x03\x4C\xCB\x08\xAD\x00\x08\xC9 Apple ][ Disk Image
246
+ 0 string \x01\xE0\x60\xF0\x03\x4C\xEE\x08\xAD\x00\x08\xC9 Apple ][ Disk Image
247
+ 0 string \x01\xE0\x60\xF0\x03\x4C\xEF\x08\xAD\x00\x08\xC9 Apple ][ Disk Image
248
+ 0 string \x01\xE0\x70\xB0\x04\xE0\x40\xB0\x39\xBD\x88\xC0 Apple ][ Disk Image
249
+ 0 string \x01\xEA\x8D\xF4\x03\xA9\x60\x9D\x88\xC0\x8D\x51 Apple ][ Disk Image
250
+
251
+ # magic for Newton PDA package formats
252
+ # from Ruda Moura <ruda@helllabs.org>
253
+ 0 string package0 Newton package, NOS 1.x,
254
+ >12 belong &0x80000000 AutoRemove,
255
+ >12 belong &0x40000000 CopyProtect,
256
+ >12 belong &0x10000000 NoCompression,
257
+ >12 belong &0x04000000 Relocation,
258
+ >12 belong &0x02000000 UseFasterCompression,
259
+ >16 belong x version %d
260
+
261
+ 0 string package1 Newton package, NOS 2.x,
262
+ >12 belong &0x80000000 AutoRemove,
263
+ >12 belong &0x40000000 CopyProtect,
264
+ >12 belong &0x10000000 NoCompression,
265
+ >12 belong &0x04000000 Relocation,
266
+ >12 belong &0x02000000 UseFasterCompression,
267
+ >16 belong x version %d
268
+
269
+ 0 string package4 Newton package,
270
+ >8 byte 8 NOS 1.x,
271
+ >8 byte 9 NOS 2.x,
272
+ >12 belong &0x80000000 AutoRemove,
273
+ >12 belong &0x40000000 CopyProtect,
274
+ >12 belong &0x10000000 NoCompression,
275
+
276
+ # The following entries for the Apple II are for files that have
277
+ # been transferred as raw binary data from an Apple, without having
278
+ # been encapsulated by any of the above archivers.
279
+ #
280
+ # In general, Apple II formats are hard to identify because Apple DOS
281
+ # and especially Apple ProDOS have strong typing in the file system and
282
+ # therefore programmers never felt much need to include type information
283
+ # in the files themselves.
284
+ #
285
+ # Eric Fischer <enf@pobox.com>
286
+
287
+ # AppleWorks word processor:
288
+ # URL: https://en.wikipedia.org/wiki/AppleWorks
289
+ # Reference: http://www.gno.org/pub/apple2/doc/apple/filetypes/ftn.1a.xxxx
290
+ # Update: Joerg Jenderek
291
+ # NOTE:
292
+ # The "O" is really the magic number, but that's so common that it's
293
+ # necessary to check the tab stops that follow it to avoid false positives.
294
+ # and/or look for unused bits of booleans bytes like zoom, paginated, mail merge
295
+ # the newer AppleWorks is from claris with extension CWK
296
+ 4 string O
297
+ # test for unused bits of zoom- , paginated-boolean bytes
298
+ >84 ubequad ^0x00Fe00000000Fe00
299
+ # look for tabstop definitions "=" no tab, "|" no tab
300
+ # "<" left tab,"^" center tab,">" right tab, "." decimal tab,
301
+ # unofficial "!" other , "\x8a" other
302
+ # official only if SFMinVers is nonzero
303
+ >>5 regex/s [=.<>|!^\x8a]{79} AppleWorks Word Processor
304
+ # AppleWorks Word Processor File (Apple II)
305
+ # ./apple (version 5.25) labeled the entry as "AppleWorks word processor data"
306
+ # application/x-appleworks is mime type for claris version with cwk extension
307
+ !:mime application/x-appleworks3
308
+ # http://home.earthlink.net/~hughhood/appleiiworksenvoy/
309
+ # ('p' + 1-byte ProDOS File Type + 2-byte ProDOS Aux Type')
310
+ # $70 $1A $F8 $FF is this the apple type ?
311
+ #:apple pdosp^Z\xf8\xff
312
+ !:ext awp
313
+ # minimum version needed to read this files. SFMinVers (0 , 30~3.0 )
314
+ >>>183 ubyte 30 3.0
315
+ >>>183 ubyte !30
316
+ >>>>183 ubyte !0 %#x
317
+ # usual tabstop start sequence "=====<"
318
+ >>>5 string x \b, tabstop ruler "%6.6s"
319
+ # tabstop ruler
320
+ #>>>5 string >\0 \b, tabstops "%-79s"
321
+ # zoom switch
322
+ >>>85 byte&0x01 >0 \b, zoomed
323
+ # whether paginated
324
+ >>>90 byte&0x01 >0 \b, paginated
325
+ # contains any mail-merge commands
326
+ >>>92 byte&0x01 >0 \b, with mail merge
327
+ # left margin in 1/10 inches ( normally 0 or 10 )
328
+ >>>91 ubyte >0
329
+ >>>>91 ubyte x \b, %d/10 inch left margin
330
+
331
+ # AppleWorks database:
332
+ #
333
+ # This isn't really a magic number, but it's the closest thing to one
334
+ # that I could find. The 1 and 2 really mean "order in which you defined
335
+ # categories" and "left to right, top to bottom," respectively; the D and R
336
+ # mean that the cursor should move either down or right when you press Return.
337
+
338
+ #30 string \x01D AppleWorks database data
339
+ #30 string \x02D AppleWorks database data
340
+ #30 string \x01R AppleWorks database data
341
+ #30 string \x02R AppleWorks database data
342
+
343
+ # AppleWorks spreadsheet:
344
+ #
345
+ # Likewise, this isn't really meant as a magic number. The R or C means
346
+ # row- or column-order recalculation; the A or M means automatic or manual
347
+ # recalculation.
348
+
349
+ #131 string RA AppleWorks spreadsheet data
350
+ #131 string RM AppleWorks spreadsheet data
351
+ #131 string CA AppleWorks spreadsheet data
352
+ #131 string CM AppleWorks spreadsheet data
353
+
354
+ # Applesoft BASIC:
355
+ #
356
+ # This is incredibly sloppy, but will be true if the program was
357
+ # written at its usual memory location of 2048 and its first line
358
+ # number is less than 256. Yuck.
359
+ # update by Joerg Jenderek at Feb 2013
360
+
361
+ # GRR: this test is still too general as it catches also Gujin BOOT144.SYS (0xfa080000)
362
+ #0 belong&0xff00ff 0x80000 Applesoft BASIC program data
363
+ 0 belong&0x00ff00ff 0x00080000
364
+ # assuming that line number must be positive
365
+ >2 leshort >0 Applesoft BASIC program data, first line number %d
366
+ #>2 leshort x \b, first line number %d
367
+
368
+ # ORCA/EZ assembler:
369
+ #
370
+ # This will not identify ORCA/M source files, since those have
371
+ # some sort of date code instead of the two zero bytes at 6 and 7
372
+ # XXX Conflicts with ELF
373
+ #4 belong&0xff00ffff 0x01000000 ORCA/EZ assembler source data
374
+ #>5 byte x \b, build number %d
375
+
376
+ # Broderbund Fantavision
377
+ #
378
+ # I don't know what these values really mean, but they seem to recur.
379
+ # Will they cause too many conflicts?
380
+
381
+ # Probably :-)
382
+ #2 belong&0xFF00FF 0x040008 Fantavision movie data
383
+
384
+ # Some attempts at images.
385
+ #
386
+ # These are actually just bit-for-bit dumps of the frame buffer, so
387
+ # there's really no reasonably way to distinguish them except for their
388
+ # address (if preserved) -- 8192 or 16384 -- and their length -- 8192
389
+ # or, occasionally, 8184.
390
+ #
391
+ # Nevertheless this will manage to catch a lot of images that happen
392
+ # to have a solid-colored line at the bottom of the screen.
393
+
394
+ # GRR: Magic too weak
395
+ #8144 string \x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F Apple II image with white background
396
+ #8144 string \x55\x2A\x55\x2A\x55\x2A\x55\x2A Apple II image with purple background
397
+ #8144 string \x2A\x55\x2A\x55\x2A\x55\x2A\x55 Apple II image with green background
398
+ #8144 string \xD5\xAA\xD5\xAA\xD5\xAA\xD5\xAA Apple II image with blue background
399
+ #8144 string \xAA\xD5\xAA\xD5\xAA\xD5\xAA\xD5 Apple II image with orange background
400
+
401
+ # Beagle Bros. Apple Mechanic fonts
402
+
403
+ 0 belong&0xFF00FFFF 0x6400D000 Apple Mechanic font
404
+
405
+ # Apple Universal Disk Image Format (UDIF) - dmg files.
406
+ # From Johan Gade.
407
+ # These entries are disabled for now until we fix the following issues.
408
+ #
409
+ # Note there might be some problems with the "VAX COFF executable"
410
+ # entry. Note this entry should be placed before the mac filesystem section,
411
+ # particularly the "Apple Partition data" entry.
412
+ #
413
+ # The intended meaning of these tests is, that the file is only of the
414
+ # specified type if both of the lines are correct - i.e. if the first
415
+ # line matches and the second doesn't then it is not of that type.
416
+ #
417
+ #0 long 0x7801730d
418
+ #>4 long 0x62626060 UDIF read-only zlib-compressed image (UDZO)
419
+ #
420
+ # Note that this entry is recognized correctly by the "Apple Partition
421
+ # data" entry - however since this entry is more specific - this
422
+ # information seems to be more useful.
423
+ #0 long 0x45520200
424
+ #>0x410 string disk\ image UDIF read/write image (UDRW)
425
+
426
+ # From: Toby Peterson <toby@apple.com>
427
+ # From https://www.nationalarchives.gov.uk/pronom/fmt/866
428
+ 0 string bplist00
429
+ >8 search/500 WebMainResource Apple Safari Webarchive
430
+ !:mime application/x-webarchive
431
+ !:strength +50
432
+ 0 string bplist00 Apple binary property list
433
+ !:mime application/x-bplist
434
+
435
+ # Apple binary property list (bplist)
436
+ # Assumes version bytes are hex.
437
+ # Provides content hints for version 0 files. Assumes that the root
438
+ # object is the first object (true for CoreFoundation implementation).
439
+ # From: David Remahl <dremahl@apple.com>
440
+ 0 string bplist
441
+ >6 byte x \bCoreFoundation binary property list data, version %#c
442
+ >>7 byte x \b%c
443
+ >6 string 00 \b
444
+ >>8 byte&0xF0 0x00 \b
445
+ >>>8 byte&0x0F 0x00 \b, root type: null
446
+ >>>8 byte&0x0F 0x08 \b, root type: false boolean
447
+ >>>8 byte&0x0F 0x09 \b, root type: true boolean
448
+ >>8 byte&0xF0 0x10 \b, root type: integer
449
+ >>8 byte&0xF0 0x20 \b, root type: real
450
+ >>8 byte&0xF0 0x30 \b, root type: date
451
+ >>8 byte&0xF0 0x40 \b, root type: data
452
+ >>8 byte&0xF0 0x50 \b, root type: ascii string
453
+ >>8 byte&0xF0 0x60 \b, root type: unicode string
454
+ >>8 byte&0xF0 0x80 \b, root type: uid (CORRUPT)
455
+ >>8 byte&0xF0 0xa0 \b, root type: array
456
+ >>8 byte&0xF0 0xd0 \b, root type: dictionary
457
+
458
+ # Apple/NeXT typedstream data
459
+ # Serialization format used by NeXT and Apple for various
460
+ # purposes in YellowStep/Cocoa, including some nib files.
461
+ # From: David Remahl <dremahl@apple.com>
462
+ 2 string typedstream NeXT/Apple typedstream data, big endian
463
+ >0 byte x \b, version %d
464
+ >0 byte <5 \b
465
+ >>13 byte 0x81 \b
466
+ >>>14 ubeshort x \b, system %d
467
+ 2 string streamtyped NeXT/Apple typedstream data, little endian
468
+ >0 byte x \b, version %d
469
+ >0 byte <5 \b
470
+ >>13 byte 0x81 \b
471
+ >>>14 uleshort x \b, system %d
472
+
473
+ #------------------------------------------------------------------------------
474
+ # CAF: Apple CoreAudio File Format
475
+ #
476
+ # Container format for high-end audio purposes.
477
+ # From: David Remahl <dremahl@apple.com>
478
+ #
479
+ 0 string caff CoreAudio Format audio file
480
+ >4 beshort <10 version %d
481
+ >6 beshort x
482
+
483
+
484
+ #------------------------------------------------------------------------------
485
+ # Keychain database files
486
+ 0 string kych Mac OS X Keychain File
487
+
488
+ #------------------------------------------------------------------------------
489
+ # Code Signing related file types
490
+ 0 belong 0xfade0c00 Mac OS X Code Requirement
491
+ >8 belong 1 (opExpr)
492
+ >4 belong x - %d bytes
493
+
494
+ 0 belong 0xfade0c01 Mac OS X Code Requirement Set
495
+ >8 belong >1 containing %d items
496
+ >4 belong x - %d bytes
497
+
498
+ 0 belong 0xfade0c02 Mac OS X Code Directory
499
+ >8 belong x version %x
500
+ >12 belong >0 flags %#x
501
+ >4 belong x - %d bytes
502
+
503
+ 0 belong 0xfade0cc0 Mac OS X Detached Code Signature (non-executable)
504
+ >4 belong x - %d bytes
505
+
506
+ 0 belong 0xfade0cc1 Mac OS X Detached Code Signature
507
+ >8 belong >1 (%d elements)
508
+ >4 belong x - %d bytes
509
+
510
+ # From: "Nelson A. de Oliveira" <naoliv@gmail.com>
511
+ # .vdi
512
+ 4 string innotek\ VirtualBox\ Disk\ Image %s
513
+
514
+ # Apple disk partition stuff
515
+ # URL: https://en.wikipedia.org/wiki/Apple_Partition_Map
516
+ # Reference: https://ftp.netbsd.org/pub/NetBSD/NetBSD-current/src/sys/sys/bootblock.h
517
+ # Update: Joerg Jenderek
518
+ # "ER" is APPLE_DRVR_MAP_MAGIC signature
519
+ 0 beshort 0x4552
520
+ # display Apple Driver Map (strength=50) after Syslinux bootloader (71)
521
+ #!:strength +0
522
+ # strengthen the magic by looking for used blocksizes 512 2048
523
+ >2 ubeshort&0xf1FF 0 Apple Driver Map
524
+ # last 6 bytes for padding found are 0 or end with 55AAh marker for MBR hybrid
525
+ #>>504 ubequad&0x0000FFffFFff0000 0
526
+ !:mime application/x-apple-diskimage
527
+ !:apple ????devr
528
+ # https://en.wikipedia.org/wiki/Apple_Disk_Image
529
+ !:ext dmg/iso
530
+ # sbBlkSize for driver descriptor map 512 2048
531
+ >>2 beshort x \b, blocksize %d
532
+ # sbBlkCount sometimes garbish like
533
+ # 0xb0200000 for unzlibed install_flash_player_19.0.0.245_osx.dmg
534
+ # 0xf2720100 for bunziped Firefox 48.0-2.dmg
535
+ # 0xeb02ffff for super_grub2_disk_hybrid_2.02s3.iso
536
+ # 0x00009090 by syslinux-6.03/utils/isohybrid.c
537
+ >>4 ubelong x \b, blockcount %u
538
+ # following device/driver information not very useful
539
+ # device type 0 1 (37008 garbage for super_grub2_disk_hybrid_2.02s3.iso)
540
+ >>8 ubeshort x \b, devtype %u
541
+ # device id 0 1 (37008 garbage for super_grub2_disk_hybrid_2.02s3.iso)
542
+ >>10 ubeshort x \b, devid %u
543
+ # driver data 0 (2425393296 garbage for super_grub2_disk_hybrid_2.02s3.iso)
544
+ >>12 ubelong >0
545
+ >>>12 ubelong x \b, driver data %u
546
+ # number of driver descriptors sbDrvrCount <= 61
547
+ # (37008 garbage for super_grub2_disk_hybrid_2.02s3.iso)
548
+ >>16 ubeshort x \b, driver count %u
549
+ # 61 * apple_drvr_descriptor[8]. information not very useful or same as in partition map
550
+ # >>18 use apple-driver-map
551
+ # >>26 use apple-driver-map
552
+ # # ...
553
+ # >>500 use apple-driver-map
554
+ # number of partitions is always same in every partition (map block count)
555
+ #>>0x0204 ubelong x \b, %u partitions
556
+ >>0x0204 ubelong >0 \b, contains[@0x200]:
557
+ >>>0x0200 use apple-apm
558
+ >>0x0204 ubelong >1 \b, contains[@0x400]:
559
+ >>>0x0400 use apple-apm
560
+ >>0x0204 ubelong >2 \b, contains[@0x600]:
561
+ >>>0x0600 use apple-apm
562
+ >>0x0204 ubelong >3 \b, contains[@0x800]:
563
+ >>>0x0800 use apple-apm
564
+ >>0x0204 ubelong >4 \b, contains[@0xA00]:
565
+ >>>0x0A00 use apple-apm
566
+ >>0x0204 ubelong >5 \b, contains[@0xC00]:
567
+ >>>0x0C00 use apple-apm
568
+ >>0x0204 ubelong >6 \b, contains[@0xE00]:
569
+ >>>0x0E00 use apple-apm
570
+ >>0x0204 ubelong >7 \b, contains[@0x1000]:
571
+ >>>0x1000 use apple-apm
572
+ # display apple driver descriptor map (start-block, # blocks in sbBlkSize sizes, type)
573
+ 0 name apple-driver-map
574
+ >0 ubequad !0
575
+ # descBlock first block of driver
576
+ >>0 ubelong x \b, driver start block %u
577
+ # descSize driver size in blocks
578
+ >>4 ubeshort x \b, size %u
579
+ # descType driver system type 1 701h F8FFh FFFFh
580
+ >>6 ubeshort x \b, type %#x
581
+
582
+ # URL: https://en.wikipedia.org/wiki/Apple_Partition_Map
583
+ # Reference: https://opensource.apple.com/source/IOStorageFamily/IOStorageFamily-116/IOApplePartitionScheme.h
584
+ # Update: Joerg Jenderek
585
+ # Yes, the 3rd and 4th bytes pmSigPad are reserved, but we use them to make the
586
+ # magic stronger.
587
+ # for apple partition map stored as a single file
588
+ 0 belong 0x504d0000
589
+ # to display Apple Partition Map (strength=70) after Syslinux bootloader (71)
590
+ #!:strength +0
591
+ >0 use apple-apm
592
+ # magic/Magdir/apple14.test, 365: Warning: Current entry does not yet have a description for adding a EXTENSION type
593
+ # file: could not find any valid magic files!
594
+ #!:ext bin
595
+ # display apple partition map. Normally called after Apple driver map
596
+ 0 name apple-apm
597
+ >0 belong 0x504d0000 Apple Partition Map
598
+ # number of partitions
599
+ >>4 ubelong x \b, map block count %u
600
+ # logical block (512 bytes) start of partition
601
+ >>8 ubelong x \b, start block %u
602
+ >>12 ubelong x \b, block count %u
603
+ >>16 string >0 \b, name %s
604
+ >>48 string >0 \b, type %s
605
+ # processor type dpme_process_id[16] e.g. "68000" "68020"
606
+ >>120 string >0 \b, processor %s
607
+ # A/UX boot arguments BootArgs[128]
608
+ >>136 string >0 \b, boot arguments %s
609
+ # status of partition dpme_flags
610
+ >>88 belong & 1 \b, valid
611
+ >>88 belong & 2 \b, allocated
612
+ >>88 belong & 4 \b, in use
613
+ >>88 belong & 8 \b, has boot info
614
+ >>88 belong & 16 \b, readable
615
+ >>88 belong & 32 \b, writable
616
+ >>88 belong & 64 \b, pic boot code
617
+ >>88 belong & 128 \b, chain compatible driver
618
+ >>88 belong & 256 \b, real driver
619
+ >>88 belong & 512 \b, chain driver
620
+ # mount automatically at startup APPLE_PS_AUTO_MOUNT
621
+ >>88 ubelong &0x40000000 \b, mount at startup
622
+ # is the startup partition APPLE_PS_STARTUP
623
+ >>88 ubelong &0x80000000 \b, is the startup partition
624
+
625
+ #https://wiki.mozilla.org/DS_Store_File_Format
626
+ #https://en.wikipedia.org/wiki/.DS_Store
627
+ 0 string \0\0\0\1Bud1\0 Apple Desktop Services Store
628
+
629
+ # HFS/HFS+ Resource fork files (andrew.roazen@nau.edu Apr 13 2015)
630
+ # Usually not in separate files, but have either filename rsrc with
631
+ # no extension, or a filename corresponding to another file, with
632
+ # extensions rsr/rsrc
633
+ # URL: http://fileformats.archiveteam.org/wiki/Macintosh_resource_file
634
+ # https://en.wikipedia.org/wiki/Resource_fork
635
+ # Reference: https://github.com/kreativekorp/ksfl/wiki/Macintosh-Resource-File-Format
636
+ # http://developer.apple.com/legacy/mac/library/documentation/mac/pdf/MoreMacintoshToolbox.pdf
637
+ # https://formats.kaitai.io/resource_fork/
638
+ # Update: Joerg Jenderek
639
+ # Note: verified often by command like `deark -m macrsrc Icon_.rsrc`
640
+ # offset of resource data; usually starts at offset 0x0100
641
+ 0 string \000\000\001\000
642
+ # skip NPETraceSession.etl with invalid "low" map offset 0
643
+ >4 ubelong >0xFF
644
+ # skip few Atari DEGAS Elite bitmap (eil2.pi1 nastro.pi1) with ivalid "high" 0x6550766 0x7510763 map length
645
+ >>12 ubelong <0x8001
646
+ # most examples with zeroed system reserved field
647
+ >>>16 lelong =0
648
+ >>>>0 use apple-rsr
649
+ # few samples with not zeroed system reserved field like: Empty.rsrc.rsr OpenSans-CondBold.dfont
650
+ >>>16 lelong !0
651
+ # resource fork variant with not zeroed system reserved field and copy of header
652
+ >>>>(4.L) ubelong 0x100
653
+ # GRR: the line above only works if in ../../src/file.h FILE_BYTES_MAX is raised from 1 MiB above 0x6ab0f4 (HelveticaNeue.dfont)
654
+ >>>>>0 use apple-rsr
655
+ # data fork variant with not zeroed system reserved field and no copy of header
656
+ >>>>(4.L) ubelong 0
657
+ >>>>>0 use apple-rsr
658
+ # Note: moved and merged from ./macintosh
659
+ # From: Adam Buchbinder <adam.buchbinder@gmail.com>
660
+ # URL: https://en.wikipedia.org/wiki/Datafork_TrueType
661
+ # Derived from the 'fondu' and 'ufond' source code (fondu.sf.net). 'sfnt' is
662
+ # TrueType; 'POST' is PostScript. 'FONT' and 'NFNT' sometimes appear, but I
663
+ # don't know what they mean.
664
+ # display information about Mac OSX datafork font DFONT
665
+ 0 name apple-dfont
666
+ >(4.L+30) ubelong x Mac OSX datafork font,
667
+ # https://en.wikipedia.org/wiki/Datafork_TrueType
668
+ !:mime application/x-dfont
669
+ !:ext dfont
670
+ # https://exiftool.org/TagNames/RSRC.html
671
+ >(4.L+30) ubelong 0x73666e74 TrueType
672
+ >(4.L+30) ubelong 0x464f4e54 'FONT'
673
+ >(4.L+30) ubelong 0x4e464e54 'NFNT'
674
+ >(4.L+30) ubelong 0x504f5354 PostScript
675
+ >(4.L+30) ubelong 0x464f4e44 'FOND'
676
+ >(4.L+30) ubelong 0x76657273 'vers'
677
+ # display information about Macintosh resource
678
+ 0 name apple-rsr
679
+ >(4.L+30) ubelong 0x73666e74
680
+ >>0 use apple-dfont
681
+ >(4.L+30) ubelong 0x464f4e54
682
+ >>0 use apple-dfont
683
+ >(4.L+30) ubelong 0x4e464e54
684
+ >>0 use apple-dfont
685
+ >(4.L+30) ubelong 0x504f5354
686
+ >>0 use apple-dfont
687
+ >(4.L+30) ubelong 0x464f4e44
688
+ >>0 use apple-dfont
689
+ >(4.L+30) ubelong 0x76657273
690
+ >>0 use apple-dfont
691
+ >(4.L+30) default x Apple HFS/HFS+ resource fork
692
+ #!:mime application/octet-stream
693
+ !:mime application/x-apple-rsr
694
+ !:ext rsrc/rsr
695
+ # offset to resource data; usually starts at offset 0x0100
696
+ >0 ubelong !0x100 \b, data offset %#x
697
+ # offset to resource map; positive but not nil like in NPETraceSession.etl
698
+ >4 ubelong x \b, map offset %#x
699
+ # length of resource map; positive with 32K limitation but not
700
+ # nil like in NPETraceSession.etl or high like 0x7510763 in nastro.pi1
701
+ >12 ubelong x \b, map length %#x
702
+ # length of resource data; positive but not nil like in NPETraceSession.etl
703
+ >8 ubelong x \b, data length %#x
704
+ # reserved 112 bytes for system use; apparently often nil, but 8fd20000h in Empty.rsrc.rsr and 0x00768c2b in OpenSans-CondBold.dfont
705
+ >16 ubelong !0 \b, at 16 %#8.8x
706
+ # https://fontforge.org/docs/techref/macformats.html
707
+ # jump to resource map
708
+ # a copy of resource header or 16 bytes of zeros for data fork
709
+ #>(4.L) ubelong x \b, DATA offset %#x
710
+ #>(4.L+4) ubelong x \b, MAP offset %#x
711
+ #>(4.L+8) ubelong x \b, DATA length %#x
712
+ #>(4.L+12) ubelong x \b, MAP length %#x
713
+ # nextResourceMap; handle to next resource map; used by the Resource Manager for internal bookkeeping; should be zero
714
+ >(4.L+16) ubelong !0 \b, nextResourceMap %#x
715
+ # fileRef; file reference number; used by the Resource Manager for internal bookkeeping; should be zero
716
+ >(4.L+20) ubeshort !0 \b, fileRef %#x
717
+ # attributes; Resource fork attributes (80h~read-only 40h~compression needed 20h~changed); other bits are reserved and should be zero
718
+ >(4.L+22) ubeshort !0 \b, attributes %#x
719
+ # typeListOffset; offset from resource map to start of type list like: 1Ch
720
+ >(4.L+24) ubeshort x \b, list offset %#x
721
+ # nameListOffset; offset from esource map to start of name list like: 32h 46h 56h (XLISP.RSR XLISPTIN.RSR) 13Eh (HelveticaNeue.dfont)
722
+ >(4.L+26) ubeshort x \b, name offset %#x
723
+ # typeCount; number of types in the map minus 1; If there are no resources, this is 0xFFFF
724
+ >(4.L+28) beshort+1 >0 \b, %u type
725
+ # plural s
726
+ >>(4.L+28) beshort+1 >1 \bs
727
+ # resource type list array; 1st resource type like: ALRT CODE FOND MPSR icns scsz
728
+ >>(4.L+30) ubelong x \b, %#x
729
+ >>(4.L+30) string x '%-.4s'
730
+ # resourceCount; number of this type resources minus one. If there is one resource of this type, this is 0x0000
731
+ >>(4.L+34) beshort+1 x * %d
732
+ # resourceListOffset; offset from type list to resource list like: Ah 12h DAh
733
+ >(4.L+36) ubeshort x resource offset %#x
734
+
735
+ #https://en.wikipedia.org/wiki/AppleScript
736
+ 0 string FasdUAS AppleScript compiled
737
+
738
+ # AppleWorks/ClarisWorks
739
+ # https://github.com/joshenders/appleworks_format
740
+ # http://fileformats.archiveteam.org/wiki/AppleWorks
741
+ 0 name appleworks
742
+ >0 belong&0x00ffffff 0x07e100 AppleWorks CWK Document
743
+ >0 belong&0x00ffffff 0x008803 ClarisWorks CWK Document
744
+ >0 default x
745
+ >>0 belong x AppleWorks/ClarisWorks CWK Document
746
+ >0 byte x \b, version %d
747
+ >30 beshort x \b, %d
748
+ >32 beshort x \bx%d
749
+ !:ext cwk
750
+
751
+ 4 string BOBO
752
+ >0 byte >4
753
+ >>12 belong 0
754
+ >>>26 belong 0
755
+ >>>>0 use appleworks
756
+ >0 belong 0x0481ad00
757
+ >>0 use appleworks
758
+
759
+ # magic for Apple File System (APFS)
760
+ # from Alex Myczko <alex@aiei.ch>
761
+ 32 string NXSB Apple File System (APFS)
762
+ >36 ulelong x \b, blocksize %u
763
+
764
+ # iTunes cover art (versions 1 and 2)
765
+ 4 string itch
766
+ >24 string artw
767
+ >>0x1e8 string data iTunes cover art
768
+ >>>0x1ed string PNG (PNG)
769
+ >>>0x1ec beshort 0xffd8 (JPEG)
770
+
771
+ # MacPaint image
772
+ 65 string PNTGMPNT MacPaint image data
773
+ #0 belong 2 MacPaint image data