mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-26 03:23:48 +03:00
minor update
This commit is contained in:
parent
819085155e
commit
39c6c9f386
|
@ -405,15 +405,16 @@ def checkNullConnection():
|
||||||
|
|
||||||
return kb.nullConnection is not None
|
return kb.nullConnection is not None
|
||||||
|
|
||||||
def checkConnection():
|
def checkConnection(suppressOutput=False):
|
||||||
try:
|
try:
|
||||||
socket.gethostbyname(conf.hostname)
|
socket.gethostbyname(conf.hostname)
|
||||||
except socket.gaierror:
|
except socket.gaierror:
|
||||||
errMsg = "host '%s' does not exist" % conf.hostname
|
errMsg = "host '%s' does not exist" % conf.hostname
|
||||||
raise sqlmapConnectionException, errMsg
|
raise sqlmapConnectionException, errMsg
|
||||||
|
|
||||||
infoMsg = "testing connection to the target url"
|
if not suppressOutput:
|
||||||
logger.info(infoMsg)
|
infoMsg = "testing connection to the target url"
|
||||||
|
logger.info(infoMsg)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
page, _ = Request.queryPage(content=True)
|
page, _ = Request.queryPage(content=True)
|
||||||
|
|
|
@ -193,7 +193,7 @@ def start():
|
||||||
|
|
||||||
setupTargetEnv()
|
setupTargetEnv()
|
||||||
|
|
||||||
if not checkConnection() or not checkString() or not checkRegexp():
|
if not checkConnection(conf.forms) or not checkString() or not checkRegexp():
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if conf.nullConnection:
|
if conf.nullConnection:
|
||||||
|
@ -361,7 +361,7 @@ def start():
|
||||||
e = getUnicode(e)
|
e = getUnicode(e)
|
||||||
|
|
||||||
if conf.multipleTargets:
|
if conf.multipleTargets:
|
||||||
e += ", skipping to next url"
|
e += ", skipping to the next %s" % ("form" if conf.forms else "url")
|
||||||
logger.error(e)
|
logger.error(e)
|
||||||
else:
|
else:
|
||||||
logger.critical(e)
|
logger.critical(e)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user