in reply to Re: un obfuscate logfiles with xor
in thread un obfuscate logfiles with xor

Here is an example ÃÎÌËÁßÍÏÎÌÐÏÊÐÎÌßÏËÒÏÇÒÊÆßÓœž“ÏÑ–‘™ÁߑЯÌÇÌÑ‘ŠŒ–šÑœ’ß™ Thank you

Replies are listed 'Best First'.
Re^3: un obfuscate logfiles with xor
by Eily (Monsignor) on Jun 25, 2013 at 22:27 UTC

    use strict; use warnings; my $s = q<ÃÎÌËÁßÍÏÎÌÐÏÊÐÎÌßÏËÒÏÇÒÊÆßÓœž“ÏÑ–‘™ÁߑЯÌÇÌÑ‘ŠŒ–šÑœ’ß +™>; print pack "C*", map { $_ ^ 255 } unpack "C*", $s;
    <134> 2013/05/13 04-08-59 <local0.info> nu9383.nuspire.com pf

    This only works if I run the code in an ASCII encoded file, there doesn't seem to be utf-8 involded here.

    unpack "C*", $s; returns a list consisting of the value of each byte in $s. pack with "C*" takes a list of bytes and turns it into a string. Read perlpacktut for more information on that.

Re^3: un obfuscate logfiles with xor
by Loops (Curate) on Jun 25, 2013 at 22:15 UTC

    Is that an example of raw input, or the output from the current iteration of your script? It would be helpful to know we have a clean fragment of raw logfile data