Skip to content

Instantly share code, notes, and snippets.

@Haseeb-Qureshi
Last active April 5, 2017 17:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Haseeb-Qureshi/a6f3a62bb3ae96442d6fe13288e3739b to your computer and use it in GitHub Desktop.
Save Haseeb-Qureshi/a6f3a62bb3ae96442d6fe13288e3739b to your computer and use it in GitHub Desktop.
def build!(forward:)
puts "Current password: #{@password}"
ALPHABET.each do |char|
guess = forward ? @password + char : char + @password
if @api.include?(guess)
@password = guess
build!(forward: forward)
return
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment