Changes

Jump to navigation Jump to search
76 bytes added ,  18:20, 11 December 2014
m
no edit summary
Line 32: Line 32:  
::::
 
::::
 
{
 
{
#!/usr/bin/perl
+
    #!/usr/bin/perl
use strict;
+
    use strict;
use MIME::Base64 qw( decode_base64 );
+
    use MIME::Base64 qw( decode_base64 );
open INFILE,$ARGV[0] or die;
+
    open INFILE,$ARGV[0] or die;
my @res;
+
    my @res;
while (<INFILE>) {
+
    while (<INFILE>) {
    if ($_ =~ /.*,\d,\d$/) {
+
        if ($_ =~ /.*,\d,\d$/) {
        @res = split(',',$_);
+
            @res = split(',',$_);
        $res[3] =~ s/\./+/gs;
+
            $res[3] =~ s/\./+/gs;
        $res[3] =~ s/-/\//gs;
+
            $res[3] =~ s/-/\//gs;
        $res[3] =~ s/\*/=/gs;
+
            $res[3] =~ s/\*/=/gs;
        $res[3] = decode_base64($res[3]);
+
            $res[3] = decode_base64($res[3]);
        $res[3] =~ s/(.)/sprintf("%02X",ord($1))/egs;
+
            $res[3] =~ s/(.)/sprintf("%02X",ord($1))/egs;
        printf "%s,%s,%s,%s", decode_base64(shift(@res)),decode_base64(shift(@res)),decode_base64(shift(@res)),join(',',@res);
+
            printf "%s,%s,%s,%s", decode_base64(shift(@res)),decode_base64(shift(@res)),decode_base64(shift(@res)),join(',',@res);
    }else{
+
        }else{
        print $_
+
            print $_
 +
        }
 
     }
 
     }
}
+
    close INFILE;
close INFILE;
   
}
 
}
 
Will open file specified as a parameter and print the result with base64 decoded strings and key date inf hex string format. --[[User:Duke srg|Duke srg]] 18:18, 11 December 2014 (CET)
 
Will open file specified as a parameter and print the result with base64 decoded strings and key date inf hex string format. --[[User:Duke srg|Duke srg]] 18:18, 11 December 2014 (CET)
78

edits

Navigation menu