mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-26 03:23:48 +03:00
switching to debug mode for missing dependencies
This commit is contained in:
parent
60ecf95383
commit
1e17c0d4a1
|
@ -27,10 +27,10 @@ def checkDependencies():
|
||||||
import pymssql
|
import pymssql
|
||||||
|
|
||||||
if not hasattr(pymssql, "__version__") or pymssql.__version__ < "1.0.2":
|
if not hasattr(pymssql, "__version__") or pymssql.__version__ < "1.0.2":
|
||||||
errMsg = "'%s' third-party library must be " % data[1]
|
debugMsg = "'%s' third-party library must be " % data[1]
|
||||||
errMsg += "version >= 1.0.2 to work properly. "
|
debugMsg += "version >= 1.0.2 to work properly. "
|
||||||
errMsg += "Download from %s" % data[2]
|
debugMsg += "Download from %s" % data[2]
|
||||||
logger.error(errMsg)
|
logger.debug(debugMsg)
|
||||||
elif dbmsName == DBMS.MYSQL:
|
elif dbmsName == DBMS.MYSQL:
|
||||||
import MySQLdb
|
import MySQLdb
|
||||||
elif dbmsName == DBMS.PGSQL:
|
elif dbmsName == DBMS.PGSQL:
|
||||||
|
@ -44,10 +44,10 @@ def checkDependencies():
|
||||||
elif dbmsName == DBMS.FIREBIRD:
|
elif dbmsName == DBMS.FIREBIRD:
|
||||||
import kinterbasdb
|
import kinterbasdb
|
||||||
except ImportError, _:
|
except ImportError, _:
|
||||||
errMsg = "sqlmap requires '%s' third-party library " % data[1]
|
debugMsg = "sqlmap requires '%s' third-party library " % data[1]
|
||||||
errMsg += "in order to directly connect to the database "
|
debugMsg += "in order to directly connect to the database "
|
||||||
errMsg += "%s. Download from %s" % (dbmsName, data[2])
|
debugMsg += "%s. Download from %s" % (dbmsName, data[2])
|
||||||
logger.error(errMsg)
|
logger.debug(debugMsg)
|
||||||
missing_libraries.add(data[1])
|
missing_libraries.add(data[1])
|
||||||
|
|
||||||
continue
|
continue
|
||||||
|
@ -60,10 +60,10 @@ def checkDependencies():
|
||||||
debugMsg = "'python-impacket' third-party library is found"
|
debugMsg = "'python-impacket' third-party library is found"
|
||||||
logger.debug(debugMsg)
|
logger.debug(debugMsg)
|
||||||
except ImportError, _:
|
except ImportError, _:
|
||||||
errMsg = "sqlmap requires 'python-impacket' third-party library for "
|
debugMsg = "sqlmap requires 'python-impacket' third-party library for "
|
||||||
errMsg += "out-of-band takeover feature. Download from "
|
debugMsg += "out-of-band takeover feature. Download from "
|
||||||
errMsg += "http://code.google.com/p/impacket/"
|
debugMsg += "http://code.google.com/p/impacket/"
|
||||||
logger.error(errMsg)
|
logger.debug(debugMsg)
|
||||||
missing_libraries.add('python-impacket')
|
missing_libraries.add('python-impacket')
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -71,10 +71,10 @@ def checkDependencies():
|
||||||
debugMsg = "'python-ntlm' third-party library is found"
|
debugMsg = "'python-ntlm' third-party library is found"
|
||||||
logger.debug(debugMsg)
|
logger.debug(debugMsg)
|
||||||
except ImportError, _:
|
except ImportError, _:
|
||||||
errMsg = "sqlmap requires 'python-ntlm' third-party library for "
|
debugMsg = "sqlmap requires 'python-ntlm' third-party library for "
|
||||||
errMsg += "if you plan to attack a web application behind NTLM "
|
debugMsg += "if you plan to attack a web application behind NTLM "
|
||||||
errMsg += "authentication. Download from http://code.google.com/p/python-ntlm/"
|
debugMsg += "authentication. Download from http://code.google.com/p/python-ntlm/"
|
||||||
logger.error(errMsg)
|
logger.debug(debugMsg)
|
||||||
missing_libraries.add('python-ntlm')
|
missing_libraries.add('python-ntlm')
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -82,10 +82,10 @@ def checkDependencies():
|
||||||
debugMsg = "'python-svn' third-party library is found"
|
debugMsg = "'python-svn' third-party library is found"
|
||||||
logger.debug(debugMsg)
|
logger.debug(debugMsg)
|
||||||
except ImportError, _:
|
except ImportError, _:
|
||||||
errMsg = "sqlmap requires 'python-svn' third-party library for "
|
debugMsg = "sqlmap requires 'python-svn' third-party library for "
|
||||||
errMsg += "if you want to use the sqlmap update functionality. "
|
debugMsg += "if you want to use the sqlmap update functionality. "
|
||||||
errMsg += "Download from http://pysvn.tigris.org/"
|
debugMsg += "Download from http://pysvn.tigris.org/"
|
||||||
logger.error(errMsg)
|
logger.debug(debugMsg)
|
||||||
missing_libraries.add('python-svn')
|
missing_libraries.add('python-svn')
|
||||||
|
|
||||||
if IS_WIN:
|
if IS_WIN:
|
||||||
|
@ -94,12 +94,12 @@ def checkDependencies():
|
||||||
debugMsg = "'python-pyreadline' third-party library is found"
|
debugMsg = "'python-pyreadline' third-party library is found"
|
||||||
logger.debug(debugMsg)
|
logger.debug(debugMsg)
|
||||||
except ImportError, _:
|
except ImportError, _:
|
||||||
errMsg = "sqlmap requires 'pyreadline' third-party library to "
|
debugMsg = "sqlmap requires 'pyreadline' third-party library to "
|
||||||
errMsg += "be able to take advantage of the sqlmap TAB "
|
debugMsg += "be able to take advantage of the sqlmap TAB "
|
||||||
errMsg += "completion and history support features in the SQL "
|
debugMsg += "completion and history support features in the SQL "
|
||||||
errMsg += "shell and OS shell. Download from "
|
debugMsg += "shell and OS shell. Download from "
|
||||||
errMsg += "http://ipython.scipy.org/moin/PyReadline/Intro"
|
debugMsg += "http://ipython.scipy.org/moin/PyReadline/Intro"
|
||||||
logger.error(errMsg)
|
logger.debug(debugMsg)
|
||||||
missing_libraries.add('python-pyreadline')
|
missing_libraries.add('python-pyreadline')
|
||||||
|
|
||||||
if len(missing_libraries) == 0:
|
if len(missing_libraries) == 0:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user