mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-01-23 15:54:24 +03:00
added test for site existance
This commit is contained in:
parent
7ee20480a4
commit
3110bb10fc
|
@ -23,6 +23,7 @@ Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import re
|
import re
|
||||||
|
import socket
|
||||||
import time
|
import time
|
||||||
|
|
||||||
from lib.core.agent import agent
|
from lib.core.agent import agent
|
||||||
|
@ -380,6 +381,14 @@ def checkRegexp():
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def checkConnection():
|
def checkConnection():
|
||||||
|
infoMsg = "testing if site exists"
|
||||||
|
logger.info(infoMsg)
|
||||||
|
try:
|
||||||
|
socket.gethostbyname(conf.hostname)
|
||||||
|
except socket.gaierror:
|
||||||
|
errMsg = "site '%s' does not exist" % conf.hostname
|
||||||
|
raise sqlmapConnectionException, errMsg
|
||||||
|
|
||||||
infoMsg = "testing connection to the target url"
|
infoMsg = "testing connection to the target url"
|
||||||
logger.info(infoMsg)
|
logger.info(infoMsg)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user