Skip to content

Commit f544554

Browse files
committed
Bug fix (--forms with --url without protocol)
1 parent c7c7e30 commit f544554

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed

lib/core/common.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4116,7 +4116,12 @@ def checkSameHost(*urls):
41164116
elif len(urls) == 1:
41174117
return True
41184118
else:
4119-
return all(re.sub(r"(?i)\Awww\.", "", urlparse.urlparse(url or "").netloc.split(':')[0]) == re.sub(r"(?i)\Awww\.", "", urlparse.urlparse(urls[0] or "").netloc.split(':')[0]) for url in urls[1:])
4119+
def _(value):
4120+
if value and not re.search(r"\A\w+://", value):
4121+
value = "http://%s" % value
4122+
return value
4123+
4124+
return all(re.sub(r"(?i)\Awww\.", "", urlparse.urlparse(_(url) or "").netloc.split(':')[0]) == re.sub(r"(?i)\Awww\.", "", urlparse.urlparse(_(urls[0]) or "").netloc.split(':')[0]) for url in urls[1:])
41204125

41214126
def getHostHeader(url):
41224127
"""

lib/core/option.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1511,6 +1511,8 @@ def _cleanupOptions():
15111511

15121512
if conf.url:
15131513
conf.url = conf.url.strip()
1514+
if not re.search(r"\A\w+://", conf.url):
1515+
conf.url = "http://%s" % conf.url
15141516

15151517
if conf.fileRead:
15161518
conf.fileRead = ntToPosixSlashes(normalizePath(conf.fileRead))

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.12.16"
22+
VERSION = "1.2.12.17"
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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ ad968ee04e93f6f850d6b7e5ac0073c5 lib/controller/controller.py
2929
1e5532ede194ac9c083891c2f02bca93 lib/controller/__init__.py
3030
e62309b22a59e60b270e62586f169441 lib/core/agent.py
3131
c347f085bd561adfa26d3a9512e5f3b9 lib/core/bigarray.py
32-
cf84ff84891b7f51620a457b0bff28c5 lib/core/common.py
32+
a78c563bbaeebd958b25303d83dfe3f2 lib/core/common.py
3333
0d082da16c388b3445e656e0760fb582 lib/core/convert.py
3434
9f87391b6a3395f7f50830b391264f27 lib/core/data.py
3535
72016ea5c994a711a262fd64572a0fcd lib/core/datatype.py
@@ -42,14 +42,14 @@ cada93357a7321655927fc9625b3bfec lib/core/exception.py
4242
1e5532ede194ac9c083891c2f02bca93 lib/core/__init__.py
4343
458a194764805cd8312c14ecd4be4d1e lib/core/log.py
4444
7d6edc552e08c30f4f4d49fa93b746f1 lib/core/optiondict.py
45-
ecf9879967182e6402f3cab6840f5b75 lib/core/option.py
45+
b3ffa34552b4594bbba54513069c642b lib/core/option.py
4646
c8c386d644d57c659d74542f5f57f632 lib/core/patch.py
4747
6783160150b4711d02c56ee2beadffdb lib/core/profiling.py
4848
6f654e1715571eff68a0f8af3d62dcf8 lib/core/readlineng.py
4949
0c3eef46bdbf87e29a3f95f90240d192 lib/core/replication.py
5050
a7db43859b61569b601b97f187dd31c5 lib/core/revision.py
5151
fcb74fcc9577523524659ec49e2e964b lib/core/session.py
52-
0070ff829f953549bd7a8a65090fa09d lib/core/settings.py
52+
380daa313fda2c14c88b69c3461f0e54 lib/core/settings.py
5353
a971ce157d04de96ba6e710d3d38a9a8 lib/core/shell.py
5454
a7edc9250d13af36ac0108f259859c19 lib/core/subprocessng.py
5555
1581be48127a3a7a9fd703359b6e7567 lib/core/target.py

0 commit comments

Comments
 (0)