mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 01:26:42 +03:00
Be more user friendly on messages and minor code layout improvement
This commit is contained in:
parent
09ca578ca1
commit
03b90e0a3f
|
@ -91,6 +91,7 @@ class Dump:
|
|||
|
||||
|
||||
def lister(self, header, elements):
|
||||
if elements:
|
||||
self.__write("%s [%d]:" % (header, len(elements)))
|
||||
|
||||
try:
|
||||
|
@ -106,12 +107,14 @@ class Dump:
|
|||
elif isinstance(element, (list, tuple, set)):
|
||||
self.__write("[*] " + ", ".join(e for e in element))
|
||||
|
||||
if elements:
|
||||
self.__write("")
|
||||
|
||||
|
||||
def userSettings(self, header, userSettings, subHeader):
|
||||
self.__areAdmins = set()
|
||||
|
||||
if userSettings:
|
||||
self.__write("%s:" % header)
|
||||
|
||||
if isinstance(userSettings, (tuple, list, set)):
|
||||
|
|
|
@ -195,7 +195,7 @@ class MSSQLServerMap(Fingerprint, Enumeration, Filesystem, Takeover):
|
|||
|
||||
|
||||
def getPrivileges(self):
|
||||
warnMsg = "this plugin can not fetch database users privileges"
|
||||
warnMsg = "on MySQL is it not possible to fetch database users privileges"
|
||||
logger.warn(warnMsg)
|
||||
|
||||
return {}
|
||||
|
|
|
@ -210,7 +210,7 @@ class OracleMap(Fingerprint, Enumeration, Filesystem, Takeover):
|
|||
|
||||
|
||||
def getDbs(self):
|
||||
warnMsg = "this plugin can not enumerate databases"
|
||||
warnMsg = "on Oracle it is not possible to enumerate databases"
|
||||
logger.warn(warnMsg)
|
||||
|
||||
return []
|
||||
|
|
|
@ -33,10 +33,10 @@ class Filesystem:
|
|||
"""
|
||||
|
||||
def readFile(self, rFile):
|
||||
errMsg = "this plugin does not support OS file reading yet"
|
||||
errMsg = "OS file reading not yet implemented for this DBMS"
|
||||
raise sqlmapUnsupportedFeatureException, errMsg
|
||||
|
||||
|
||||
def writeFile(self, wFile):
|
||||
errMsg = "this plugin does not support OS file writing yet"
|
||||
errMsg = "OS file writing not yet implemented for this DBMS"
|
||||
raise sqlmapUnsupportedFeatureException, errMsg
|
||||
|
|
|
@ -33,5 +33,5 @@ class Takeover:
|
|||
"""
|
||||
|
||||
def osShell(self):
|
||||
errMsg = "this plugin does not support OS shell functionality yet"
|
||||
errMsg = "OS shell functionality not yet implemented for this DBMS"
|
||||
raise sqlmapUnsupportedFeatureException, errMsg
|
||||
|
|
|
@ -72,16 +72,20 @@ def main():
|
|||
|
||||
if conf.start:
|
||||
start()
|
||||
|
||||
except exceptionsTuple, e:
|
||||
logger.error(e)
|
||||
|
||||
except KeyboardInterrupt:
|
||||
print
|
||||
errMsg = "user aborted"
|
||||
logger.error(errMsg)
|
||||
|
||||
except EOFError:
|
||||
print
|
||||
errMsg = "exit"
|
||||
logger.error(errMsg)
|
||||
|
||||
except:
|
||||
errMsg = unhandledException()
|
||||
logger.error(errMsg)
|
||||
|
|
Loading…
Reference in New Issue
Block a user