Created
November 26, 2014 02:59
-
-
Save cxdy/094f4674cff9b5e46d46 to your computer and use it in GitHub Desktop.
Easy SQLi Finder
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, 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