All pastes #921671 Raw Edit

Anonymous

public text v1 · immutable
#921671 ·published 2008-02-28 06:01 UTC
rendered paste body
#!/usr/bin/perl -lw

print "Paste the following into your telnet console\n";



sub read_file($) {

        my ($b, $d, $f);

        open $f, $_[0];

        $b .= $d while (sysread($f, $d, 1024));

        close $f;

        return $b;

}


my $cert = read_file("ca-cert.der");

print length($cert);

for (my $x = 0; $x < length($cert); $x++) {

        print ord(substr($cert, $x, 1));

}


$cert = read_file("cm-cert.der");

print length($cert);

for (my $x = 0; $x < length($cert); $x++) {

        print ord(substr($cert, $x, 1));

}