Menu

Thursday 3 August 2017

Decrypt Stash File / Use this steps when you forget your stash file (.sth ) password .




Step 1 : Create a new .pl ( perl script ) file with name stash_decrypt.pl   [in my case ].


 command  >>        touch stash_decrypt.pl

Screenshot : 1




Step 2 : copy below code and save in stash_decrypt.pl  [in my case ].


 command  >>       vi stash_decrypt.pl

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

#!/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 "\n";

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

Screenshot 2:





Step 3 : to give access permission  to  stash_decrypt .pl file


command  >>          chmod 755 stash_decrypt.pl

Screenshot 3 :




Step 4 : Now run  stash_decrypt.pl  with .sth (stash file) file .

command  >>   ./stash_decrypt.pl  testkey.sth


Screenshot 4 :




Output : 123456 [my stash file password ].








No comments:

Post a Comment