1
1
mirror of https://github.com/wader/fq.git synced 2024-11-28 03:02:55 +03:00
Commit Graph

163 Commits

Author SHA1 Message Date
Mattias Wadman
0b0f28e966 cbor: Add decoder
Does not decode sematic tag types
Also fixes broken float16 support

Fixes #71
2022-01-12 17:56:03 +01:00
Mattias Wadman
149cb3f45a interp: Add torepr/0 that converts decode value into what it reptresents
Ex: fq -d msgpack torepr file.msgpack
Willoutput the JSON representation of the msgpack

Make per format *_torepr functions internal
2022-01-12 17:33:58 +01:00
Mattias Wadman
a6bf62ce19 msgpack: Add decoder
Fixes #25
2022-01-10 19:33:09 +01:00
Mattias Wadman
af8e7efc61 bencode: Add decoder
Closes #63
2022-01-10 10:52:14 +01:00
siddik.acil
0cf486dcf1 elf: fix all-platforms naming typo 2022-01-08 13:42:08 +01:00
Mattias Wadman
c05fe732b6
Merge pull request #59 from wader/png-plte-trns-cleanup
png: Decode PLTE and tRNS chunks and cleanup syms a bit
2022-01-07 20:13:37 +01:00
Mattias Wadman
bfc977b810 png: Decode PLTE and tRNS chunks and cleanup syms a bit 2022-01-07 14:31:18 +01:00
Mattias Wadman
edd0ae198b tcp,flow: By default allow missing syn/ack for now
Is probably what you usually want
2022-01-07 12:02:38 +01:00
Mattias Wadman
628f0f403d bson: Add decoder
Only supports basic types for now
2022-01-06 00:51:37 +01:00
Mattias Wadman
681dbc26b7 elf,ar: Add ar decoder, improved elf decoder
Add x86, 386, arm64, arm v6, arm v7 linux elf test files
2022-01-05 22:05:09 +01:00
Mattias Wadman
af23eb8269 pcap: Don't fail if incl_len > spanlen
Documentation wrong? seems to happen in real pcap files
2022-01-03 21:27:14 +01:00
Mattias Wadman
b9aef39ed4 pcap,pcapng,bsd_loopback_frame: Add decoder, refactor link frame into a group
Also fix incorrect struct name s/UDPDatagramIn/UDPPayloadIn/
2022-01-03 21:06:27 +01:00
Mattias Wadman
b8671137dd matroska: Assert sane tag size only for strings
Fixes issue with big webm/matroska files
Can be ignored with force decode
2022-01-01 19:37:12 +01:00
Mattias Wadman
eb9698fce7 mp4,ctts: Seem more usable to treat sample count/offset as signed
Seems to different between specs
Modify avc.fqtest to generate a ctts box
2021-12-20 11:19:38 +01:00
Mattias Wadman
9f08af31df mpeg,aac: Factor out escape value decoding 2021-12-14 17:34:38 +01:00
Mattias Wadman
28a3b71bd4 mp4: Cleanup sample decode code 2021-12-12 15:25:57 +01:00
Mattias Wadman
91217e8210 tiff: Fix endian typo and cleanup todos 2021-12-12 11:26:00 +01:00
Mattias Wadman
07a2ebe4b7 tiff,fuzz: Fatal error on infinite ifd loops 2021-12-12 11:20:01 +01:00
Mattias Wadman
c149732182 mp4,trun,fuzz: Limit number of constant sample entries 2021-12-12 09:55:07 +01:00
Mattias Wadman
2b2320d411 pcap,flows: fuzz: Handle broken packets more nicely
Still need to understand how gopacket is suppose to handle broken things
2021-12-09 14:19:17 +01:00
Mattias Wadman
62785291fe mp4: fuzz: Make sure stsz has sane number of entries on constant sample size
Should be redone to not use an array
2021-12-09 13:00:10 +01:00
Mattias Wadman
f3480026bf sll2: fuzz: Limit address length to max 8 bytes 2021-12-09 10:38:34 +01:00
Mattias Wadman
6ed2e2e72e interp: dump: Indicate arrays using jq-syntax
Related to #16
2021-12-08 16:24:28 +01:00
Mattias Wadman
406263b485 mp4: Add comment about hdlr.component_name prefix byte 2021-12-08 10:45:10 +01:00
Mattias Wadman
c2131bb4a0 flac: Cleanup scalar usage and fix incorrect sample rates
Also split DisplayFormat into actual and sym
2021-12-08 00:39:52 +01:00
Mattias Wadman
1d7ace3899 pcap,pcapng,tcp: Use capture length not original length 2021-12-07 18:47:31 +01:00
Mattias Wadman
e91b22b324 matroska,ebml: Use scalar and require sane tag size 2021-12-07 15:51:46 +01:00
Mattias Wadman
45026ebf21 tar: Cleanup constant usage a bit more 2021-12-06 21:08:40 +01:00
Mattias Wadman
b525d0b3c8 pcap: fuzz: Skip ssl2 packet if too short
Should report error somehow?
2021-12-06 19:05:04 +01:00
Mattias Wadman
38509683a7 udp: Use proper udp payload format var name 2021-12-06 15:42:49 +01:00
Mattias Wadman
3601fe3bcb gzip: fuzz: Don't uncompress on unknown compress method (nil create reader fn) 2021-12-06 15:41:39 +01:00
Mattias Wadman
91cc6d80f7 tar: Fix size decode regression after cleanup 2021-12-06 14:15:54 +01:00
Mattias Wadman
e260830454 webp: Cleanup endian usage 2021-12-04 19:15:54 +01:00
Mattias Wadman
dd883b35bd wav: Cleanup endian usage 2021-12-04 19:14:07 +01:00
Mattias Wadman
57e9f418c8 vorbis_packet: Cleanup endian usage 2021-12-04 19:12:24 +01:00
Mattias Wadman
dc1aea3030 opus: Cleanup endian usage and fix incorrect preskip decode 2021-12-04 19:12:24 +01:00
Mattias Wadman
6a8d77b05c vorbis_comment: Cleanup endian usage and naming a bit 2021-12-04 19:12:24 +01:00
Mattias Wadman
eb4718fbdd tar: Cleanup api usage 2021-12-04 19:05:26 +01:00
Mattias Wadman
d48ebc12ee decode: Simplify Compound.Children
Not a array reference anymore but instead pass around Compound reference
2021-12-03 00:06:11 +01:00
Mattias Wadman
2fc0a71a47 decode: Refactor scalar usage
Move scalar into own package.
Split scalar code into decode related scalar code (that reads etc) and
scalar code that just transform the scalar value.
Use a scalar.Mapper interface instead of just a function.
Make mappers, assert and validat impement the interface.
2021-12-02 17:39:26 +01:00
Mattias Wadman
f801cc0af7 decode: Rename s/FieldTryFormat/TryFieldFormat for consistency 2021-11-30 15:29:41 +01:00
Mattias Wadman
c0eebcc23f format: Remove unused ProtoBufType 2021-11-30 13:13:14 +01:00
Mattias Wadman
7f7698601f ogg: Cleanup bitio in format out, maybe later 2021-11-30 13:12:14 +01:00
Mattias Wadman
f55b1af6ac inet: Add tcp and ipv4 reassembly
Also add tcp_stream and udp_payload to decode content
2021-11-29 18:42:18 +01:00
Mattias Wadman
be0fdbe793 vp9: Add profile and fix reserved_zero field collision 2021-11-29 16:14:59 +01:00
Mattias Wadman
db586eb3f9 mp4,matroska: Add *_path/0 variant that uses format_root 2021-11-29 13:19:23 +01:00
Mattias Wadman
c8fad57df7 tiff: Fix reading of mluc tags with multiple records 2021-11-29 11:55:25 +01:00
Mattias Wadman
646f902ca7 vpx_ccr: Add color names 2021-11-29 00:37:22 +01:00
Mattias Wadman
3bf1a57cfa avc: Cleanup and add color names etc 2021-11-28 17:29:56 +01:00
Mattias Wadman
7b7faaf02b pcap: Add pcap, pcapng, ether8023, ipv4, udp, udp 2021-11-24 18:13:00 +01:00