mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-09 22:21:30 +00:00
Baby steps (2 to 3 at a time)
This commit is contained in:
@@ -43,7 +43,7 @@ class Connector(GenericConnector):
|
||||
try:
|
||||
self.connector = cx_Oracle.connect(dsn=self.__dsn, user=self.user, password=self.password, mode=cx_Oracle.SYSDBA)
|
||||
logger.info("successfully connected as SYSDBA")
|
||||
except (cx_Oracle.OperationalError, cx_Oracle.DatabaseError, cx_Oracle.InterfaceError), ex:
|
||||
except (cx_Oracle.OperationalError, cx_Oracle.DatabaseError, cx_Oracle.InterfaceError) as ex:
|
||||
if "Oracle Client library" in str(ex):
|
||||
msg = re.sub(r"DPI-\d+:\s+", "", str(ex))
|
||||
msg = re.sub(r': ("[^"]+")', r" (\g<1>)", msg)
|
||||
|
||||
@@ -70,7 +70,7 @@ class Custom:
|
||||
|
||||
output = NULL
|
||||
|
||||
except SqlmapNoneDataException, ex:
|
||||
except SqlmapNoneDataException as ex:
|
||||
logger.warn(ex)
|
||||
|
||||
return output
|
||||
|
||||
@@ -444,13 +444,13 @@ class Entries:
|
||||
"db": safeSQLIdentificatorNaming(conf.db)}
|
||||
try:
|
||||
attackDumpedTable()
|
||||
except (IOError, OSError), ex:
|
||||
except (IOError, OSError) as ex:
|
||||
errMsg = "an error occurred while attacking "
|
||||
errMsg += "table dump ('%s')" % getSafeExString(ex)
|
||||
logger.critical(errMsg)
|
||||
conf.dumper.dbTableValues(kb.data.dumpedTable)
|
||||
|
||||
except SqlmapConnectionException, ex:
|
||||
except SqlmapConnectionException as ex:
|
||||
errMsg = "connection exception detected in dumping phase "
|
||||
errMsg += "('%s')" % getSafeExString(ex)
|
||||
logger.critical(errMsg)
|
||||
|
||||
@@ -140,7 +140,7 @@ class Takeover(Abstraction, Metasploit, ICMPsh, Registry, Miscellaneous):
|
||||
try:
|
||||
with open(filename, "wb") as f:
|
||||
f.write("1")
|
||||
except IOError, ex:
|
||||
except IOError as ex:
|
||||
errMsg = "there has been a file opening/writing error "
|
||||
errMsg += "for filename '%s' ('%s')" % (filename, getSafeExString(ex))
|
||||
raise SqlmapSystemException(errMsg)
|
||||
|
||||
Reference in New Issue
Block a user