Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Xor decode from pcap file

by AnomalousMonk (Canon)
on Jun 18, 2011 at 18:34 UTC ( #910348=note: print w/replies, xml ) Need Help??


in reply to Xor decode from pcap file

Maybe something like this:

>perl -wMstrict -le "my $binary = pack 'H*', '03762cefa7ffe5'; printf '%02x ', $_ for unpack 'C*', $binary; print ''; ;; my ($p, $q) = unpack 'xCC', $binary; my $pairs = (length($binary) - 3) / 2; my $k = pack 'C*', 0, 0, 0, ($p, $q) x $pairs; printf '%02x ', $_ for unpack 'C*', $k; print ''; ;; my $decode = $binary ^ $k; printf '%02x ', $_ for unpack 'C*', $decode; " 03 76 2c ef a7 ff e5 00 00 00 76 2c 76 2c 03 76 2c 99 8b 89 c9

Replies are listed 'Best First'.
Re^2: Xor decode from pcap file
by mabossert (Scribe) on Jun 18, 2011 at 18:55 UTC
    Sweet! That seems to have done the trick...Thank you so much. I have a huge headache from banging my head on the wall trying to figure out how to accomplish this. Now all I have to do is figure out what the heck the decoded data means...Thanks again!!!!
      Would you mind posting the completed code?
        my apologies...I didn't notice the request to post the completed code. Unfortunately, I moved to a new job and no longer have access to the code...sorry.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://910348]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2016-12-11 11:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (169 votes). Check out past polls.