def fuzzData(data, index):
global connection
for x in funnydata:
try:
if type(x) is int:
print "Data is number",x
else:
print "Data is " + str(x)[0:30] + " of length " + str(len(str(x)))
varList = []
for var in range(index):
varList.append(x)
cur = connection.cursor()
cur.execute(data, varList)
except:
error = str(sys.exc_info()[1])
if error.upper().find("ORA-00933") > -1 or error.upper().find("ORA-01756:") > -1 or error.upper().find("ORA-00923:") > -1:
print "*** POSSIBLE SQL INJECTION FOUND ***"
elif error.upper().find("ORA-03113") > -1:
if len(str(x)) > 50:
print "*** POSSIBLE BUFFER OVERFLOW ***"
else:
print "*** INSTANCE CRASHED ***"
print "Reconnecting ... "
connect()
elif error.upper().find("ORA-00600") > -1:
print "*** INTERNAL ERROR ***"
elif error.upper().find("PLS-00306:") > -1:
print "Currently unfuzzable :("
continue
elif error.upper().find("ORA-03114") > -1:
print "We are not connected :?"
connect()
print error
评论列表
文章目录