Perl utility to read binary usblog files?

ChadF
2010-02-14
2013-04-23
  • ChadF

    ChadF - 2010-02-14

    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.

     
  • Tom

    Tom - 2010-06-01

    Here is one vote for the translator.  I could certainly use it!

    tnx,
    Tom

     
  • ChadF

    ChadF - 2010-06-06

    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.

     
  • Pravin Pillai

    Pravin Pillai - 2011-05-26

    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.

    • Regards,
      pravinpillai
     
  • ChadF

    ChadF - 2011-05-27

    This isn't really perl specific, just normal command line.. Use I/O redirects:

    perl usblog-decode.pl  <  X.usblog  >  Y.txt

     
  • Pravin Pillai

    Pravin Pillai - 2011-05-27

    Aargh, I really should have thought of that myself. Thanks!

    • Pravin
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks