mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-08-04 06:50:14 +00:00
Replacing old and deprecated raise Exception style (PEP8)
This commit is contained in:
parent
3a11d36c66
commit
e4a3c015e5
78 changed files with 260 additions and 260 deletions
|
|
@ -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)."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue