Tuesday, September 18, 2012

Recover password from .sth file

Create perl file (unstash.pl) and run the script.

#!/usr/bin/perl

#usage perl unstash.pl

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;
}


----------------------------------------------------------------------------------------------

Note : Content is taken from : http://websphere-world.blogspot.sg/2011/07/decrypt-ibm-stash-files.html