Skip to content

Instantly share code, notes, and snippets.

@cxdy
Created November 26, 2014 02:59
Show Gist options
  • Save cxdy/094f4674cff9b5e46d46 to your computer and use it in GitHub Desktop.
Save cxdy/094f4674cff9b5e46d46 to your computer and use it in GitHub Desktop.
Easy SQLi Finder
import requests, sys
# This program shows the simplicity
# of requests, Best library ever.
sqlcheck = ["SQL error:", "Warning:", "supplied argument", "PHP Warning:"]
if len(sys.argv) == 1:
print "usage: sqli.py http://hostname.com/"
exit(0)
else:
url = sys.argv[1]
r = requests.get(url + "'")
if r.status_code == 200 or 302:
print "connected to %s" % url
for i in range(len(sqlcheck)):
if sqlcheck[i] in r.text:
print "sqli found! warnings/errors:", sqlcheck[i]
else:
print "sqli cannot be found using error/warning:", sqlcheck[i]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment