Stash file (.sth) file often used by WebSphere plugin and there might be situation where you have lost the password. Don’t worry, it happens!

The easiest way to decrypt the .sth file with below perl code.

  • Create a file decrypt-stash.pl and save below code
#!/usr/bin/perl
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;
}
printf " ";
  • Execute ./decrypt-stash.pl filename.sth

This will decrypt the stash file.

You may watch this demonstration in below video.

Reader Interactions

Comments

Your email address will not be published. Required fields are marked *