mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-15 04:09:02 +00:00
Replacing old and deprecated raise Exception style (PEP8)
This commit is contained in:
@@ -44,7 +44,7 @@ class Google(object):
|
||||
e.info()
|
||||
except urllib2.URLError:
|
||||
errMsg = "unable to connect to Google"
|
||||
raise SqlmapConnectionException, errMsg
|
||||
raise SqlmapConnectionException(errMsg)
|
||||
|
||||
def search(self, dork):
|
||||
"""
|
||||
@@ -94,13 +94,13 @@ class Google(object):
|
||||
return None
|
||||
except (urllib2.URLError, socket.error, socket.timeout):
|
||||
errMsg = "unable to connect to Google"
|
||||
raise SqlmapConnectionException, errMsg
|
||||
raise SqlmapConnectionException(errMsg)
|
||||
|
||||
retVal = [urllib.unquote(match.group(1)) for match in re.finditer(GOOGLE_REGEX, page, re.I | re.S)]
|
||||
|
||||
if not retVal and "detected unusual traffic" in page:
|
||||
warnMsg = "Google has detected 'unusual' traffic from "
|
||||
warnMsg += "this computer disabling further searches"
|
||||
raise SqlmapGenericException, warnMsg
|
||||
raise SqlmapGenericException(warnMsg)
|
||||
|
||||
return retVal
|
||||
|
||||
@@ -39,7 +39,7 @@ class HashDB(object):
|
||||
except Exception, ex:
|
||||
errMsg = "error occurred while opening a session "
|
||||
errMsg += "file '%s' ('%s')" % (self.filepath, ex)
|
||||
raise SqlmapDataException, errMsg
|
||||
raise SqlmapDataException(errMsg)
|
||||
|
||||
return threadData.hashDBCursor
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ def pivotDumpTable(table, colList, count=None, blind=True):
|
||||
|
||||
if not validColumnList:
|
||||
errMsg = "all column name(s) provided are non-existent"
|
||||
raise SqlmapNoneDataException, errMsg
|
||||
raise SqlmapNoneDataException(errMsg)
|
||||
|
||||
if not validPivotValue:
|
||||
warnMsg = "no proper pivot column provided (with unique values)."
|
||||
|
||||
Reference in New Issue
Block a user