Skip to content

Instantly share code, notes, and snippets.

@iconnor
Created November 4, 2019 20:57
Show Gist options
  • Save iconnor/e1e8d43a724dc3ccbefe7745f4168c61 to your computer and use it in GitHub Desktop.
Save iconnor/e1e8d43a724dc3ccbefe7745f4168c61 to your computer and use it in GitHub Desktop.
Use faker to fill a phishing site with random emails and passwords
require 'faker'
require 'net/http'
phishing_site = 'creeeeooooob.azurewebsites.net'
100.times.map {
source = Net::HTTP.get(phishing_site, '/')
domain = /url\=https\:\/\/([a-z]+)\.com\//.match(source)[1]
100.times.map {
email = CGI.escape(Faker::Internet.email)
password = (0...8).map { (65 + rand(26)).chr }.join
puts "Email #{email} #{password}"
`curl 'https://#{domain}.com/srt.php' -H 'Connection: keep-alive' -H 'Cache-Control: max-age=0' -H 'Origin: https://nrameeeeo.com' -H 'Upgrade-Insecure-Requests: 1' -H 'DNT: 1' -H 'Content-Type: application/x-www-form-urlencoded' -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36' -H 'Sec-Fetch-Mode: navigate' -H 'Sec-Fetch-User: ?1' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3' -H 'Sec-Fetch-Site: same-origin' -H 'Referer: https://nrameeeeo.com/othsll.php' -H 'Accept-Encoding: gzip, deflate, br' -H 'Accept-Language: en-US,en;q=0.9,en-AU;q=0.8' --data 'UserName=#{email}&Password=#{password}&AuthMethod=FormsAuthentication' --compressed`
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment