in reply to Re^2: Snort data_payload decoding
in thread Snort data_payload decoding
Nit: {2,2} is the same as {2}
unpack can do your hexifying quite nicely, so you end up with:
while (...) { my $raw_length = length($rows[0]); # Formerly named $ea my $encoded = unpack('H*', $rows[0]); ...do something with these vars... }
You could also use MIME::Base64, which results in a smaller output.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Snort data_payload decoding
by amt (Monk) on Oct 14, 2004 at 16:23 UTC | |
by ikegami (Patriarch) on Oct 14, 2004 at 16:32 UTC | |
by hsinclai (Deacon) on Oct 14, 2004 at 16:49 UTC |