SqliChecker is simple python script which can perform link checking
for SQLi. Script reads target file and check every link in file for
vulnerability … Usage is simple:
python sqliChecker.py FILE_NAME
For now there is no threading support, but i working on it! Enjoy 
012 | import os, sys, subprocess, socket, urllib2, re, time |
017 | from sets import Set as set |
025 | print "\n|---------------------------------------------------------------|" |
026 | print "| b4ltazar[@]gmail[dot]com |" |
027 | print "| 05/2012 sqliChecker.py v.0.1 |" |
028 | print "| b4ltazar.wordpress.com & ljuska.org |" |
030 | print "|---------------------------------------------------------------|\n" |
033 | if sys.platform == 'linux' or sys.platform == 'linux2': |
034 | subprocess.call("clear", shell=True) |
037 | subprocess.call("cls", shell=True) |
041 | socket.setdefaulttimeout(timeout) |
043 | logfile = open(log, "a") |
047 | sqlerrors = {'MySQL': 'error in your SQL syntax', |
048 | 'MiscError': 'mysql_fetch', |
049 | 'MiscError2': 'num_rows', |
050 | 'Oracle': 'ORA-01756', |
051 | 'JDBC_CFM': 'Error Executing Database Query', |
052 | 'JDBC_CFM2': 'SQLServer JDBC Driver', |
053 | 'MSSQL_OLEdb': 'Microsoft OLE DB Provider for SQL Server', |
054 | 'MSSQL_Uqm': 'Unclosed quotation mark', |
055 | 'MS-Access_ODBC': 'ODBC Microsoft Access Driver', |
056 | 'MS-Access_JETdb': 'Microsoft JET Database', |
057 | 'Error Occurred While Processing Request' : 'Error Occurred While Processing Request', |
058 | 'Server Error' : 'Server Error', |
059 | 'Microsoft OLE DB Provider for ODBC Drivers error' : 'Microsoft OLE DB Provider for ODBC Drivers error', |
060 | 'Invalid Querystring' : 'Invalid Querystring', |
061 | 'OLE DB Provider for ODBC' : 'OLE DB Provider for ODBC', |
062 | 'VBScript Runtime' : 'VBScript Runtime', |
063 | 'ADODB.Field' : 'ADODB.Field', |
064 | 'BOF or EOF' : 'BOF or EOF', |
065 | 'ADODB.Command' : 'ADODB.Command', |
066 | 'JET Database' : 'JET Database', |
067 | 'mysql_fetch_array()' : 'mysql_fetch_array()', |
068 | 'Syntax error' : 'Syntax error', |
069 | 'mysql_numrows()' : 'mysql_numrows()', |
070 | 'GetArray()' : 'GetArray()', |
071 | 'FetchRow()' : 'FetchRow()', |
072 | 'Input string was not in a correct format' : 'Input string was not in a correct format'} |
076 | if len(sys.argv) != 2: |
077 | print "[+] Usage: python sqliChecker.py <FILE>" |
078 | print "[+] Please visit ljuska.org & b4ltazar.wordpress.com" |
079 | print "[!] Exiting, thanks for using script" |
082 | checklist = sys.argv[1] |
086 | check = open(checklist, "r") |
087 | checkline = check.readlines() |
088 | print "[!] You have",len(checkline),"links to check\n" |
090 | print "[-] Error, check your path or file name!" |
091 | print "[+] Please visit ljuska.org & b4ltazar.wordpress.com" |
092 | print "[!] Exiting, thanks for using script" |
096 | url = url.replace("\n", "") |
097 | url = url.rsplit('=', 1)[0]+"=" |
106 | source = urllib2.urlopen(url).read() |
107 | for type,eMSG in sqlerrors.items(): |
108 | if re.search(eMSG, source): |
109 | print num,"/",len(urls), "w00t!,w00t!:", url, "Error:", type, " ---> SQL Injection Found" |
120 | if __name__ == "__main__": |
122 | print "\n[!] There is %s vulnerable sites to SQL Injection" % len(vuln) |
123 | vulnerable = list(set(vuln)) |
124 | print "[+] Without duplicates we have %s vulnerable sites to SQL Injection" % len(vulnerable) |
126 | logfile.write("\n"+v) |
129 | print "\n[+] Time used for checking :", int(((endtimer-starttimer) / 60)), "minutes" |
130 | print "[+] Average time per link is :", int(((endtimer-starttimer) / float(len(checkline)))), "seconds" |
131 | print "[+] Please visit ljuska.org & b4ltazar.wordpress.com" | |
Sourche |
Terimakasih telah membaca artikel
SqliChecker,semoga bermanfaat!
Artikel yang terkait dengan postingan ini:
Posting Komentar