Commit Graph

117 Commits

Author SHA1 Message Date
Will Greenberg
51fc9eba56 wavehunter: implement HTTP server
The server streams a pcap file to the user in small chunks, so
the memory overhead is extremely small.
2024-01-03 11:29:58 -08:00
Will Greenberg
2a27f04cc1 wavehunter_reader: update to new interfaces 2024-01-03 11:29:58 -08:00
Will Greenberg
f3afda3ce4 pcap: refactor to take Write, rename struct 2024-01-03 11:29:58 -08:00
Will Greenberg
ed1848def6 minor whitespace fixes 2024-01-03 11:29:58 -08:00
Will Greenberg
38f8a78b60 Refactor QMDL and DiagReader for better testing
For the QMDL code, this mostly rewrites the structs to accept generic
types that implement Read and Write, which allows for better unit
testing. Also adds a bunch of unit tests.
2024-01-03 11:29:58 -08:00
Will Greenberg
ef42dfe99f diag_reader: raise parsing/hdlc error handling to caller
This'll let us unit test the reader more easily
2024-01-03 11:29:58 -08:00
Will Greenberg
0f2e4676e5 Refactor error types and add config file parsing
1. Main binary now parses a config toml and uses its paths for the
   output pcap and qmdl files
2. Previously we were relying on DiagDeviceError for several things
   that aren't a diag device. This modularizes that error in a way
   that both improves the error descriptions, and also allows for
   better separation of concerns.
2024-01-03 11:29:58 -08:00
Will Greenberg
59c0a9d944 Use QMDL instead of our custom debug file format
This might be a bit premature, but since we don't seem to be
experiencing any more parsing errors when reading MessagesContainers,
let's switch to outputting a standard QMDL (Qualcomm Mobile
Diagnostic Log) file. This file format is more widely used by tools
like scat, and the only data we lose out on is the container metadata
and non-UserData messages (which we weren't using anyway).
2024-01-03 11:29:58 -08:00
Cooper Quintin
f5a366960f Merge pull request #16 from EFForg/tests
Tests
2024-01-03 09:21:28 -08:00
Will Greenberg
06efa2c114 diag_device: minor fixup 2024-01-02 16:14:10 -08:00
Will Greenberg
20c6e9bf09 diag: slightly improve logs 2023-12-22 12:13:57 -08:00
Will Greenberg
73ed01de62 gstmtap_parser: Add support for NAS messages 2023-12-22 12:13:57 -08:00
Will Greenberg
9fa8284343 Add integration tests for LTE RRC parsing 2023-12-22 12:13:57 -08:00
Will Greenberg
5128f468cf diag_reader: move error handling outside of trait 2023-12-22 12:13:57 -08:00
Will Greenberg
eed983daae diag_device: rm 0 byte read warning 2023-12-22 12:13:51 -08:00
Cooper Quintin
b0855e2af5 Merge pull request #13 from EFForg/scripts
adding init.d scripts and updating makefile
2023-12-16 10:40:32 -08:00
Cooper Quintin
0f6020cc2d updating files to push to /data/wavehunter directory 2023-12-15 16:40:02 -08:00
Cooper Quintin
43a40e02c9 Merge branch 'main' into scripts 2023-12-15 14:38:39 -08:00
Cooper Quintin
746c41ad77 better logging and pid handling 2023-12-15 14:38:32 -08:00
Cooper Quintin
17782b3fa2 Merge pull request #10 from EFForg/gsmtap
Gsmtap
2023-12-15 14:34:24 -08:00
Cooper Quintin
b91f4af0a7 Merge branch 'main' into gsmtap 2023-12-15 14:34:03 -08:00
Cooper Quintin
6b2de86ddf Merge pull request #12 from EFForg/handle-empty-reads
diag_device: handle 0 byte reads
2023-12-15 14:14:23 -08:00
Will Greenberg
85d8526829 diag_device: handle 0 byte reads 2023-12-15 13:21:40 -08:00
Cooper Quintin
9500882ce2 adding init.d scripts and updating makefile 2023-12-14 17:19:13 -08:00
Will Greenberg
d1bb29f6c2 some minor cleanups, comments 2023-12-14 12:29:06 -08:00
Will Greenberg
f99d0897eb wavehunter and wavehunter-reader now output pcap files 2023-12-14 11:48:30 -08:00
Will Greenberg
fd5d01ad1f Switch to using log crate macros 2023-12-14 11:48:30 -08:00
Will Greenberg
d6266db1b9 Add GSMTAP parsing and PcapNg file writing 2023-12-14 11:48:30 -08:00
Cooper Quintin
20a31a05bd Merge pull request #9 from EFForg/failsafe
Debug logging, rename to Wave Hunter
2023-12-14 11:31:41 -08:00
Will Greenberg
557de415d7 More reorganization, renamed to Wave Hunter 2023-12-13 16:51:55 -08:00
Will Greenberg
69d40a766a some renaming, reorganization 2023-12-13 16:51:55 -08:00
Will Greenberg
0187fa51e8 rename failsafe mode to debug mode 2023-12-13 16:51:55 -08:00
Will Greenberg
6cc22c3863 exit failsafe_reader if incorrect args are supplied 2023-12-13 16:51:55 -08:00
Will Greenberg
2504a1da2e add failsafe writer and reader 2023-12-13 16:51:55 -08:00
Cooper Quintin
297fc83e3f Merge pull request #7 from EFForg/fix-1
Drive log reading locally
2023-12-13 16:09:32 -08:00
Will Greenberg
dffa76792e yet more read loop fixes 2023-12-12 15:03:12 -08:00
Will Greenberg
2e4d54928d maybe fix read loop? 2023-12-12 13:59:03 -08:00
Will Greenberg
e3e50b95e5 simplify packet reading a bit 2023-12-08 17:51:13 -08:00
Will Greenberg
978901b233 fix packet reading and leftover bytes checks 2023-12-08 16:38:23 -08:00
Will Greenberg
10bafc3faa fix hdlc ops 2023-12-07 18:49:39 -08:00
Will Greenberg
76555fe68c make hdlc operations work on slices 2023-12-07 17:20:22 -08:00
Will Greenberg
470a263593 better log parsing 2023-12-07 16:29:17 -08:00
Will Greenberg
9617ec3023 add logging crates 2023-12-07 16:29:05 -08:00
Will Greenberg
196eeba520 Parse log bodies 2023-12-06 15:19:52 -08:00
Will Greenberg
bdb12aba9e fixed log config stage, now getting actual logs 2023-12-05 18:41:35 -08:00
Will Greenberg
9dda8eb952 wip 2023-12-05 18:26:17 -08:00
Will Greenberg
be058507f1 wip 2023-12-05 18:11:17 -08:00
Will Greenberg
ccd9dfa2a7 appease clippy 2023-12-04 16:54:46 -08:00
Will Greenberg
e6fab5c27d log parsing 2023-12-04 16:47:42 -08:00
Will Greenberg
db18abae6f Mostly working now, except for log parsing and random checksum failures 2023-12-04 15:38:01 -08:00