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.
- polyfile/__init__.py +15 -0
- polyfile/__main__.py +394 -0
- polyfile/arithmetic.py +27 -0
- polyfile/ast.py +114 -0
- polyfile/debugger.py +1039 -0
- polyfile/expressions.py +346 -0
- polyfile/fileutils.py +343 -0
- polyfile/html.py +135 -0
- polyfile/http/__init__.py +1 -0
- polyfile/http/defacto.py +37 -0
- polyfile/http/deprecated.py +51 -0
- polyfile/http/experimental.py +67 -0
- polyfile/http/http_11.py +548 -0
- polyfile/http/matcher.py +37 -0
- polyfile/http/structured_headers.py +48 -0
- polyfile/iterators.py +72 -0
- polyfile/jpeg.py +24 -0
- polyfile/kaitai/__init__.py +0 -0
- polyfile/kaitai/compiler.py +156 -0
- polyfile/kaitai/parser.py +312 -0
- polyfile/kaitai/parsers/__init__.py +0 -0
- polyfile/kaitai/parsers/aix_utmp.py +116 -0
- polyfile/kaitai/parsers/allegro_dat.py +367 -0
- polyfile/kaitai/parsers/andes_firmware.py +64 -0
- polyfile/kaitai/parsers/android_bootldr_asus.py +105 -0
- polyfile/kaitai/parsers/android_bootldr_huawei.py +181 -0
- polyfile/kaitai/parsers/android_bootldr_qcom.py +217 -0
- polyfile/kaitai/parsers/android_dto.py +138 -0
- polyfile/kaitai/parsers/android_img.py +319 -0
- polyfile/kaitai/parsers/android_nanoapp_header.py +83 -0
- polyfile/kaitai/parsers/android_opengl_shaders_cache.py +151 -0
- polyfile/kaitai/parsers/android_sparse.py +237 -0
- polyfile/kaitai/parsers/android_super.py +401 -0
- polyfile/kaitai/parsers/apm_partition_table.py +196 -0
- polyfile/kaitai/parsers/apple_single_double.py +180 -0
- polyfile/kaitai/parsers/asn1_der.py +235 -0
- polyfile/kaitai/parsers/au.py +138 -0
- polyfile/kaitai/parsers/avantes_roh60.py +112 -0
- polyfile/kaitai/parsers/avi.py +296 -0
- polyfile/kaitai/parsers/bcd.py +111 -0
- polyfile/kaitai/parsers/bitcoin_transaction.py +210 -0
- polyfile/kaitai/parsers/blender_blend.py +334 -0
- polyfile/kaitai/parsers/bmp.py +780 -0
- polyfile/kaitai/parsers/bson.py +411 -0
- polyfile/kaitai/parsers/btrfs_stream.py +318 -0
- polyfile/kaitai/parsers/bytes_with_io.py +27 -0
- polyfile/kaitai/parsers/chrome_pak.py +194 -0
- polyfile/kaitai/parsers/code_6502.py +456 -0
- polyfile/kaitai/parsers/compressed_resource.py +217 -0
- polyfile/kaitai/parsers/cpio_old_le.py +154 -0
- polyfile/kaitai/parsers/cramfs.py +344 -0
- polyfile/kaitai/parsers/creative_voice_file.py +342 -0
- polyfile/kaitai/parsers/dbf.py +274 -0
- polyfile/kaitai/parsers/dcmp_0.py +664 -0
- polyfile/kaitai/parsers/dcmp_1.py +422 -0
- polyfile/kaitai/parsers/dcmp_2.py +312 -0
- polyfile/kaitai/parsers/dcmp_variable_length_integer.py +66 -0
- polyfile/kaitai/parsers/dex.py +1086 -0
- polyfile/kaitai/parsers/dicom.py +4370 -0
- polyfile/kaitai/parsers/dime_message.py +201 -0
- polyfile/kaitai/parsers/dns_packet.py +569 -0
- polyfile/kaitai/parsers/doom_wad.py +654 -0
- polyfile/kaitai/parsers/dos_datetime.py +191 -0
- polyfile/kaitai/parsers/dos_mz.py +172 -0
- polyfile/kaitai/parsers/ds_store.py +513 -0
- polyfile/kaitai/parsers/dtb.py +310 -0
- polyfile/kaitai/parsers/dune_2_pak.py +126 -0
- polyfile/kaitai/parsers/edid.py +472 -0
- polyfile/kaitai/parsers/efivar_signature_list.py +331 -0
- polyfile/kaitai/parsers/elf.py +2482 -0
- polyfile/kaitai/parsers/ethernet_frame.py +114 -0
- polyfile/kaitai/parsers/exif.py +723 -0
- polyfile/kaitai/parsers/ext2.py +537 -0
- polyfile/kaitai/parsers/fallout2_dat.py +187 -0
- polyfile/kaitai/parsers/fallout_dat.py +156 -0
- polyfile/kaitai/parsers/fasttracker_xm_module.py +558 -0
- polyfile/kaitai/parsers/ftl_dat.py +90 -0
- polyfile/kaitai/parsers/genmidi_op2.py +161 -0
- polyfile/kaitai/parsers/gettext_mo.py +541 -0
- polyfile/kaitai/parsers/gif.py +492 -0
- polyfile/kaitai/parsers/gimp_brush.py +244 -0
- polyfile/kaitai/parsers/glibc_utmp.py +114 -0
- polyfile/kaitai/parsers/gltf_binary.py +132 -0
- polyfile/kaitai/parsers/google_protobuf.py +151 -0
- polyfile/kaitai/parsers/gpt_partition_table.py +175 -0
- polyfile/kaitai/parsers/gran_turismo_vol.py +140 -0
- polyfile/kaitai/parsers/grub2_font.py +337 -0
- polyfile/kaitai/parsers/gzip.py +232 -0
- polyfile/kaitai/parsers/hashcat_restore.py +60 -0
- polyfile/kaitai/parsers/hccap.py +111 -0
- polyfile/kaitai/parsers/hccapx.py +103 -0
- polyfile/kaitai/parsers/heaps_pak.py +177 -0
- polyfile/kaitai/parsers/heroes_of_might_and_magic_agg.py +116 -0
- polyfile/kaitai/parsers/heroes_of_might_and_magic_bmp.py +34 -0
- polyfile/kaitai/parsers/icmp_packet.py +136 -0
- polyfile/kaitai/parsers/ico.py +129 -0
- polyfile/kaitai/parsers/id3v1_1.py +220 -0
- polyfile/kaitai/parsers/id3v2_3.py +324 -0
- polyfile/kaitai/parsers/id3v2_4.py +423 -0
- polyfile/kaitai/parsers/ines.py +282 -0
- polyfile/kaitai/parsers/ipv4_packet.py +158 -0
- polyfile/kaitai/parsers/ipv6_packet.py +55 -0
- polyfile/kaitai/parsers/iso9660.py +544 -0
- polyfile/kaitai/parsers/java_class.py +1113 -0
- polyfile/kaitai/parsers/jpeg.py +361 -0
- polyfile/kaitai/parsers/luks.py +149 -0
- polyfile/kaitai/parsers/lzh.py +165 -0
- polyfile/kaitai/parsers/mac_os_resource_snd.py +493 -0
- polyfile/kaitai/parsers/mach_o.py +3033 -0
- polyfile/kaitai/parsers/mach_o_fat.py +92 -0
- polyfile/kaitai/parsers/magicavoxel_vox.py +391 -0
- polyfile/kaitai/parsers/manifest.json +1 -0
- polyfile/kaitai/parsers/mbr_partition_table.py +119 -0
- polyfile/kaitai/parsers/mcap.py +1015 -0
- polyfile/kaitai/parsers/microsoft_cfb.py +293 -0
- polyfile/kaitai/parsers/microsoft_network_monitor_v2.py +309 -0
- polyfile/kaitai/parsers/microsoft_pe.py +765 -0
- polyfile/kaitai/parsers/mifare_classic.py +706 -0
- polyfile/kaitai/parsers/minecraft_nbt.py +449 -0
- polyfile/kaitai/parsers/monomakh_sapr_chg.py +69 -0
- polyfile/kaitai/parsers/mozilla_mar.py +239 -0
- polyfile/kaitai/parsers/mp4.py +333 -0
- polyfile/kaitai/parsers/msgpack.py +467 -0
- polyfile/kaitai/parsers/nitf.py +1189 -0
- polyfile/kaitai/parsers/nt_mdt_pal.py +155 -0
- polyfile/kaitai/parsers/ogg.py +118 -0
- polyfile/kaitai/parsers/openpgp_message.py +993 -0
- polyfile/kaitai/parsers/packet_ppi.py +515 -0
- polyfile/kaitai/parsers/pcap.py +344 -0
- polyfile/kaitai/parsers/pcf_font.py +506 -0
- polyfile/kaitai/parsers/pcx.py +195 -0
- polyfile/kaitai/parsers/pcx_dcx.py +79 -0
- polyfile/kaitai/parsers/phar_without_stub.py +399 -0
- polyfile/kaitai/parsers/php_serialized_value.py +505 -0
- polyfile/kaitai/parsers/png.py +721 -0
- polyfile/kaitai/parsers/protocol_body.py +260 -0
- polyfile/kaitai/parsers/psx_tim.py +104 -0
- polyfile/kaitai/parsers/python_pickle.py +718 -0
- polyfile/kaitai/parsers/python_pyc_27.py +510 -0
- polyfile/kaitai/parsers/quake_mdl.py +441 -0
- polyfile/kaitai/parsers/quake_pak.py +112 -0
- polyfile/kaitai/parsers/quicktime_mov.py +634 -0
- polyfile/kaitai/parsers/rar.py +265 -0
- polyfile/kaitai/parsers/regf.py +569 -0
- polyfile/kaitai/parsers/renderware_binary_stream.py +877 -0
- polyfile/kaitai/parsers/resource_fork.py +611 -0
- polyfile/kaitai/parsers/respack.py +57 -0
- polyfile/kaitai/parsers/riff.py +409 -0
- polyfile/kaitai/parsers/rpm.py +964 -0
- polyfile/kaitai/parsers/rtcp_payload.py +579 -0
- polyfile/kaitai/parsers/rtp_packet.py +150 -0
- polyfile/kaitai/parsers/rtpdump.py +115 -0
- polyfile/kaitai/parsers/ruby_marshal.py +423 -0
- polyfile/kaitai/parsers/s3m.py +493 -0
- polyfile/kaitai/parsers/saints_row_2_vpp_pc.py +254 -0
- polyfile/kaitai/parsers/shapefile_index.py +174 -0
- polyfile/kaitai/parsers/shapefile_main.py +893 -0
- polyfile/kaitai/parsers/some_ip.py +209 -0
- polyfile/kaitai/parsers/some_ip_container.py +37 -0
- polyfile/kaitai/parsers/some_ip_sd.py +86 -0
- polyfile/kaitai/parsers/some_ip_sd_entries.py +160 -0
- polyfile/kaitai/parsers/some_ip_sd_options.py +374 -0
- polyfile/kaitai/parsers/specpr.py +404 -0
- polyfile/kaitai/parsers/sqlite3.py +472 -0
- polyfile/kaitai/parsers/ssh_public_key.py +252 -0
- polyfile/kaitai/parsers/standard_midi_file.py +390 -0
- polyfile/kaitai/parsers/stl.py +111 -0
- polyfile/kaitai/parsers/sudoers_ts.py +201 -0
- polyfile/kaitai/parsers/swf.py +406 -0
- polyfile/kaitai/parsers/systemd_journal.py +361 -0
- polyfile/kaitai/parsers/tcp_segment.py +57 -0
- polyfile/kaitai/parsers/tga.py +213 -0
- polyfile/kaitai/parsers/tls_client_hello.py +293 -0
- polyfile/kaitai/parsers/tr_dos_image.py +322 -0
- polyfile/kaitai/parsers/tsm.py +198 -0
- polyfile/kaitai/parsers/ttf.py +1847 -0
- polyfile/kaitai/parsers/udp_datagram.py +42 -0
- polyfile/kaitai/parsers/uefi_te.py +236 -0
- polyfile/kaitai/parsers/uimage.py +198 -0
- polyfile/kaitai/parsers/utf8_string.py +137 -0
- polyfile/kaitai/parsers/vfat.py +410 -0
- polyfile/kaitai/parsers/vlq_base128_be.py +104 -0
- polyfile/kaitai/parsers/vlq_base128_le.py +129 -0
- polyfile/kaitai/parsers/vmware_vmdk.py +167 -0
- polyfile/kaitai/parsers/vp8_ivf.py +112 -0
- polyfile/kaitai/parsers/warcraft_2_pud.py +423 -0
- polyfile/kaitai/parsers/wav.py +1014 -0
- polyfile/kaitai/parsers/websocket.py +167 -0
- polyfile/kaitai/parsers/windows_evt_log.py +304 -0
- polyfile/kaitai/parsers/windows_lnk_file.py +467 -0
- polyfile/kaitai/parsers/windows_minidump.py +575 -0
- polyfile/kaitai/parsers/windows_resource_file.py +243 -0
- polyfile/kaitai/parsers/windows_shell_items.py +190 -0
- polyfile/kaitai/parsers/windows_systemtime.py +52 -0
- polyfile/kaitai/parsers/wmf.py +502 -0
- polyfile/kaitai/parsers/xar.py +181 -0
- polyfile/kaitai/parsers/xwd.py +189 -0
- polyfile/kaitai/parsers/zip.py +685 -0
- polyfile/kaitai/parsers/zisofs.py +158 -0
- polyfile/kaitai/parsers/zx_spectrum_tap.py +184 -0
- polyfile/kaitaimatcher.py +113 -0
- polyfile/languagematcher.py +217 -0
- polyfile/logger.py +135 -0
- polyfile/magic.py +2983 -0
- polyfile/magic_defs/COPYING +29 -0
- polyfile/magic_defs/__init__.py +0 -0
- polyfile/magic_defs/acorn +102 -0
- polyfile/magic_defs/adi +13 -0
- polyfile/magic_defs/adventure +122 -0
- polyfile/magic_defs/aes +29 -0
- polyfile/magic_defs/algol68 +35 -0
- polyfile/magic_defs/allegro +9 -0
- polyfile/magic_defs/alliant +18 -0
- polyfile/magic_defs/alpha +32 -0
- polyfile/magic_defs/amanda +12 -0
- polyfile/magic_defs/amigaos +218 -0
- polyfile/magic_defs/android +259 -0
- polyfile/magic_defs/animation +1197 -0
- polyfile/magic_defs/aout +46 -0
- polyfile/magic_defs/apache +28 -0
- polyfile/magic_defs/apl +7 -0
- polyfile/magic_defs/apple +773 -0
- polyfile/magic_defs/application +7 -0
- polyfile/magic_defs/applix +13 -0
- polyfile/magic_defs/apt +52 -0
- polyfile/magic_defs/archive +2586 -0
- polyfile/magic_defs/aria +38 -0
- polyfile/magic_defs/arm +50 -0
- polyfile/magic_defs/asf +132 -0
- polyfile/magic_defs/assembler +18 -0
- polyfile/magic_defs/asterix +18 -0
- polyfile/magic_defs/att3b +41 -0
- polyfile/magic_defs/audio +1291 -0
- polyfile/magic_defs/avm +33 -0
- polyfile/magic_defs/basis +18 -0
- polyfile/magic_defs/beetle +7 -0
- polyfile/magic_defs/ber +65 -0
- polyfile/magic_defs/bflt +14 -0
- polyfile/magic_defs/bhl +10 -0
- polyfile/magic_defs/bioinformatics +178 -0
- polyfile/magic_defs/biosig +154 -0
- polyfile/magic_defs/blackberry +8 -0
- polyfile/magic_defs/blcr +25 -0
- polyfile/magic_defs/blender +50 -0
- polyfile/magic_defs/blit +24 -0
- polyfile/magic_defs/bm +10 -0
- polyfile/magic_defs/bout +11 -0
- polyfile/magic_defs/bsdi +33 -0
- polyfile/magic_defs/bsi +10 -0
- polyfile/magic_defs/btsnoop +13 -0
- polyfile/magic_defs/burp +7 -0
- polyfile/magic_defs/bytecode +41 -0
- polyfile/magic_defs/c-lang +110 -0
- polyfile/magic_defs/c64 +531 -0
- polyfile/magic_defs/cad +437 -0
- polyfile/magic_defs/cafebabe +107 -0
- polyfile/magic_defs/cbor +21 -0
- polyfile/magic_defs/ccf +14 -0
- polyfile/magic_defs/cddb +12 -0
- polyfile/magic_defs/chord +15 -0
- polyfile/magic_defs/cisco +12 -0
- polyfile/magic_defs/citrus +12 -0
- polyfile/magic_defs/clarion +27 -0
- polyfile/magic_defs/claris +48 -0
- polyfile/magic_defs/clipper +65 -0
- polyfile/magic_defs/clojure +30 -0
- polyfile/magic_defs/coff +98 -0
- polyfile/magic_defs/commands +201 -0
- polyfile/magic_defs/communications +22 -0
- polyfile/magic_defs/compress +461 -0
- polyfile/magic_defs/console +1213 -0
- polyfile/magic_defs/convex +69 -0
- polyfile/magic_defs/coverage +91 -0
- polyfile/magic_defs/cracklib +14 -0
- polyfile/magic_defs/crypto +31 -0
- polyfile/magic_defs/csv +8 -0
- polyfile/magic_defs/ctags +6 -0
- polyfile/magic_defs/ctf +23 -0
- polyfile/magic_defs/cubemap +8 -0
- polyfile/magic_defs/cups +56 -0
- polyfile/magic_defs/dact +11 -0
- polyfile/magic_defs/database +886 -0
- polyfile/magic_defs/dataone +47 -0
- polyfile/magic_defs/dbpf +15 -0
- polyfile/magic_defs/der +146 -0
- polyfile/magic_defs/diamond +12 -0
- polyfile/magic_defs/dif +33 -0
- polyfile/magic_defs/diff +41 -0
- polyfile/magic_defs/digital +59 -0
- polyfile/magic_defs/dolby +69 -0
- polyfile/magic_defs/dsf +25 -0
- polyfile/magic_defs/dump +96 -0
- polyfile/magic_defs/dwarfs +45 -0
- polyfile/magic_defs/dyadic +61 -0
- polyfile/magic_defs/ebml +8 -0
- polyfile/magic_defs/edid +11 -0
- polyfile/magic_defs/editors +43 -0
- polyfile/magic_defs/efi +15 -0
- polyfile/magic_defs/elf +379 -0
- polyfile/magic_defs/encore +22 -0
- polyfile/magic_defs/epoc +62 -0
- polyfile/magic_defs/erlang +21 -0
- polyfile/magic_defs/espressif +57 -0
- polyfile/magic_defs/esri +28 -0
- polyfile/magic_defs/etf +33 -0
- polyfile/magic_defs/fcs +9 -0
- polyfile/magic_defs/filesystems +2694 -0
- polyfile/magic_defs/finger +16 -0
- polyfile/magic_defs/firmware +133 -0
- polyfile/magic_defs/flash +62 -0
- polyfile/magic_defs/flif +36 -0
- polyfile/magic_defs/fonts +449 -0
- polyfile/magic_defs/forth +82 -0
- polyfile/magic_defs/fortran +9 -0
- polyfile/magic_defs/frame +62 -0
- polyfile/magic_defs/freebsd +164 -0
- polyfile/magic_defs/fsav +128 -0
- polyfile/magic_defs/fusecompress +12 -0
- polyfile/magic_defs/games +696 -0
- polyfile/magic_defs/gcc +17 -0
- polyfile/magic_defs/gconv +10 -0
- polyfile/magic_defs/gentoo +85 -0
- polyfile/magic_defs/geo +166 -0
- polyfile/magic_defs/geos +20 -0
- polyfile/magic_defs/gimp +77 -0
- polyfile/magic_defs/git +13 -0
- polyfile/magic_defs/glibc +21 -0
- polyfile/magic_defs/gnome +59 -0
- polyfile/magic_defs/gnu +173 -0
- polyfile/magic_defs/gnumeric +8 -0
- polyfile/magic_defs/gpt +240 -0
- polyfile/magic_defs/gpu +28 -0
- polyfile/magic_defs/grace +21 -0
- polyfile/magic_defs/graphviz +12 -0
- polyfile/magic_defs/gringotts +48 -0
- polyfile/magic_defs/guile +13 -0
- polyfile/magic_defs/hardware +12 -0
- polyfile/magic_defs/hitachi-sh +30 -0
- polyfile/magic_defs/hp +433 -0
- polyfile/magic_defs/human68k +26 -0
- polyfile/magic_defs/ibm370 +52 -0
- polyfile/magic_defs/ibm6000 +35 -0
- polyfile/magic_defs/icc +214 -0
- polyfile/magic_defs/iff +80 -0
- polyfile/magic_defs/images +4210 -0
- polyfile/magic_defs/inform +9 -0
- polyfile/magic_defs/intel +310 -0
- polyfile/magic_defs/interleaf +9 -0
- polyfile/magic_defs/island +10 -0
- polyfile/magic_defs/ispell +63 -0
- polyfile/magic_defs/isz +15 -0
- polyfile/magic_defs/java +52 -0
- polyfile/magic_defs/javascript +171 -0
- polyfile/magic_defs/jpeg +252 -0
- polyfile/magic_defs/json +8 -0
- polyfile/magic_defs/karma +9 -0
- polyfile/magic_defs/kde +11 -0
- polyfile/magic_defs/keepass +20 -0
- polyfile/magic_defs/kerberos +45 -0
- polyfile/magic_defs/kicad +85 -0
- polyfile/magic_defs/kml +34 -0
- polyfile/magic_defs/lammps +64 -0
- polyfile/magic_defs/lecter +6 -0
- polyfile/magic_defs/lex +12 -0
- polyfile/magic_defs/lif +50 -0
- polyfile/magic_defs/linux +557 -0
- polyfile/magic_defs/lisp +78 -0
- polyfile/magic_defs/llvm +22 -0
- polyfile/magic_defs/locoscript +12 -0
- polyfile/magic_defs/lua +31 -0
- polyfile/magic_defs/luks +126 -0
- polyfile/magic_defs/m4 +11 -0
- polyfile/magic_defs/mach +303 -0
- polyfile/magic_defs/macintosh +505 -0
- polyfile/magic_defs/macos +7 -0
- polyfile/magic_defs/magic +10 -0
- polyfile/magic_defs/magic.mgc +0 -0
- polyfile/magic_defs/mail.news +132 -0
- polyfile/magic_defs/make +21 -0
- polyfile/magic_defs/map +413 -0
- polyfile/magic_defs/maple +109 -0
- polyfile/magic_defs/marc21 +30 -0
- polyfile/magic_defs/mathcad +8 -0
- polyfile/magic_defs/mathematica +188 -0
- polyfile/magic_defs/matroska +17 -0
- polyfile/magic_defs/mcrypt +52 -0
- polyfile/magic_defs/measure +44 -0
- polyfile/magic_defs/mercurial +13 -0
- polyfile/magic_defs/metastore +8 -0
- polyfile/magic_defs/meteorological +53 -0
- polyfile/magic_defs/microfocus +21 -0
- polyfile/magic_defs/mime +9 -0
- polyfile/magic_defs/mips +120 -0
- polyfile/magic_defs/mirage +8 -0
- polyfile/magic_defs/misctools +140 -0
- polyfile/magic_defs/mkid +11 -0
- polyfile/magic_defs/mlssa +8 -0
- polyfile/magic_defs/mmdf +6 -0
- polyfile/magic_defs/modem +92 -0
- polyfile/magic_defs/modulefile +9 -0
- polyfile/magic_defs/motorola +71 -0
- polyfile/magic_defs/mozilla +37 -0
- polyfile/magic_defs/msdos +2304 -0
- polyfile/magic_defs/msooxml +68 -0
- polyfile/magic_defs/msvc +222 -0
- polyfile/magic_defs/msx +309 -0
- polyfile/magic_defs/mup +24 -0
- polyfile/magic_defs/music +17 -0
- polyfile/magic_defs/nasa +7 -0
- polyfile/magic_defs/natinst +24 -0
- polyfile/magic_defs/ncr +49 -0
- polyfile/magic_defs/neko +12 -0
- polyfile/magic_defs/netbsd +251 -0
- polyfile/magic_defs/netscape +26 -0
- polyfile/magic_defs/netware +11 -0
- polyfile/magic_defs/news +13 -0
- polyfile/magic_defs/nifty +202 -0
- polyfile/magic_defs/nim-lang +29 -0
- polyfile/magic_defs/nitpicker +14 -0
- polyfile/magic_defs/numpy +9 -0
- polyfile/magic_defs/oasis +12 -0
- polyfile/magic_defs/ocaml +14 -0
- polyfile/magic_defs/octave +6 -0
- polyfile/magic_defs/ole2compounddocs +760 -0
- polyfile/magic_defs/olf +98 -0
- polyfile/magic_defs/openfst +17 -0
- polyfile/magic_defs/opentimestamps +16 -0
- polyfile/magic_defs/oric +16 -0
- polyfile/magic_defs/os2 +186 -0
- polyfile/magic_defs/os400 +39 -0
- polyfile/magic_defs/os9 +80 -0
- polyfile/magic_defs/osf1 +10 -0
- polyfile/magic_defs/palm +156 -0
- polyfile/magic_defs/parix +13 -0
- polyfile/magic_defs/parrot +22 -0
- polyfile/magic_defs/pascal +39 -0
- polyfile/magic_defs/pbf +11 -0
- polyfile/magic_defs/pbm +8 -0
- polyfile/magic_defs/pc88 +24 -0
- polyfile/magic_defs/pc98 +77 -0
- polyfile/magic_defs/pci_ids +116 -0
- polyfile/magic_defs/pcjr +8 -0
- polyfile/magic_defs/pdf +51 -0
- polyfile/magic_defs/pdp +42 -0
- polyfile/magic_defs/perl +100 -0
- polyfile/magic_defs/pgf +52 -0
- polyfile/magic_defs/pgp +581 -0
- polyfile/magic_defs/pgp-binary-keys +388 -0
- polyfile/magic_defs/pkgadd +7 -0
- polyfile/magic_defs/plan9 +25 -0
- polyfile/magic_defs/playdate +57 -0
- polyfile/magic_defs/plus5 +18 -0
- polyfile/magic_defs/pmem +46 -0
- polyfile/magic_defs/polyfile_zip +5 -0
- polyfile/magic_defs/polyml +23 -0
- polyfile/magic_defs/printer +269 -0
- polyfile/magic_defs/project +10 -0
- polyfile/magic_defs/psdbms +14 -0
- polyfile/magic_defs/psl +14 -0
- polyfile/magic_defs/pulsar +13 -0
- polyfile/magic_defs/puzzle +17 -0
- polyfile/magic_defs/pwsafe +14 -0
- polyfile/magic_defs/pyramid +12 -0
- polyfile/magic_defs/python +305 -0
- polyfile/magic_defs/qt +30 -0
- polyfile/magic_defs/revision +66 -0
- polyfile/magic_defs/riff +840 -0
- polyfile/magic_defs/rinex +44 -0
- polyfile/magic_defs/ringdove +45 -0
- polyfile/magic_defs/rpi +52 -0
- polyfile/magic_defs/rpm +45 -0
- polyfile/magic_defs/rpmsg +7 -0
- polyfile/magic_defs/rst +11 -0
- polyfile/magic_defs/rtf +94 -0
- polyfile/magic_defs/ruby +55 -0
- polyfile/magic_defs/rust +21 -0
- polyfile/magic_defs/sc +7 -0
- polyfile/magic_defs/sccs +24 -0
- polyfile/magic_defs/scientific +144 -0
- polyfile/magic_defs/securitycerts +6 -0
- polyfile/magic_defs/selinux +24 -0
- polyfile/magic_defs/sendmail +37 -0
- polyfile/magic_defs/sequent +42 -0
- polyfile/magic_defs/sereal +35 -0
- polyfile/magic_defs/sgi +144 -0
- polyfile/magic_defs/sgml +161 -0
- polyfile/magic_defs/sharc +23 -0
- polyfile/magic_defs/sinclair +40 -0
- polyfile/magic_defs/sisu +18 -0
- polyfile/magic_defs/sketch +6 -0
- polyfile/magic_defs/smalltalk +25 -0
- polyfile/magic_defs/smile +34 -0
- polyfile/magic_defs/sniffer +482 -0
- polyfile/magic_defs/softquad +40 -0
- polyfile/magic_defs/sosi +40 -0
- polyfile/magic_defs/spec +21 -0
- polyfile/magic_defs/spectrum +184 -0
- polyfile/magic_defs/sql +288 -0
- polyfile/magic_defs/ssh +39 -0
- polyfile/magic_defs/ssl +20 -0
- polyfile/magic_defs/statistics +45 -0
- polyfile/magic_defs/subtitle +38 -0
- polyfile/magic_defs/sun +141 -0
- polyfile/magic_defs/svf +5 -0
- polyfile/magic_defs/sylk +36 -0
- polyfile/magic_defs/symbos +42 -0
- polyfile/magic_defs/sysex +429 -0
- polyfile/magic_defs/tcl +29 -0
- polyfile/magic_defs/teapot +6 -0
- polyfile/magic_defs/terminfo +63 -0
- polyfile/magic_defs/tex +141 -0
- polyfile/magic_defs/tgif +7 -0
- polyfile/magic_defs/ti-8x +239 -0
- polyfile/magic_defs/timezone +42 -0
- polyfile/magic_defs/tplink +95 -0
- polyfile/magic_defs/troff +38 -0
- polyfile/magic_defs/tuxedo +8 -0
- polyfile/magic_defs/typeset +8 -0
- polyfile/magic_defs/uf2 +72 -0
- polyfile/magic_defs/unicode +15 -0
- polyfile/magic_defs/unisig +12 -0
- polyfile/magic_defs/unknown +34 -0
- polyfile/magic_defs/usd +21 -0
- polyfile/magic_defs/uterus +16 -0
- polyfile/magic_defs/uuencode +28 -0
- polyfile/magic_defs/vacuum-cleaner +54 -0
- polyfile/magic_defs/varied.out +46 -0
- polyfile/magic_defs/varied.script +21 -0
- polyfile/magic_defs/vax +32 -0
- polyfile/magic_defs/vicar +17 -0
- polyfile/magic_defs/virtual +307 -0
- polyfile/magic_defs/virtutech +12 -0
- polyfile/magic_defs/visx +32 -0
- polyfile/magic_defs/vms +30 -0
- polyfile/magic_defs/vmware +6 -0
- polyfile/magic_defs/vorbis +155 -0
- polyfile/magic_defs/vxl +14 -0
- polyfile/magic_defs/warc +16 -0
- polyfile/magic_defs/weak +16 -0
- polyfile/magic_defs/web +18 -0
- polyfile/magic_defs/webassembly +17 -0
- polyfile/magic_defs/windows +1811 -0
- polyfile/magic_defs/wireless +7 -0
- polyfile/magic_defs/wordprocessors +630 -0
- polyfile/magic_defs/wsdl +23 -0
- polyfile/magic_defs/x68000 +25 -0
- polyfile/magic_defs/xdelta +13 -0
- polyfile/magic_defs/xenix +106 -0
- polyfile/magic_defs/xilinx +58 -0
- polyfile/magic_defs/xo65 +37 -0
- polyfile/magic_defs/xwindows +43 -0
- polyfile/magic_defs/yara +17 -0
- polyfile/magic_defs/zfs +96 -0
- polyfile/magic_defs/zilog +12 -0
- polyfile/magic_defs/zip +126 -0
- polyfile/magic_defs/zyxel +17 -0
- polyfile/nes.py +144 -0
- polyfile/nitf.py +15 -0
- polyfile/pdf.py +1264 -0
- polyfile/pickles.py +45 -0
- polyfile/polyfile.py +409 -0
- polyfile/profiling.py +115 -0
- polyfile/repl.py +624 -0
- polyfile/search.py +310 -0
- polyfile/serialization.py +323 -0
- polyfile/structmatcher.py +46 -0
- polyfile/structs.py +281 -0
- polyfile/templates/download.js +162 -0
- polyfile/templates/hexdump.css +268 -0
- polyfile/templates/hexdump.js +756 -0
- polyfile/templates/jquery-3.4.1.min.js +2 -0
- polyfile/templates/template.html +119 -0
- polyfile/wildcards.py +62 -0
- polyfile/zipmatcher.py +183 -0
- polyfile_weave-0.5.5.dist-info/METADATA +173 -0
- polyfile_weave-0.5.5.dist-info/RECORD +585 -0
- polyfile_weave-0.5.5.dist-info/WHEEL +5 -0
- polyfile_weave-0.5.5.dist-info/entry_points.txt +2 -0
- polyfile_weave-0.5.5.dist-info/licenses/LICENSE +202 -0
- polyfile_weave-0.5.5.dist-info/top_level.txt +2 -0
- polymerge/__init__.py +1 -0
- polymerge/__main__.py +296 -0
- polymerge/cfg.py +127 -0
- polymerge/polymerge.py +227 -0
- polymerge/polytracker.py +190 -0
|
@@ -0,0 +1,388 @@
|
|
|
1
|
+
|
|
2
|
+
#------------------------------------------------------------------------------
|
|
3
|
+
# $File: pgp-binary-keys,v 1.2 2021/04/26 15:56:00 christos Exp $
|
|
4
|
+
# pgp-binary-keys: This file handles pgp binary keys.
|
|
5
|
+
#
|
|
6
|
+
# An PGP certificate or message doesn't have a fixed header. Instead,
|
|
7
|
+
# they are sequences of packets:
|
|
8
|
+
#
|
|
9
|
+
# https://tools.ietf.org/html/rfc4880#section-4.3
|
|
10
|
+
#
|
|
11
|
+
# whose order conforms to a grammar:
|
|
12
|
+
#
|
|
13
|
+
# https://tools.ietf.org/html/rfc4880#section-11
|
|
14
|
+
#
|
|
15
|
+
# Happily most packets have a few fields that are constrained, which
|
|
16
|
+
# allow us to fingerprint them with relatively high certainty.
|
|
17
|
+
#
|
|
18
|
+
# A PGP packet is described by a single byte: the so-called CTB. The
|
|
19
|
+
# high-bit is always set. If bit 6 is set, then it is a so-called
|
|
20
|
+
# new-style CTB; if bit 6 is clear, then it is a so-called old-style
|
|
21
|
+
# CTB. Old-style CTBs have only four bits of type information; bits
|
|
22
|
+
# 1-0 are used to describe the length. New-style CTBs have 6 bits of
|
|
23
|
+
# type information.
|
|
24
|
+
#
|
|
25
|
+
# Following the CTB is the packet's length in bytes. If we blindly
|
|
26
|
+
# advance the file cursor by this amount past the end of the length
|
|
27
|
+
# information we come to the next packet.
|
|
28
|
+
#
|
|
29
|
+
# Data Structures
|
|
30
|
+
# ===============
|
|
31
|
+
#
|
|
32
|
+
# New Style CTB
|
|
33
|
+
# -------------
|
|
34
|
+
#
|
|
35
|
+
# https://tools.ietf.org/html/rfc4880#section-4.2.2
|
|
36
|
+
#
|
|
37
|
+
# 76543210
|
|
38
|
+
# ||\----/
|
|
39
|
+
# || tag
|
|
40
|
+
# |always 1
|
|
41
|
+
# always 1
|
|
42
|
+
#
|
|
43
|
+
# Tag bits 7 and 6 set
|
|
44
|
+
# 0 0xC0 -- Reserved - a packet tag MUST NOT have this value
|
|
45
|
+
# 1 0xC1 -- Public-Key Encrypted Session Key Packet
|
|
46
|
+
# 2 0xC2 -- Signature Packet
|
|
47
|
+
# 3 0xC3 -- Symmetric-Key Encrypted Session Key Packet
|
|
48
|
+
# 4 0xC4 -- One-Pass Signature Packet
|
|
49
|
+
# 5 0xC5 -- Secret-Key Packet
|
|
50
|
+
# 6 0xC6 -- Public-Key Packet
|
|
51
|
+
# 7 0xC7 -- Secret-Subkey Packet
|
|
52
|
+
# 8 0xC8 -- Compressed Data Packet
|
|
53
|
+
# 9 0xC9 -- Symmetrically Encrypted Data Packet
|
|
54
|
+
# 10 0xCA -- Marker Packet
|
|
55
|
+
# 11 0xCB -- Literal Data Packet
|
|
56
|
+
# 12 0xCC -- Trust Packet
|
|
57
|
+
# 13 0xCD -- User ID Packet
|
|
58
|
+
# 14 0xCE -- Public-Subkey Packet
|
|
59
|
+
# 17 0xD1 -- User Attribute Packet
|
|
60
|
+
# 18 0xD2 -- Sym. Encrypted and Integrity Protected Data Packet
|
|
61
|
+
# 19 0xD3 -- Modification Detection Code Packet
|
|
62
|
+
# 60 to 63 -- Private or Experimental Values
|
|
63
|
+
#
|
|
64
|
+
# The CTB is followed by the length header, which is densely encoded:
|
|
65
|
+
#
|
|
66
|
+
# if length[0] is:
|
|
67
|
+
# 0..191: one byte length (length[0])
|
|
68
|
+
# 192..223: two byte length ((length[0] - 192) * 256 + length[2] + 192
|
|
69
|
+
# 224..254: four byte length (big endian interpretation of length[1..5])
|
|
70
|
+
# 255: partial body encoding
|
|
71
|
+
#
|
|
72
|
+
# The partial body encoding is similar to HTTP's chunk encoding. It
|
|
73
|
+
# is only allowed for container packets (SEIP, Compressed Data and
|
|
74
|
+
# Literal).
|
|
75
|
+
#
|
|
76
|
+
# Old Style CTB
|
|
77
|
+
# -------------
|
|
78
|
+
#
|
|
79
|
+
# https://tools.ietf.org/html/rfc4880#section-4.2.1
|
|
80
|
+
#
|
|
81
|
+
# CTB:
|
|
82
|
+
#
|
|
83
|
+
# 76543210
|
|
84
|
+
# ||\--/\/
|
|
85
|
+
# || | length encoding
|
|
86
|
+
# || tag
|
|
87
|
+
# |always 0
|
|
88
|
+
# always 1
|
|
89
|
+
#
|
|
90
|
+
# Tag:
|
|
91
|
+
#
|
|
92
|
+
# Tag bit 7 set, bits 6, 1, 0 clear
|
|
93
|
+
# 0 0x80 -- Reserved - a packet tag MUST NOT have this value
|
|
94
|
+
# 1 0x84 -- Public-Key Encrypted Session Key Packet
|
|
95
|
+
# 2 0x88 -- Signature Packet
|
|
96
|
+
# 3 0x8C -- Symmetric-Key Encrypted Session Key Packet
|
|
97
|
+
# 4 0x90 -- One-Pass Signature Packet
|
|
98
|
+
# 5 0x94 -- Secret-Key Packet
|
|
99
|
+
# 6 0x98 -- Public-Key Packet
|
|
100
|
+
# 7 0x9C -- Secret-Subkey Packet
|
|
101
|
+
# 8 0xA0 -- Compressed Data Packet
|
|
102
|
+
# 9 0xA4 -- Symmetrically Encrypted Data Packet
|
|
103
|
+
# 10 0xA8 -- Marker Packet
|
|
104
|
+
# 11 0xAC -- Literal Data Packet
|
|
105
|
+
# 12 0xB0 -- Trust Packet
|
|
106
|
+
# 13 0xB4 -- User ID Packet
|
|
107
|
+
# 14 0xB8 -- Public-Subkey Packet
|
|
108
|
+
#
|
|
109
|
+
# Length encoding:
|
|
110
|
+
#
|
|
111
|
+
# Value
|
|
112
|
+
# 0 1 byte length (following byte is the length)
|
|
113
|
+
# 1 2 byte length (following two bytes are the length)
|
|
114
|
+
# 2 4 byte length (following four bytes are the length)
|
|
115
|
+
# 3 indeterminate length: natural end of packet, e.g., EOF
|
|
116
|
+
#
|
|
117
|
+
# An indeterminate length is only allowed for container packets
|
|
118
|
+
# (SEIP, Compressed Data and Literal).
|
|
119
|
+
#
|
|
120
|
+
# Certificates
|
|
121
|
+
# ------------
|
|
122
|
+
#
|
|
123
|
+
# We check the first three packets to determine if a sequence of
|
|
124
|
+
# OpenPGP packets is likely to be a certificate. The grammar allows
|
|
125
|
+
# the following prefixes:
|
|
126
|
+
#
|
|
127
|
+
# [Primary Key] [SIG] (EOF or another certificate)
|
|
128
|
+
# [Primary Key] [SIG] [User ID] [SIG]...
|
|
129
|
+
# [Primary Key] [SIG] [User Attribute] [SIG]...
|
|
130
|
+
# [Primary Key] [SIG] [Subkey] [SIG]...
|
|
131
|
+
# [Primary Key] [User ID] [SIG]...
|
|
132
|
+
# [Primary Key] [User Attribute] [SIG]...
|
|
133
|
+
# [Primary Key] [Subkey] [SIG]...
|
|
134
|
+
#
|
|
135
|
+
# Any number of marker packets are also allowed between each packet,
|
|
136
|
+
# but they are not normally used and we don't currently check for
|
|
137
|
+
# them.
|
|
138
|
+
#
|
|
139
|
+
# The keys and subkeys may be public or private.
|
|
140
|
+
#
|
|
141
|
+
|
|
142
|
+
# Key packets and signature packets are versioned. There are two
|
|
143
|
+
# packet versions that we need to worry about in practice: v3 and v4.
|
|
144
|
+
# v4 packets were introduced in RFC 2440, which was published in 1998.
|
|
145
|
+
# It also deprecated v3 packets. There are no actively used v3
|
|
146
|
+
# certificates (GnuPG removed the code to support them in November
|
|
147
|
+
# 2014). But there are v3 keys lying around and it is useful to
|
|
148
|
+
# identify them. The next version of OpenPGP will introduce v5 keys.
|
|
149
|
+
# The document has not yet been standardized so changes are still
|
|
150
|
+
# possible. But, for our purposes, it appears that v5 data structures
|
|
151
|
+
# will be identical to v4 data structures modulo the version number.
|
|
152
|
+
#
|
|
153
|
+
# https://tools.ietf.org/html/rfc2440
|
|
154
|
+
# https://lists.gnupg.org/pipermail/gnupg-announce/2014q4/000358.html
|
|
155
|
+
# https://www.ietf.org/id/draft-ietf-openpgp-rfc4880bis-09.html#name-key-material-packet
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
# The first packet has to be a public key or a secret key.
|
|
161
|
+
#
|
|
162
|
+
# New-Style Public Key
|
|
163
|
+
0 ubyte =0xC6 OpenPGP Public Key
|
|
164
|
+
>&0 use primary_key_length_new
|
|
165
|
+
# New-Style Secret Key
|
|
166
|
+
0 ubyte =0xC5 OpenPGP Secret Key
|
|
167
|
+
>&0 use primary_key_length_new
|
|
168
|
+
# Old-Style Public Key
|
|
169
|
+
0 ubyte&0xFC =0x98 OpenPGP Public Key
|
|
170
|
+
>&-1 use primary_key_length_old
|
|
171
|
+
# Old-Style Secret Key
|
|
172
|
+
0 ubyte&0xFC =0x94 OpenPGP Secret Key
|
|
173
|
+
>&-1 use primary_key_length_old
|
|
174
|
+
|
|
175
|
+
# Parse the length, check the packet's body and finally advance to the
|
|
176
|
+
# next packet.
|
|
177
|
+
|
|
178
|
+
# There are 4 different new-style length encodings, but the partial
|
|
179
|
+
# body encoding is only acceptable for the SEIP, Compressed Data, and
|
|
180
|
+
# Literal packets, which isn't valid for any packets in a certificate
|
|
181
|
+
# so we ignore it.
|
|
182
|
+
0 name primary_key_length_new
|
|
183
|
+
>&0 ubyte <192
|
|
184
|
+
#>>&0 ubyte x (1 byte length encoding, %d bytes)
|
|
185
|
+
>>&0 use pgp_binary_key_pk_check
|
|
186
|
+
>>>&(&-1.B) use sig_or_component_1
|
|
187
|
+
>&0 ubyte >191
|
|
188
|
+
>>&-1 ubyte <225
|
|
189
|
+
# offset = ((offset[0] - 192) << 8) + offset[1] + 192 (for the length header)
|
|
190
|
+
# raw - (192 * 256 - 192)
|
|
191
|
+
# = 48960
|
|
192
|
+
#>>>&0 ubeshort x (2 byte length encoding, %d bytes)
|
|
193
|
+
>>>&1 use pgp_binary_key_pk_check
|
|
194
|
+
>>>>&(&-2.S-48960) use sig_or_component_1
|
|
195
|
+
>&0 ubyte =255
|
|
196
|
+
#>>&0 belong x (5 byte length encoding, %d bytes)
|
|
197
|
+
>>&4 use pgp_binary_key_pk_check
|
|
198
|
+
>>>&(&-4.L) use sig_or_component_1
|
|
199
|
+
# Partial body encoding (only valid for container packets).
|
|
200
|
+
# >&0 ubyte >224
|
|
201
|
+
# >>&0 ubyte <255 partial body encoding
|
|
202
|
+
|
|
203
|
+
# There are 4 different old-style length encodings, but the
|
|
204
|
+
# indeterminate length encoding is only acceptable for the SEIP,
|
|
205
|
+
# Compressed Data, and Literal packets, which isn't valid for any
|
|
206
|
+
# packets in a certificate.
|
|
207
|
+
0 name primary_key_length_old
|
|
208
|
+
#>&0 ubyte x (ctb: %x)
|
|
209
|
+
>&0 ubyte&0x3 =0
|
|
210
|
+
#>>&0 ubyte x (1 byte length encoding, %d bytes)
|
|
211
|
+
>>&1 use pgp_binary_key_pk_check
|
|
212
|
+
>>>&(&-1.B) use sig_or_component_1
|
|
213
|
+
>&0 ubyte&0x3 =1
|
|
214
|
+
#>>&0 ubeshort x (2 byte length encoding, %d bytes)
|
|
215
|
+
>>&2 use pgp_binary_key_pk_check
|
|
216
|
+
>>>&(&-2.S) use sig_or_component_1
|
|
217
|
+
>&0 ubyte&0x3 =2
|
|
218
|
+
#>>&0 ubelong x (4 byte length encoding, %d bytes)
|
|
219
|
+
>>&4 use pgp_binary_key_pk_check
|
|
220
|
+
>>>&(&-4.L) use sig_or_component_1
|
|
221
|
+
|
|
222
|
+
# Check the Key.
|
|
223
|
+
#
|
|
224
|
+
# https://tools.ietf.org/html/rfc4880#section-5.5.2
|
|
225
|
+
0 name pgp_binary_key_pk_check
|
|
226
|
+
# Valid versions are: 2, 3, 4. 5 is proposed in RFC 4880bis.
|
|
227
|
+
# Anticipate a v6 / v7 format that like v5 is compatible with v4.
|
|
228
|
+
# key format in a decade or so :D.
|
|
229
|
+
>&0 ubyte >1
|
|
230
|
+
>>&-1 ubyte <8
|
|
231
|
+
>>>&-1 byte x Version %d
|
|
232
|
+
# Check that keys were created after 1990.
|
|
233
|
+
# (1990 - 1970) * 365.2524 * 24 * 60 * 60 = 631156147
|
|
234
|
+
>>>&0 bedate >631156147 \b, Created %s
|
|
235
|
+
>>>>&-5 ubyte >3
|
|
236
|
+
>>>>>&4 use pgp_binary_key_algo
|
|
237
|
+
>>>>&-5 ubyte <4
|
|
238
|
+
>>>>>&6 use pgp_binary_key_algo
|
|
239
|
+
|
|
240
|
+
# Print out the key's algorithm and the number of bits, if this is
|
|
241
|
+
# relevant (ECC keys are a fixed size).
|
|
242
|
+
0 name pgp_binary_key_algo
|
|
243
|
+
>0 clear x
|
|
244
|
+
>&0 ubyte =1 \b, RSA (Encrypt or Sign,
|
|
245
|
+
>>&0 ubeshort x \b %d bits)
|
|
246
|
+
>&0 ubyte =2 \b, RSA (Encrypt,
|
|
247
|
+
>>&0 ubeshort x \b %d bits)
|
|
248
|
+
>&0 ubyte =3 \b, RSA (Sign,
|
|
249
|
+
>>&0 ubeshort x \b %d bits)
|
|
250
|
+
>&0 ubyte =16 \b, El Gamal (Encrypt,
|
|
251
|
+
>>&0 ubeshort x \b %d bits)
|
|
252
|
+
>&0 ubyte =17 \b, DSA
|
|
253
|
+
>>&0 ubeshort x \b (%d bits)
|
|
254
|
+
>&0 ubyte =18 \b, ECDH
|
|
255
|
+
>&0 ubyte =19 \b, ECDSA
|
|
256
|
+
>&0 ubyte =20 \b, El Gamal (Encrypt or Sign,
|
|
257
|
+
>>&0 ubeshort x \b %d bits)
|
|
258
|
+
>&0 ubyte =22 \b, EdDSA
|
|
259
|
+
>&0 default x
|
|
260
|
+
>>&0 ubyte x \b, Unknown Algorithm (%#x)
|
|
261
|
+
|
|
262
|
+
# Match all possible second packets.
|
|
263
|
+
0 name sig_or_component_1
|
|
264
|
+
#>0 ubyte x (ctb: %x)
|
|
265
|
+
>&0 ubyte =0xC2
|
|
266
|
+
>>0 ubyte x \b; Signature
|
|
267
|
+
>>&0 use sig_or_component_1_length_new
|
|
268
|
+
>&0 ubyte =0xCD
|
|
269
|
+
>>0 ubyte x \b; User ID
|
|
270
|
+
>>&0 use sig_or_component_1_length_new
|
|
271
|
+
>&0 ubyte =0xCE
|
|
272
|
+
>>0 ubyte x \b; Public Subkey
|
|
273
|
+
>>&0 use sig_or_component_1_length_new
|
|
274
|
+
>&0 ubyte =0xC7
|
|
275
|
+
>>0 ubyte x \b; Secret Subkey
|
|
276
|
+
>>&0 use sig_or_component_1_length_new
|
|
277
|
+
>&0 ubyte =0xD1
|
|
278
|
+
>>0 ubyte x \b; User Attribute
|
|
279
|
+
>>&0 use sig_or_component_1_length_new
|
|
280
|
+
>&0 ubyte&0xFC =0x88
|
|
281
|
+
>>0 ubyte x \b; Signature
|
|
282
|
+
>>&-1 use sig_or_component_1_length_old
|
|
283
|
+
>&0 ubyte&0xFC =0xB4
|
|
284
|
+
>>0 ubyte x \b; User ID
|
|
285
|
+
>>&-1 use sig_or_component_1_length_old
|
|
286
|
+
>&0 ubyte&0xFC =0xB8
|
|
287
|
+
>>0 ubyte x \b; Public Subkey
|
|
288
|
+
>>&-1 use sig_or_component_1_length_old
|
|
289
|
+
>&0 ubyte&0xFC =0x9C
|
|
290
|
+
>>0 ubyte x \b; Secret Subkey
|
|
291
|
+
>>&-1 use sig_or_component_1_length_old
|
|
292
|
+
|
|
293
|
+
# Copy of 'primary_key_length_new', but calls cert_packet_3.
|
|
294
|
+
0 name sig_or_component_1_length_new
|
|
295
|
+
>&0 ubyte <192
|
|
296
|
+
#>>&0 ubyte x (1 byte new length encoding, %d bytes)
|
|
297
|
+
>>&(&-1.B) use cert_packet_3
|
|
298
|
+
>&0 ubyte >191
|
|
299
|
+
>>&-1 ubyte <225
|
|
300
|
+
# offset = ((offset[0] - 192) << 8) + offset[1] + 192 + 1 (for the length header)
|
|
301
|
+
# raw - (192 * 256 - 192 - 1)
|
|
302
|
+
# = 48959
|
|
303
|
+
#>>>&-1 ubeshort x (2 byte new length encoding, %d bytes)
|
|
304
|
+
>>>&(&-1.S-48959) use cert_packet_3
|
|
305
|
+
>&0 ubyte =255
|
|
306
|
+
#>>&0 belong x (5 byte new length encoding, %d bytes)
|
|
307
|
+
>>&(&-4.L) use cert_packet_3
|
|
308
|
+
# Partial body encoding (only valid for container packets).
|
|
309
|
+
# >&0 ubyte >224
|
|
310
|
+
# >>&0 ubyte <255 partial body encoding
|
|
311
|
+
|
|
312
|
+
0 name sig_or_component_1_length_old
|
|
313
|
+
#>&0 ubyte x (ctb: %x)
|
|
314
|
+
>&0 ubyte&0x3 =0
|
|
315
|
+
#>>&0 ubyte x (1 byte old length encoding, %d bytes)
|
|
316
|
+
>>&(&0.B+1) use cert_packet_3
|
|
317
|
+
>&0 ubyte&0x3 =1
|
|
318
|
+
#>>&0 ubeshort x (2 byte old length encoding, %d bytes)
|
|
319
|
+
>>&(&0.S+2) use cert_packet_3
|
|
320
|
+
>&0 ubyte&0x3 =2
|
|
321
|
+
#>>&0 ubelong x (4 byte old length encoding, %d bytes)
|
|
322
|
+
>>&(&0.L+4) use cert_packet_3
|
|
323
|
+
|
|
324
|
+
# Copy of above.
|
|
325
|
+
0 name cert_packet_3
|
|
326
|
+
#>0 ubyte x (ctb: %x)
|
|
327
|
+
>&0 ubyte =0xC2
|
|
328
|
+
>>0 ubyte x \b; Signature
|
|
329
|
+
>>&0 use cert_packet_3_length_new
|
|
330
|
+
>&0 ubyte =0xCD
|
|
331
|
+
>>0 ubyte x \b; User ID
|
|
332
|
+
>>&0 use cert_packet_3_length_new
|
|
333
|
+
>&0 ubyte =0xCE
|
|
334
|
+
>>0 ubyte x \b; Public Subkey
|
|
335
|
+
>>&0 use cert_packet_3_length_new
|
|
336
|
+
>&0 ubyte =0xC7
|
|
337
|
+
>>0 ubyte x \b; Secret Subkey
|
|
338
|
+
>>&0 use cert_packet_3_length_new
|
|
339
|
+
>&0 ubyte =0xD1
|
|
340
|
+
>>0 ubyte x \b; User Attribute
|
|
341
|
+
>>&0 use cert_packet_3_length_new
|
|
342
|
+
>&0 ubyte&0xFC =0x88
|
|
343
|
+
>>0 ubyte x \b; Signature
|
|
344
|
+
>>&-1 use cert_packet_3_length_old
|
|
345
|
+
>&0 ubyte&0xFC =0xB4
|
|
346
|
+
>>0 ubyte x \b; User ID
|
|
347
|
+
>>&-1 use cert_packet_3_length_old
|
|
348
|
+
>&0 ubyte&0xFC =0xB8
|
|
349
|
+
>>0 ubyte x \b; Public Subkey
|
|
350
|
+
>>&-1 use cert_packet_3_length_old
|
|
351
|
+
>&0 ubyte&0xFC =0x9C
|
|
352
|
+
>>0 ubyte x \b; Secret Subkey
|
|
353
|
+
>>&-1 use cert_packet_3_length_old
|
|
354
|
+
|
|
355
|
+
# Copy of above.
|
|
356
|
+
0 name cert_packet_3_length_new
|
|
357
|
+
>&0 ubyte <192
|
|
358
|
+
#>>&0 ubyte x (1 byte new length encoding, %d bytes)
|
|
359
|
+
>>&(&-1.B) use pgp_binary_keys_end
|
|
360
|
+
>&0 ubyte >191
|
|
361
|
+
>>&-1 ubyte <225
|
|
362
|
+
# offset = ((offset[0] - 192) << 8) + offset[1] + 192 + 1 (for the length header)
|
|
363
|
+
# raw - (192 * 256 - 192 - 1)
|
|
364
|
+
# = 48959
|
|
365
|
+
#>>>&-1 ubeshort x (2 byte new length encoding, %d bytes)
|
|
366
|
+
>>>&(&-1.S-48959) use pgp_binary_keys_end
|
|
367
|
+
>&0 ubyte =255
|
|
368
|
+
#>>&0 belong x (5 byte new length encoding, %d bytes)
|
|
369
|
+
>>&(&-4.L) use pgp_binary_keys_end
|
|
370
|
+
|
|
371
|
+
0 name cert_packet_3_length_old
|
|
372
|
+
#>&0 ubyte x (ctb: %x)
|
|
373
|
+
>&0 ubyte&0x3 =0
|
|
374
|
+
#>>&0 ubyte x (1 byte old length encoding, %d bytes)
|
|
375
|
+
>>&(&0.B+1) use pgp_binary_keys_end
|
|
376
|
+
>&0 ubyte&0x3 =1
|
|
377
|
+
#>>&0 ubeshort x (2 byte old length encoding, %d bytes)
|
|
378
|
+
>>&(&0.S+2) use pgp_binary_keys_end
|
|
379
|
+
>&0 ubyte&0x3 =2
|
|
380
|
+
#>>&0 ubelong x (4 byte old length encoding, %d bytes)
|
|
381
|
+
>>&(&0.L+4) use pgp_binary_keys_end
|
|
382
|
+
|
|
383
|
+
# We managed to parse the first three packets of the certificate. Declare
|
|
384
|
+
# victory.
|
|
385
|
+
0 name pgp_binary_keys_end
|
|
386
|
+
>0 byte x \b; OpenPGP Certificate
|
|
387
|
+
!:mime application/pgp-keys
|
|
388
|
+
!:ext pgp/gpg/pkr/asd
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
|
|
2
|
+
#------------------------------------------------------------------------------
|
|
3
|
+
# $File: pkgadd,v 1.6 2009/09/19 16:28:11 christos Exp $
|
|
4
|
+
# pkgadd: file(1) magic for SysV R4 PKG Datastreams
|
|
5
|
+
#
|
|
6
|
+
0 string #\ PaCkAgE\ DaTaStReAm pkg Datastream (SVR4)
|
|
7
|
+
!:mime application/x-svr4-package
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
|
|
2
|
+
#------------------------------------------------------------------------------
|
|
3
|
+
# $File: plan9,v 1.6 2021/07/30 12:25:13 christos Exp $
|
|
4
|
+
# plan9: file(1) magic for AT&T Bell Labs' Plan 9 executables and object files
|
|
5
|
+
# From: "Stefan A. Haubenthal" <polluks@web.de>
|
|
6
|
+
#
|
|
7
|
+
0 belong 0x00000107 Plan 9 executable, Motorola 68k
|
|
8
|
+
0 belong 0x00000197 Plan 9 executable, AT&T Hobbit
|
|
9
|
+
0 belong 0x000001EB Plan 9 executable, Intel 386
|
|
10
|
+
0 belong 0x00000247 Plan 9 executable, Intel 960
|
|
11
|
+
0 belong 0x000002AB Plan 9 executable, SPARC
|
|
12
|
+
0 belong 0x00000407 Plan 9 executable, MIPS R3000
|
|
13
|
+
0 belong 0x0000048B Plan 9 executable, AT&T DSP 3210
|
|
14
|
+
0 belong 0x00000517 Plan 9 executable, MIPS R4000 BE
|
|
15
|
+
0 belong 0x000005AB Plan 9 executable, AMD 29000
|
|
16
|
+
0 belong 0x00000647 Plan 9 executable, ARM 7-something
|
|
17
|
+
0 belong 0x000006EB Plan 9 executable, PowerPC
|
|
18
|
+
0 belong 0x00000797 Plan 9 executable, MIPS R4000 LE
|
|
19
|
+
0 belong 0x0000084B Plan 9 executable, DEC Alpha
|
|
20
|
+
|
|
21
|
+
0 belong 0x3A11013C Plan 9 object file, MIPS R3000
|
|
22
|
+
0 belong 0x430D013C Plan 9 object file, AT&T Hobbit
|
|
23
|
+
0 belong 0x4D013201 Plan 9 object file, Motorola 68k
|
|
24
|
+
0 belong 0x7410013C Plan 9 object file, SPARC
|
|
25
|
+
0 belong 0x7E004501 Plan 9 object file, Intel 386
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
|
|
2
|
+
#------------------------------------------------------------------------------
|
|
3
|
+
# $File: playdate,v 1.1 2022/11/04 13:34:48 christos Exp $
|
|
4
|
+
#
|
|
5
|
+
# Various native file formats for the Playdate portable video game console.
|
|
6
|
+
#
|
|
7
|
+
# These are unofficially documented at
|
|
8
|
+
# https://github.com/jaames/playdate-reverse-engineering
|
|
9
|
+
#
|
|
10
|
+
# The SDK is a source for many test files, and can be used to
|
|
11
|
+
# create others. https://play.date/dev/
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# pdi: static image
|
|
15
|
+
0 string Playdate\ IMG Playdate image data
|
|
16
|
+
>12 belong&0x80 0x80 (compressed)
|
|
17
|
+
>>20 lelong x %d x
|
|
18
|
+
>>24 lelong x %d
|
|
19
|
+
>12 belong&0x80 0x00 (uncompressed)
|
|
20
|
+
>>16 leshort x %d x
|
|
21
|
+
>>18 leshort x %d
|
|
22
|
+
|
|
23
|
+
# pdt: multiple static images
|
|
24
|
+
0 string Playdate\ IMT Playdate image data set
|
|
25
|
+
>12 belong&0x80 0x80 (compressed)
|
|
26
|
+
>>20 lelong x %d x
|
|
27
|
+
>>24 lelong x %d,
|
|
28
|
+
>>28 lelong x %d cells
|
|
29
|
+
>12 belong&0x80 0x00 (uncompressed)
|
|
30
|
+
>>20 lelong x tile grid %d x
|
|
31
|
+
>>24 lelong x %d
|
|
32
|
+
|
|
33
|
+
# pds: string tables
|
|
34
|
+
0 string Playdate\ STR Playdate localization strings
|
|
35
|
+
>12 belong&0x80 0x80 (compressed)
|
|
36
|
+
>12 belong&0x80 0x00 (uncompressed)
|
|
37
|
+
|
|
38
|
+
# pda: audio
|
|
39
|
+
0 string Playdate\ AUD Playdate audio file
|
|
40
|
+
>12 lelong&0xffffff x %d Hz,
|
|
41
|
+
>15 byte 0 unsigned, 8-bit PCM, 1 channel
|
|
42
|
+
>15 byte 1 unsigned, 8-bit PCM, 2 channel
|
|
43
|
+
>15 byte 2 signed, 16-bit little-endian PCM, 1 channel
|
|
44
|
+
>15 byte 3 signed, 16-bit little-endian PCM, 1 channel
|
|
45
|
+
>15 byte 4 4-bit ADPCM, 1 channel
|
|
46
|
+
>15 byte 5 4-bit ADPCM, 2 channel
|
|
47
|
+
|
|
48
|
+
# pda: video
|
|
49
|
+
0 string Playdate\ VID Playdate video file
|
|
50
|
+
>24 leshort x %d x
|
|
51
|
+
>26 leshort x %d,
|
|
52
|
+
>16 leshort x %d frames,
|
|
53
|
+
>20 lefloat x %.2f FPS
|
|
54
|
+
|
|
55
|
+
# pdz: executable package
|
|
56
|
+
# Not a lot we can do, as it's a stream of entries with no summary information.
|
|
57
|
+
0 string Playdate\ PDZ Playdate executable package
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
|
|
2
|
+
#------------------------------------------------------------------------------
|
|
3
|
+
# $File: plus5,v 1.6 2009/09/19 16:28:11 christos Exp $
|
|
4
|
+
# plus5: file(1) magic for Plus Five's UNIX MUMPS
|
|
5
|
+
#
|
|
6
|
+
# XXX - byte order? Paging Hokey....
|
|
7
|
+
#
|
|
8
|
+
0 short 0x259 mumps avl global
|
|
9
|
+
>2 byte >0 (V%d)
|
|
10
|
+
>6 byte >0 with %d byte name
|
|
11
|
+
>7 byte >0 and %d byte data cells
|
|
12
|
+
0 short 0x25a mumps blt global
|
|
13
|
+
>2 byte >0 (V%d)
|
|
14
|
+
>8 short >0 - %d byte blocks
|
|
15
|
+
>15 byte 0x00 - P/D format
|
|
16
|
+
>15 byte 0x01 - P/K/D format
|
|
17
|
+
>15 byte 0x02 - K/D format
|
|
18
|
+
>15 byte >0x02 - Bad Flags
|
polyfile/magic_defs/pmem
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
|
|
2
|
+
#------------------------------------------------------------------------------
|
|
3
|
+
# $File: pmem,v 1.4 2021/04/26 15:56:00 christos Exp $
|
|
4
|
+
# pmem: file(1) magic for Persistent Memory Development Kit pool files
|
|
5
|
+
#
|
|
6
|
+
0 string PMEM
|
|
7
|
+
>4 string POOLSET Persistent Memory Poolset file
|
|
8
|
+
>>11 search REPLICA with replica
|
|
9
|
+
>4 regex LOG|BLK|OBJ Persistent Memory Pool file, type: %s,
|
|
10
|
+
>>8 lelong >0 version: %#x,
|
|
11
|
+
>>12 lelong x compat: %#x,
|
|
12
|
+
>>16 lelong x incompat: %#x,
|
|
13
|
+
>>20 lelong x ro_compat: %#x,
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
>>120 leqldate x crtime: %s,
|
|
17
|
+
>>128 lequad x alignment_desc: %#016llx,
|
|
18
|
+
|
|
19
|
+
>>136 clear x
|
|
20
|
+
>>136 byte 2 machine_class: 64-bit,
|
|
21
|
+
>>136 default x machine_class: unknown
|
|
22
|
+
>>>136 byte x (%#d),
|
|
23
|
+
|
|
24
|
+
>>137 clear x
|
|
25
|
+
>>137 byte 1 data: little-endian,
|
|
26
|
+
>>137 byte 2 data: big-endian,
|
|
27
|
+
>>137 default x data: unknown
|
|
28
|
+
>>>137 byte x (%#d),
|
|
29
|
+
|
|
30
|
+
>>138 byte !0 reserved[0]: %d,
|
|
31
|
+
>>139 byte !0 reserved[1]: %d,
|
|
32
|
+
>>140 byte !0 reserved[2]: %d,
|
|
33
|
+
>>141 byte !0 reserved[3]: %d,
|
|
34
|
+
|
|
35
|
+
>>142 clear x
|
|
36
|
+
>>142 leshort 62 machine: x86_64
|
|
37
|
+
>>142 leshort 183 machine: aarch64
|
|
38
|
+
>>142 default x machine: unknown
|
|
39
|
+
>>>142 leshort x (%#d)
|
|
40
|
+
|
|
41
|
+
>4 string BLK
|
|
42
|
+
>>4096 lelong x \b, blk.bsize: %d
|
|
43
|
+
|
|
44
|
+
>4 string OBJ
|
|
45
|
+
>>4096 string >0 \b, obj.layout: '%s'
|
|
46
|
+
>>4096 string <0 \b, obj.layout: NULL
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
|
|
2
|
+
#------------------------------------------------------------------------------
|
|
3
|
+
# $File: polyml,v 1.2 2019/04/19 00:42:27 christos Exp $
|
|
4
|
+
# polyml: file(1) magic for PolyML
|
|
5
|
+
#
|
|
6
|
+
# PolyML
|
|
7
|
+
# MPEG, FLI, DL originally from vax@ccwf.cc.utexas.edu (VaX#n8)
|
|
8
|
+
# FLC, SGI, Apple originally from Daniel Quinlan (quinlan@yggdrasil.com)
|
|
9
|
+
|
|
10
|
+
# [0]: https://www.polyml.org/
|
|
11
|
+
# [1]: https://github.com/polyml/polyml/blob/master/\
|
|
12
|
+
# libpolyml/savestate.cpp#L146-L147
|
|
13
|
+
# [2]: https://github.com/polyml/polyml/blob/master/\
|
|
14
|
+
# libpolyml/savestate.cpp#L1262-L1263
|
|
15
|
+
|
|
16
|
+
# Type: Poly/ML saved data
|
|
17
|
+
# From: Matthew Fernandez <matthew.fernandez@gmail.com>
|
|
18
|
+
|
|
19
|
+
0 string POLYSAVE Poly/ML saved state
|
|
20
|
+
>8 long x version %u
|
|
21
|
+
|
|
22
|
+
0 string POLYMODU Poly/ML saved module
|
|
23
|
+
>8 long x version %u
|