1
1
mirror of https://github.com/wader/fq.git synced 2024-11-23 18:56:52 +03:00
Commit Graph

300 Commits

Author SHA1 Message Date
Mattias Wadman
76307e4d33 fit: Formatted date/time description for timestamp fields 2024-02-11 00:43:00 +01:00
Mattias Wadman
55470deb99 doc: Update docs to include fit format
Also new version of ansisvg
2024-02-10 01:36:05 +01:00
Mattias Wadman
217660005e interp: Support ~/.config/fq as fallback on macOS
Got fed up with ~/Library/Application Support/fq
2024-02-09 16:10:38 +01:00
Mattias Wadman
e5fd1eb427 doc: Generate svgs with new ansisvg 2024-01-08 13:27:54 +01:00
Mattias Wadman
41226f48d8 readline: Switch to ergochat/readline
All fq changes merged.
2023-12-24 20:35:15 +01:00
Mattias Wadman
b05c7ec54f
Merge pull request #824 from mikez/leveldb
leveldb: Add LevelDB support
2023-12-09 16:47:43 +01:00
Michael B.
2f5f183106 leveldb: decode unfragmented .log files further; fix UTF8 decoding
decode unfragmented .log files:

 - break leveldb_log.go into leveldb_log_blocks.go and leveldb_log.go;
   the former is used by both .MANIFEST (descriptor) and .LOG.
 - in leveldb_log, introduce readBatch that decodes further

 fix UTF8 decoding:

 - introduce fieldUTF8ReturnBytes and stringify to handle multi-byte
   UTF8-encodings correctly.
2023-12-09 14:13:33 +01:00
Mattias Wadman
c47756dcd2 doc: Update svgs after ansisvg update
Now generates svg:s with better select support
2023-12-08 10:39:12 +01:00
Michael B.
3a396e156e leveldb: improve log documentation 2023-12-07 14:36:47 +01:00
Michael B.
cc0d5a8b9b leveldb: update docs 2023-12-07 13:02:55 +01:00
Mattias Wadman
7906f33d51 test: Support to more common -update flag 2023-12-06 11:47:38 +01:00
Michael B.
b05aa997ab leveldb: address PR comments 2023-12-05 11:31:30 +01:00
Mattias Wadman
5abf151f9b doc: Remove spurious backtick 2023-11-10 14:35:22 +01:00
Mattias Wadman
9e58067f4b webp: Refactor to use riff code and decode VP8X, EXIF, ICCP and XMP chunks 2023-11-01 18:58:09 +01:00
Mattias Wadman
a83cac6021 zip: Fix incorrect time/date, add extended timestamp and refactor
MSDOS time/date was read in wrong order and also did not take into account
that the bit ranges in the shortis are in little-endian.

Remodel modification_time/date to be one struct with fat_time, fat_date LE shorts
and then synthetic values for day, hours, minute etc and also a unix field with the
timestamp as unix time.

Also refactor and clenaup extra fields/extended code a bit.

Fixes #792
2023-10-23 11:11:27 +02:00
Mattias Wadman
d703321a7a avi: Add extended chunks support and option
This is used for >1gb files. Disable decode will speed up
deocde a lot but will probably also produce some gaps as same
part of the movi chunks will not be reference by the indx index.
2023-10-20 15:55:19 +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
fiatjaf
976a7564c7
opentimestamps: one last make doc. 2023-09-26 15:42:02 -03:00
fiatjaf
5e7c01a013
opentimestamps: address comments and improve things. 2023-09-26 12:35:18 -03:00
Mattias Wadman
406f3926e9 doc: Move up and update differences jq section a bit 2023-08-22 13:20:50 +02:00
Mattias Wadman
f15f9bc1a4 doc,moc3,caff: Add author and regenerate docs 2023-08-21 10:04:37 +02:00
Ronsor
cc58c4b81d caff: update doc/formats.md 2023-08-18 11:04:57 -07:00
Mattias Wadman
d5345f0b8a cli: Rename --null/nul-output to --raw-output0
Remove -0 short arg, now it means the expression "-0".
This is to be in sync with jq 1.7 https://github.com/jqlang/jq/pull/2684

Correct and clarify that NUL and new lines are outputted after and not between each output.

Still missing is to abort on output containing zero when using --raw-output0
2023-08-08 16:33:39 +02:00
Mattias Wadman
44f0060205 dev,jq: Reformat jq code to look more the same 2023-07-27 13:21:04 +02:00
Mattias Wadman
23b9eeab1f luajit: make doc 2023-06-22 23:54:49 +02:00
Mattias Wadman
93423d0da6
Merge pull request #673 from wader/bit-format-hex
interp: Add hex bits format
2023-05-15 17:49:15 +02:00
Mattias Wadman
8a468f45df interp: Add hex bits format
$ cat random.bin.gz | fq -rV -o bits_format=hex .uncompressed
f6f2074cf77d449d

