A few years ago I wrote a collection of perl modules to decode and extract data from the binary usblog files (since the XML export format tended to be lacking and manipulating the captured data on the unix side seems much easier). Would such a utility be useful enough to anyone to make it worth my time to clean it up and package it in a form to include with this project? There doesn't seem to have been much development activity for this project lately, so I didn't know if it was still even maintained.
Here is one vote for the translator. I could certainly use it!
Here is the first alpha release.. I cleaned it up a little first and added some internal method docs (not pod, more javadoc like). It's written for SnoopyPro v0.22 files, so other versions may not be readable. I don't know the minimum perl version is, but 5.8+ is suggested.
The tar can be downloaded from: http://www.triularity.org/download/perl/snoopypro-usblog-0.1.tar.gz
The sample scripts are usblog-dump.pl and usblog-decode.pl (the later does some USB protocol normalization first). They read the usblog file from stdin and write to stdout. Or you can write your own to use the module objects programatically for custom extraction. Most of the classes are mapped from the C++ versions (using perl style and with some limitations).
If someone wants to add the tar file directly to the usbsnoop sourceforge files page, then that's fine.
I'm completely new to perl scripts so if you could tell me how to pass in STDIN and STDOUT to feed my binary usblog file in and get a parsed and decoded text(?) file, that would be awesome. I've tried feeding in the file names by doing
>perl usblog-decode.pl X.usblog Y.txt
but that does not seeme to work.
This isn't really perl specific, just normal command line.. Use I/O redirects:
perl usblog-decode.pl < X.usblog > Y.txt
Aargh, I really should have thought of that myself. Thanks!
A minor update. Now it has a standard perl module build (i.e. Makefile.PL):
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.