Skip to content

Instantly share code, notes, and snippets.

@amar-sanakal
Last active August 29, 2015 13:58
Show Gist options
  • Save amar-sanakal/9997070 to your computer and use it in GitHub Desktop.
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
#!/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