1
1
mirror of https://github.com/wader/fq.git synced 2024-12-24 05:41:38 +03:00
Commit Graph

23 Commits

Author SHA1 Message Date
Mattias Wadman
797c7d9065 macho: Move timestamp string to description 2023-10-25 18:00:44 +02:00
Mattias Wadman
71a5fc91ad macho: Respect endian when decoding flags 2023-10-25 17:43:36 +02:00
Mattias Wadman
051a70bd4b interp: Change bit ranges to use exclusive end
All other ranges and slicing uses exclusive end so i think it make sense
to make it consistent.

Update docs and add additional example for non-byte-aligned field.

Also fixes issue showing zero bit ranges as start-NA.
2023-10-20 15:37:26 +02:00
Mattias Wadman
1d14ea51cd matroska: Decode ebml date type
Also some refactor of shared date decode functions to allow unit
2023-10-17 11:10:48 +02:00
Mattias Wadman
23ae4d978b decode,interp: Make synthetic values more visible and not act as decode values 2023-10-07 17:40:16 +02:00
Mattias Wadman
2c505feec8 help,markdown: Rewrote and made text rendering nicer
Plan is to use it for man page etc and also some ansi renderer
2023-05-08 00:07:56 +02:00
Mattias Wadman
a4a332bf4e formats: Clenaup naming a bit 2023-05-01 13:19:04 +02:00
Mattias Wadman
b08ef00dd1 decode,interp: Refactor format groups into a proper struct
Replaces []Format with a Group type.
A bit more type safe.
Breaking change for RegisterFormat, now takes a first argument that is a "single" format group.
Lots of naming cleanup.

This is also preparation for decode group argument which will enable doing intresting
probing, ex a format decoder could know it's decode as part of probe group  (html could
be probed possibly), or have "arg probe" group for decoder who inspect args to know
if they should probe (-d /path/to/schema etc) to enable nice CLI-ergonomics.
2023-04-29 20:02:34 +02:00
Mattias Wadman
0b6ef2a9d8 golangci-lint: Disable revive unused-parameter and update for new default config
unused-parameter disabled as i prefer to see the names
new default revive config seems to not warn about capital names
2023-03-18 22:56:58 +01:00
Mattias Wadman
dec433fc53 help,markdown: Fix double line breaks when converting to text
Also fix ugly last line break hack
2023-03-02 23:38:11 +01:00
Mattias Wadman
8e0dde03d0 decode: Support multiple format args and some rename and refactor
This will allow passing both cli options and format options to sub decoder.
Ex: pass keylog option to a tls decoder when decoding a pcap.
Ex: pass decode options to a format inside a http body inside a pcap.

Add ArgAs method to lookup argument based on type. This also makes the format
decode function have same signature as sub decoders in the decode API.

This change decode.Format a bit:
DecodeFn is now just func(d *D) any
DecodeInArg renamed to DefaultInArg
2023-02-18 21:38:51 +01:00
Mattias Wadman
8f39ef6335 bplist: Harmonize ns_keyed_archive jq style a bit
Let root arg be a lambda so torepr can be done once
2022-12-20 00:56:19 +01:00
David McDonald
129b4b7026 bplist: doc: update docs to reflect changes to ns_keyed_archiver 2022-12-19 15:24:57 -06:00
David McDonald
a9047c0278 bplist: updates from_ns_keyed_archiver to do automatic torepr based on format detection 2022-12-19 15:18:05 -06:00
David McDonald
9dab3c606c bplist: minor fix to from_ns_keyed_archiver 2022-12-19 14:22:17 -06:00
David McDonald
448c3efb28 bplist: update docs with from_ns_keyed_archiver reference, add error case to function 2022-12-19 13:30:34 -06:00
David McDonald
cba72dbdf0 bplist: added overload for from_ns_keyed_archiver jq func 2022-12-19 02:04:23 -06:00
David McDonald
98eab8cb5b decode: rename parameter for consistency 2022-12-17 13:36:16 -06:00
David McDonald
93f2aa5d73 decode: change PosLoopDetector to use generics 2022-12-17 13:26:40 -06:00
David McDonald
3232f9cc15 decode: moves PosLoopDetector into its own package 2022-12-17 02:18:48 -06:00
David McDonald
7c9504c727 decode: moves macho decoder to apple package 2022-12-17 01:54:59 -06:00
David McDonald
708346784f decode: remove dead code from ns_keyed_archiver 2022-12-17 01:52:46 -06:00
David McDonald
3ec0ba3f25 decode: add ns_keyed_archiver, restructure apple decoder into apple package 2022-12-17 01:47:27 -06:00