Created
February 7, 2013 22:00
-
-
Save HelixSpiral/4734638 to your computer and use it in GitHub Desktop.
This solves the HackThisSite 'basic' mission number 6.
This file contains hidden or 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
# 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