minor update

This commit is contained in:
Miroslav Stampar
2010-11-15 12:19:22 +00:00
parent 819085155e
commit 39c6c9f386
2 changed files with 6 additions and 5 deletions

View File

@@ -405,15 +405,16 @@ def checkNullConnection():
return kb.nullConnection is not None
def checkConnection():
def checkConnection(suppressOutput=False):
try:
socket.gethostbyname(conf.hostname)
except socket.gaierror:
errMsg = "host '%s' does not exist" % conf.hostname
raise sqlmapConnectionException, errMsg
infoMsg = "testing connection to the target url"
logger.info(infoMsg)
if not suppressOutput:
infoMsg = "testing connection to the target url"
logger.info(infoMsg)
try:
page, _ = Request.queryPage(content=True)