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

Skip to content

Commit 3744926

Browse files
committed
Fixes #3425
1 parent 45c699e commit 3744926

4 files changed

Lines changed: 15 additions & 13 deletions

File tree

lib/core/common.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4598,9 +4598,8 @@ def _parseBurpLog(content):
45984598
reqResList = re.finditer(BURP_REQUEST_REGEX, content, re.I | re.S)
45994599

46004600
for match in reqResList:
4601-
request = match if isinstance(match, basestring) else match.group(0)
4601+
request = match if isinstance(match, basestring) else match.group(1)
46024602
request = re.sub(r"\A[^\w]+", "", request)
4603-
46044603
schemePort = re.search(r"(http[\w]*)\:\/\/.*?\:([\d]+).+?={10,}", request, re.I | re.S)
46054604

46064605
if schemePort:

lib/core/option.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@
100100
from lib.core.settings import CODECS_LIST_PAGE
101101
from lib.core.settings import CUSTOM_INJECTION_MARK_CHAR
102102
from lib.core.settings import DBMS_ALIASES
103+
from lib.core.settings import DEFAULT_GET_POST_DELIMITER
103104
from lib.core.settings import DEFAULT_PAGE_ENCODING
104105
from lib.core.settings import DEFAULT_TOR_HTTP_PORTS
105106
from lib.core.settings import DEFAULT_TOR_SOCKS_PORTS
@@ -223,10 +224,11 @@ def _setMultipleTargets():
223224

224225
if os.path.isfile(conf.logFile):
225226
for target in parseRequestFile(conf.logFile):
226-
url = target[0]
227-
if url not in seen:
227+
url, _, data, _, _ = target
228+
key = re.sub(r"(\w+=)[^%s ]*" % (conf.paramDel or DEFAULT_GET_POST_DELIMITER), r"\g<1>", "%s %s" % (url, data))
229+
if key not in seen:
228230
kb.targets.add(target)
229-
seen.add(url)
231+
seen.add(key)
230232

231233
elif os.path.isdir(conf.logFile):
232234
files = os.listdir(conf.logFile)
@@ -237,10 +239,11 @@ def _setMultipleTargets():
237239
continue
238240

239241
for target in parseRequestFile(os.path.join(conf.logFile, reqFile)):
240-
url = target[0]
241-
if url not in seen:
242+
url, _, data, _, _ = target
243+
key = re.sub(r"(\w+=)[^%s ]*" % (conf.paramDel or DEFAULT_GET_POST_DELIMITER), r"\g<1>", "%s %s" % (url, data))
244+
if key not in seen:
242245
kb.targets.add(target)
243-
seen.add(url)
246+
seen.add(key)
244247

245248
else:
246249
errMsg = "the specified list of targets is not a file "

lib/core/settings.py

Lines changed: 2 additions & 2 deletions
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.3.1.1"
22+
VERSION = "1.3.1.2"
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)
@@ -360,7 +360,7 @@
360360
WEBSCARAB_SPLITTER = "### Conversation"
361361

362362
# Splitter used between requests in BURP log files
363-
BURP_REQUEST_REGEX = r"={10,}\s+[^=]+={10,}\s(.+?)\s={10,}"
363+
BURP_REQUEST_REGEX = r"={10,}\s+([A-Z]{3,} .+?)\s+={10,}"
364364

365365
# Regex used for parsing XML Burp saved history items
366366
BURP_XML_HISTORY_REGEX = r'<port>(\d+)</port>.+?<request base64="true"><!\[CDATA\[([^]]+)'

txt/checksum.md5

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ e97a9d34fef5761a8eab6432ce3c7c53 lib/controller/handler.py
2929
fb6be55d21a70765e35549af2484f762 lib/controller/__init__.py
3030
6da66134fec9d81492e5b7c7241fdbd9 lib/core/agent.py
3131
fdabbf8dda7277e5f4e3d0a6252cffb6 lib/core/bigarray.py
32-
61e6d5e091588bf8e33fb1d92f23868a lib/core/common.py
32+
4706fb856c1662ef5afd747544d0d8cb lib/core/common.py
3333
de8d27ae6241163ff9e97aa9e7c51a18 lib/core/convert.py
3434
abcb1121eb56d3401839d14e8ed06b6e lib/core/data.py
3535
db60c6ebb63b72ed119e304b359fc1a6 lib/core/datatype.py
@@ -42,14 +42,14 @@ b7c912e2af7a3354f6d7c04f556a80b2 lib/core/decorators.py
4242
fb6be55d21a70765e35549af2484f762 lib/core/__init__.py
4343
18c896b157b03af716542e5fe9233ef9 lib/core/log.py
4444
fa9f24e88c81a6cef52da3dd5e637010 lib/core/optiondict.py
45-
83d9f55dad3915ff66ce7f2f21452bc2 lib/core/option.py
45+
95b2bc1fd01393771fc0cd239b2fe05a lib/core/option.py
4646
fe370021c6bc99daf44b2bfc0d1effb3 lib/core/patch.py
4747
0f1d79ada721cf6def611b21b03d68af lib/core/profiling.py
4848
5e2c16a8e2daee22dd545df13386e7a3 lib/core/readlineng.py
4949
9a7d68d5fa01561500423791f15cc676 lib/core/replication.py
5050
3179d34f371e0295dd4604568fb30bcd lib/core/revision.py
5151
d6269c55789f78cf707e09a0f5b45443 lib/core/session.py
52-
0128758c83a31ba80424336cc45f1e6e lib/core/settings.py
52+
b1e0f0672f00611ad7f9d3a467d53649 lib/core/settings.py
5353
a8a7501d1e6b21669b858a62e921d191 lib/core/shell.py
5454
5dc606fdf0afefd4b305169c21ab2612 lib/core/subprocessng.py
5555
eec3080ba5baca44c6de4595f1c92a0d lib/core/target.py

0 commit comments

Comments
 (0)