Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8f7a7be

Browse files
committed
Minor patch
1 parent 36b0ece commit 8f7a7be

3 files changed

Lines changed: 16 additions & 15 deletions

File tree

lib/controller/checks.py

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1522,18 +1522,19 @@ def checkNullConnection():
15221522
return kb.nullConnection is not None
15231523

15241524
def checkConnection(suppressOutput=False):
1525-
if not any((conf.proxy, conf.tor, conf.dummy, conf.offline)):
1526-
try:
1527-
debugMsg = "resolving hostname '%s'" % conf.hostname
1528-
logger.debug(debugMsg)
1529-
socket.getaddrinfo(conf.hostname, None)
1530-
except socket.gaierror:
1531-
errMsg = "host '%s' does not exist" % conf.hostname
1532-
raise SqlmapConnectionException(errMsg)
1533-
except socket.error, ex:
1534-
errMsg = "problem occurred while "
1535-
errMsg += "resolving a host name '%s' ('%s')" % (conf.hostname, getSafeExString(ex))
1536-
raise SqlmapConnectionException(errMsg)
1525+
if not re.search(r"\A\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\Z", conf.hostname):
1526+
if not any((conf.proxy, conf.tor, conf.dummy, conf.offline)):
1527+
try:
1528+
debugMsg = "resolving hostname '%s'" % conf.hostname
1529+
logger.debug(debugMsg)
1530+
socket.getaddrinfo(conf.hostname, None)
1531+
except socket.gaierror:
1532+
errMsg = "host '%s' does not exist" % conf.hostname
1533+
raise SqlmapConnectionException(errMsg)
1534+
except socket.error, ex:
1535+
errMsg = "problem occurred while "
1536+
errMsg += "resolving a host name '%s' ('%s')" % (conf.hostname, getSafeExString(ex))
1537+
raise SqlmapConnectionException(errMsg)
15371538

15381539
if not suppressOutput and not conf.dummy and not conf.offline:
15391540
infoMsg = "testing connection to the target URL"

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from lib.core.enums import OS
2020

2121
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
22-
VERSION = "1.2.4.23"
22+
VERSION = "1.2.5.0"
2323
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2424
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2525
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

txt/checksum.md5

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ c88d66597f4aab719bde4542b0a1a6e0 extra/shutils/regressiontest.py
2121
1e5532ede194ac9c083891c2f02bca93 extra/sqlharvest/__init__.py
2222
b3e60ea4e18a65c48515d04aab28ff68 extra/sqlharvest/sqlharvest.py
2323
0f581182871148b0456a691ae85b04c0 lib/controller/action.py
24-
d9559f6c5053a7ccb524f3dd049e35f8 lib/controller/checks.py
24+
aea19b45c6154035a689954719c753dc lib/controller/checks.py
2525
c414cecdb0472c92cf50ed5b01e4438c lib/controller/controller.py
2626
c7443613a0a2505b1faec931cee2a6ef lib/controller/handler.py
2727
1e5532ede194ac9c083891c2f02bca93 lib/controller/__init__.py
@@ -46,7 +46,7 @@ c9a56e58984420a5abb7a3f7aadc196d lib/core/optiondict.py
4646
0c3eef46bdbf87e29a3f95f90240d192 lib/core/replication.py
4747
a7db43859b61569b601b97f187dd31c5 lib/core/revision.py
4848
fcb74fcc9577523524659ec49e2e964b lib/core/session.py
49-
f7b4a41eb39e717f89c55b0a90348e87 lib/core/settings.py
49+
1b801d825811ee4362e07e568e8a928e lib/core/settings.py
5050
0dfc2ed40adf72e302291f6ecd4406f6 lib/core/shell.py
5151
a7edc9250d13af36ac0108f259859c19 lib/core/subprocessng.py
5252
6306284edcccc185b2df085438572b0d lib/core/target.py

0 commit comments

Comments
 (0)