Skip to content

Instantly share code, notes, and snippets.

@HelixSpiral
Created February 7, 2013 22:00
Show Gist options
  • Save HelixSpiral/4734638 to your computer and use it in GitHub Desktop.
Save HelixSpiral/4734638 to your computer and use it in GitHub Desktop.
This solves the HackThisSite 'basic' mission number 6.
# Enter the encoded password from HackThisSite
encoded_password = "a9;96j6i"
# empty string for the decoded password
password = ""
# Loop for the length of the encoded password
0.upto(encoded_password.length-1) do |x|
password += ((encoded_password[x].ord)-x).chr
end
# Print the decoded password
puts "Original: #{encoded_password}"
puts "Decoded: #{password}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment