Last active
August 29, 2015 13:58
-
-
Save amar-sanakal/9997070 to your computer and use it in GitHub Desktop.
ruby version of the script to 'decode ibm stash file's - http://goo.gl/6wbXzI
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env ruby | |
abort("usage: #{$0} stash_file\nuse to descrypt IBM HTTP server stash files") if (ARGV.length < 1) | |
password = '' | |
File.open(ARGV[0], 'r') do |fh| | |
password = fh.read(1024) | |
end | |
decoded = password.unpack("C*").map {|c| c^0xf5} | |
puts decoded[0, decoded.index(0)].collect {|i| i.chr}.join |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment