Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7ee2048 commit 3110bb1Copy full SHA for 3110bb1
1 file changed
lib/controller/checks.py
@@ -23,6 +23,7 @@
23
"""
24
25
import re
26
+import socket
27
import time
28
29
from lib.core.agent import agent
@@ -380,6 +381,14 @@ def checkRegexp():
380
381
return False
382
383
def checkConnection():
384
+ infoMsg = "testing if site exists"
385
+ logger.info(infoMsg)
386
+ try:
387
+ socket.gethostbyname(conf.hostname)
388
+ except socket.gaierror:
389
+ errMsg = "site '%s' does not exist" % conf.hostname
390
+ raise sqlmapConnectionException, errMsg
391
+
392
infoMsg = "testing connection to the target url"
393
logger.info(infoMsg)
394
0 commit comments