Skip to content

Commit e18b41f

Browse files
committed
Fixes #3421
1 parent 586c461 commit e18b41f

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

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.47"
22+
VERSION = "1.2.12.48"
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)

lib/request/connect.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1259,10 +1259,13 @@ def _randomizeParameter(paramString, randomParameter):
12591259
_, headers, code = Connect.getPage(url=uri, get=get, post=post, method=method, cookie=cookie, ua=ua, referer=referer, host=host, silent=silent, auxHeaders=auxHeaders, raise404=raise404, skipRead=(kb.nullConnection == NULLCONNECTION.SKIP_READ))
12601260

12611261
if headers:
1262-
if kb.nullConnection in (NULLCONNECTION.HEAD, NULLCONNECTION.SKIP_READ) and headers.get(HTTP_HEADER.CONTENT_LENGTH):
1263-
pageLength = int(headers[HTTP_HEADER.CONTENT_LENGTH])
1264-
elif kb.nullConnection == NULLCONNECTION.RANGE and headers.get(HTTP_HEADER.CONTENT_RANGE):
1265-
pageLength = int(headers[HTTP_HEADER.CONTENT_RANGE][headers[HTTP_HEADER.CONTENT_RANGE].find('/') + 1:])
1262+
try:
1263+
if kb.nullConnection in (NULLCONNECTION.HEAD, NULLCONNECTION.SKIP_READ) and headers.get(HTTP_HEADER.CONTENT_LENGTH):
1264+
pageLength = int(headers[HTTP_HEADER.CONTENT_LENGTH].split(',')[0])
1265+
elif kb.nullConnection == NULLCONNECTION.RANGE and headers.get(HTTP_HEADER.CONTENT_RANGE):
1266+
pageLength = int(headers[HTTP_HEADER.CONTENT_RANGE][headers[HTTP_HEADER.CONTENT_RANGE].find('/') + 1:])
1267+
except ValueError:
1268+
pass
12661269
finally:
12671270
kb.pageCompress = popValue()
12681271

txt/checksum.md5

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ c8c386d644d57c659d74542f5f57f632 lib/core/patch.py
4949
0c3eef46bdbf87e29a3f95f90240d192 lib/core/replication.py
5050
a7db43859b61569b601b97f187dd31c5 lib/core/revision.py
5151
fcb74fcc9577523524659ec49e2e964b lib/core/session.py
52-
22ef53fbda55651f76cb0e3f867ce6bc lib/core/settings.py
52+
ee218563ec023478311e55a30e2ea443 lib/core/settings.py
5353
a971ce157d04de96ba6e710d3d38a9a8 lib/core/shell.py
5454
a7edc9250d13af36ac0108f259859c19 lib/core/subprocessng.py
5555
1581be48127a3a7a9fd703359b6e7567 lib/core/target.py
@@ -71,7 +71,7 @@ f6b5957bf2103c3999891e4f45180bce lib/parse/payloads.py
7171
30eed3a92a04ed2c29770e1b10d39dc0 lib/request/basicauthhandler.py
7272
67c035eda3066b44c592b2f602e44b3e lib/request/basic.py
7373
859b6ad583e0ffba154f17ee179b5b89 lib/request/comparison.py
74-
b003a50d7de068afbe540e830df8682d lib/request/connect.py
74+
2fe9e5118553f9b2b37ca33d5f85a401 lib/request/connect.py
7575
dd4598675027fae99f2e2475b05986da lib/request/direct.py
7676
2044fce3f4ffa268fcfaaf63241b1e64 lib/request/dns.py
7777
98535d0efca5551e712fcc4b34a3f772 lib/request/httpshandler.py

0 commit comments

Comments
 (0)