Stash file (.sth) file often used by WebSphere plugin and there might be a 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 and save below code
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 ./ filename.sth

This will decrypt the stash file.

You may watch this demonstration in below video.

YouTube video

Interested in learning about IBM Cloud? Check out this online course.