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
f6abcff1fc
Merge pull request #54 from wader/interp-stdio-cleanup
...
interp: Cleanup stdio usage and functions
2022-01-05 21:44:48 +01:00
Mattias Wadman
e365f22084
interp: Cleanup stdio usage and functions
2022-01-05 21:41:11 +01:00
Mattias Wadman
b6515c8b15
interp: Remove buffer smartness for regexp match functions
...
Just confusing and breaks symbolic grep for decode values (as they are buffers).
To get buffer use tobytes functions intstead.
2022-01-05 21:13:39 +01:00
Mattias Wadman
a41f0d4b5f
windows: Correct @builtin include path join
...
Failed because go embed paths always uses /
Switch to always use forward slash paths internally
Related to #21
2022-01-04 22:10:53 +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
6db7218093
doc: Some more dev infomration
2021-12-31 17:13:16 +01:00
Mattias Wadman
55b1d5c3e7
interp: Move _registry to decode
...
More related to decode than interp. Maybe should have a format.go?
2021-12-25 16:29:45 +01:00
Mattias Wadman
46b59d0ebf
crc: Unbreak build on 32-bit arch
...
Thanks Alexey Dokuchaev @danfe for report and fix.
Fixes #30
2021-12-25 15:47:54 +01:00
Mattias Wadman
f7c7801bbe
interp: Rework buffer regex support
...
Now all regexp functions should work similar to string version for buffers.
Added scan_toend that works as scan but outputs buffer from match to end of buffer,
useful when trying to decode a format and you dont know or care to limit.
2021-12-17 16:23:44 +01:00
Mattias Wadman
f4f63835dc
interp: Add ._index for values in arrays
2021-12-10 18:19:11 +01:00
Mattias Wadman
e823475d3c
interp: Fix help a bit
2021-12-09 21:11:24 +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
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
9b683cd839
deocde: Cleanup some io panic(err)
2021-12-07 17:33:57 +01:00
Mattias Wadman
713ffe4770
scalar: Add Require* and Require/Validate/AssertRange*
2021-12-07 15:50:55 +01:00
Mattias Wadman
fa350c6165
interp: Move display to jq
2021-12-06 21:08:40 +01:00
Mattias Wadman
4558192e7c
interp: Cleanup buffer code and implement ExtType()
2021-12-06 21:08:40 +01:00
Mattias Wadman
75aa47556a
decode: Generate Try?Scalar* methods for readers too
2021-12-04 19:05:16 +01:00
Mattias Wadman
9aec91a675
interp: match: Fix issue with regexp meta characters when matching using a buffer
2021-12-04 17:24:43 +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
36e5562e5b
interp: Rename value.* to decode.* as it makes more sense
2021-12-02 21:43:16 +01:00
Mattias Wadman
1b7b2f9641
interp: Use gojqextra.NonUpdatableTypeError
2021-12-02 21:41:38 +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
01a407a462
interp: Rename s/bufferrange/buffer and cleanup
2021-11-30 21:10:26 +01:00
Mattias Wadman
4eccb1ee71
interp: Fix broken aes_ctr, should return buffer instead of []byte
2021-11-30 15:30:34 +01:00
Mattias Wadman
f801cc0af7
decode: Rename s/FieldTryFormat/TryFieldFormat for consistency
2021-11-30 15:29:41 +01:00
Mattias Wadman
d1e1cd98c2
decode: Fix walk root depth issue causing dump to indent incorrectly
2021-11-30 12:51:52 +01:00
Mattias Wadman
8d442b82ee
interp: Cleanup stdin reading and add more option tests
2021-11-30 12:25:56 +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
9f2dddc6e1
interp,gojqextra: Make buffers values even more lazy and error early on non-scalar calls
2021-11-29 14:51:00 +01:00
Mattias Wadman
afb1050355
interp: Move _decode_value to value.jq
2021-11-29 14:26:59 +01:00
Mattias Wadman
8e5442f023
interp: Limit how often decode progress fn is called
2021-11-29 14:26:59 +01:00
Mattias Wadman
3bf1a57cfa
avc: Cleanup and add color names etc
2021-11-28 17:29:56 +01:00
Mattias Wadman
6034ad7d67
interp: More sure stdOS stops the signal forward gorutine
2021-11-25 13:35:20 +01:00
Mattias Wadman
7b7faaf02b
pcap: Add pcap, pcapng, ether8023, ipv4, udp, udp
2021-11-24 18:13:00 +01:00
Mattias Wadman
9d116df799
decode: Rework use of TryFieldReaderRangeFormat
...
Handle failure better
2021-11-24 15:25:27 +01:00
Mattias Wadman
4f8d03731d
format,decode: Some crc and endian refactor
2021-11-24 12:01:01 +01:00
Mattias Wadman
e6cb708d38
mpeg: Nicer sym and description
2021-11-22 17:02:07 +01:00
Mattias Wadman
69e4eea920
interp: Better error if format/group is not found
2021-11-22 13:28:18 +01:00
Mattias Wadman
abcecb8156
interp: Remove unused []byte type
2021-11-22 01:46:06 +01:00
Mattias Wadman
fdb811ec54
gojqextra,decode: Add generic lazy JQValue
2021-11-22 01:23:59 +01:00
Mattias Wadman
1047d909ac
doc: Document io packages a bit
2021-11-21 21:55:53 +01:00
Mattias Wadman
7c4b0b3844
bitio: Simplify by embedding reader
2021-11-21 21:55:09 +01:00
Mattias Wadman
aab32cf2db
gojqextra,interp: Add lazy string to speed usage of decode value buffer where string is not used
2021-11-21 21:27:44 +01:00
Mattias Wadman
f40320b04c
decode: Remove D.Scalar* and add d.(Try)FieldScala*Fn instead
...
Idea is scalar fn should not read
2021-11-21 13:08:18 +01:00
Mattias Wadman
0480a2f722
decode: Some format decode and sub buffer work
2021-11-20 18:56:59 +01:00
Mattias Wadman
278e909a2f
mp4: Add tapt, prof, enof and clap boxes
2021-11-19 15:29:49 +01:00