If you are working on Websphere set of products for a while then I am sure you have been in situations where you don’t remember the password of your ssl key database file. In such a situation this perl script will help you and I am sure you will thank me but mind you this code is not mine but this is one piece of code I keep handy all the time:
——————————————————–
#!/usr/bin/perl
——————————————————–
#!/usr/bin/perl
#usage perl unstash.pl <Stash file name ex stash.sth>
use strict;
die "Usage: $0 <stash file>\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;
}
-----------------------------------------
Stash logic is same for IBM http server, Websphere application server or websphere mq. I have tested this for both gs6cmd and gsk7cmd.
Recent Comments