Thursday, November 27, 2014

How to Recover a Lost IKeyman Key Password

Use the following perl script to recover a lost ikeyman key db password for IBM HTTP Server or Websphere:

server1:/opt/IBM/HTTPServer/SSL # cat
#!/usr/bin/perl -w
#for help mail to
use strict;
die "Usage: $0 \n" if $#ARGV != 0;
my $file=$ARGV[0];
open(F,$file) || die "Can't open $file: $!";
my $stash;
read F,$stash,1024;
my @unstash=map { $_^0xf5 } unpack("C*",$stash);
foreach my $c (@unstash) {
    last if $c eq 0;
    printf "%c",$c;
printf "\n";

server1:/opt/IBM/HTTPServer/SSL # ./ key.sth

No comments: