mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 09:36:35 +03:00
Minor improvement
This commit is contained in:
parent
29ea0950b6
commit
02b333e30b
|
@ -280,7 +280,10 @@ class Fingerprint(GenericFingerprint):
|
|||
elif result is False:
|
||||
kb.os = "Windows"
|
||||
|
||||
infoMsg = "the back-end DBMS operating system is %s" % (kb.os or "Unknown")
|
||||
logger.info(infoMsg)
|
||||
if kb.os:
|
||||
infoMsg = "the back-end DBMS operating system is %s" % kb.os
|
||||
logger.info(infoMsg)
|
||||
else:
|
||||
self.userChooseDbmsOs()
|
||||
|
||||
self.cleanup(onlyFileTbl=True)
|
||||
|
|
|
@ -7,7 +7,9 @@ Copyright (c) 2006-2010 sqlmap developers (http://sqlmap.sourceforge.net/)
|
|||
See the file 'doc/COPYING' for copying permission
|
||||
"""
|
||||
|
||||
from lib.core.common import readInput
|
||||
from lib.core.data import kb
|
||||
from lib.core.data import logger
|
||||
from lib.core.exception import sqlmapUndefinedMethod
|
||||
|
||||
class Fingerprint:
|
||||
|
@ -35,3 +37,23 @@ class Fingerprint:
|
|||
|
||||
def forceDbmsEnum(self):
|
||||
pass
|
||||
|
||||
def userChooseDbmsOs(self):
|
||||
warnMsg = "for some reason sqlmap was unable to fingerprint "
|
||||
warnMsg += "the back-end DBMS operating system"
|
||||
logger.warn(warnMsg)
|
||||
|
||||
msg = "do you want to provide the OS? [(W)indows/(l)inux]"
|
||||
|
||||
while True:
|
||||
os = readInput(msg, default="W")
|
||||
|
||||
if os[0].lower() == "w":
|
||||
kb.os = "Windows"
|
||||
break
|
||||
elif os[0].lower() == "l":
|
||||
kb.os = "Linux"
|
||||
break
|
||||
else:
|
||||
warnMsg = "invalid value"
|
||||
logger.warn(warnMsg)
|
||||
|
|
Loading…
Reference in New Issue
Block a user