Also made unknown bit formats an error.
2023-05-15 17:31:38 +02:00
Kian-Meng Ang
dd4fa26867 doc: fix typos
Found via `codespell -S format -L bu,ue,trys,nd,tbe,te,trun,actuall`
2023-05-14 21:45:15 +08:00
Mattias Wadman
e2eb667091 html: Add to probe group
As decoder now can know they are decoding as part of probing we can now
use some heuristics to see if we should decode as html.
The reason heuristics is needed is that x/html parser will alwaus succeed.

Add lazyre package to help delay compile of RE and make it concurrency safe.
2023-05-11 19:07:18 +02:00
Mattias Wadman
88be3a7f9f doc: Hopefully fix svg fixed font issue
Regenerate with new ansisvg that uses Courier with monospace as fallback

Related to #655
2023-05-08 15:27:00 +02:00
Pavel Safonov
e6a9cdbecf postgres: doc 2023-05-06 08:54:56 +03:00
Pavel Safonov
7a89234b13 postgres: update doc 2023-05-04 08:34:32 +03:00
Mattias Wadman
ddd7b0e439
Merge pull request #650 from matthewdale/fix-bson
bson: support all non-deprecated types and fix int/uint bugs
2023-05-02 09:33:25 +02:00
Matt Dale
40630d39b2
bson: fix doc formatting and add author info 2023-05-01 18:41:52 -07:00
Mattias Wadman
af68511acf dev,doc Clarify some dev docs and rename launch.json to be a template 2023-05-01 17:39:43 +02:00
Matt Dale
2017ff8766
bson: support all non-deprecated types and fix int/uint bugs 2023-04-30 10:28:42 -07:00
Mattias Wadman
c51271399c interp: Add skip_gaps option for tovalue/-V
Skips gap fields in struct and arrays.

Gaps fields are bit ranges that a decoder did not add any fields for.
Note that skipping gaps in arrays will affect indexes.
2023-04-30 13:04:39 +02:00
Mattias Wadman
97c952b3f1 doc: Add some more examples 2023-04-14 10:19:33 +02:00
Mattias Wadman
427ce78df6 interp: Add --value-output/-V option to do tovalue before output
Idea is to skip display so that JSON is outputted instead of showing tree and hexdump etc.
2023-04-13 11:29:16 +02:00
Mattias Wadman
dc4a82eeed aiff: Add basic decoder 2023-03-09 15:16:52 +01:00
רטו/רעטאָ/רֵיטוֹ • Reto
87e5bb142d
fix typo 2023-03-09 07:01:52 +01:00
Mattias Wadman
cc52a4419d id3v2: Decode subframes for CTOC and add struct for headers 2023-03-05 19:29:22 +01:00
Mattias Wadman
9852f56b74 tls: Add TLS 1.0, 1.1, 1.2 decode and decryption
What it can do:
- Decodes records and most standard messages and extensions.
- Decryptes records and reassemples application data stream if a keylog is provided
  and the cipher suite is supported.
- Supports most recommended and used ciphers and a bunch of older ones.

What it can't do:
- SSL v3 maybe supported, is similar to TLS 1.0, not tested.
- Decryption and renegotiation/cipher change.
- Record defragmentation not supported, seems rare over TCP.
- TLS 1.3
- SSL v2 but v2 compat header is supported.
- Some key exchange messages not decoded yet

Decryption code is heavly based on golang crypto/tls and zmap/zcrypto.

Will be base for decoding http2 and other TLS based on protocols.

Fixes #587
2023-03-05 13:52:12 +01:00
Mattias Wadman
3e0ebafa6d doc: Run make doc 2023-02-26 21:41:46 +01:00
Mattias Wadman
73db6587a0 interp: Exit with error if -o name=@path fails to be read, also document 2023-02-26 21:18:36 +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
b60aceca9e matroska: Add decode_samples option
Also change the option help a bit, maybe medid and support is confusing, we
might evetually decode non-audio/video things.
2023-02-08 11:31:41 +01:00
Mattias Wadman
2d82c05f64 mp3: Add max_unknown option to fail decode if too much unknown bits
Hopefully help fix even more miss-detections
2023-01-25 15:27:31 +01:00
Mattias Wadman
ca27e4266e doc: Add _parent for decode values and clenaup doc a bit 2023-01-03 11:21:09 +01:00
Mattias Wadman
e3ae1440c9 interp: Rename to/from<format> functions to to_/from_<format>
Feels less cluttered, easier to read and more consistent.

Still keep tovalue, tobytes etc that are more basic functions this
only renamed format related functions.
Also there is an exceptin for to/fromjson as it comes from jq.

Also fixes lots of spelling errors while reading thru.
2022-12-21 17:48:39 +01:00