rendered paste body#!/usr/bin/perl -lw
print "Paste the following into your cable modem's 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 "cd /non-vol/bpi";
print "change_key ca_cert";
print length($cert);
for (my $x = 0; $x < length($cert); $x++) {
print ord(substr($cert, $x, 1));
}
print "y";
print "perm";
print "write";
$cert = read_file("cm-cert.der");
print "change_key cm_cert";
print length($cert);
for (my $x = 0; $x < length($cert); $x++) {
print ord(substr($cert, $x, 1));
}
print "y";
print "write";