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

Skip to content

Commit 43c9e21

Browse files
committed
Performance improvement and reducing number of false-positives in heavily dynamic pages
1 parent a831865 commit 43c9e21

3 files changed

Lines changed: 8 additions & 4 deletions

File tree

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.8.34"
22+
VERSION = "1.2.9.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)

lib/request/comparison.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,14 @@ def _comparison(page, headers, code, getRatioValue, pageLength):
137137
seq1 = seq1.replace(REFLECTED_VALUE_MARKER, "")
138138
seq2 = seq2.replace(REFLECTED_VALUE_MARKER, "")
139139

140+
if kb.heavilyDynamic:
141+
seq1 = seq1.split("\n")
142+
seq2 = seq2.split("\n")
143+
140144
seqMatcher.set_seq1(seq1)
141145
seqMatcher.set_seq2(seq2)
142146

143-
ratio = round(seqMatcher.quick_ratio(), 3)
147+
ratio = round(seqMatcher.quick_ratio() if not kb.heavilyDynamic else seqMatcher.ratio(), 3)
144148

145149
# If the url is stable and we did not set yet the match ratio and the
146150
# current injected value changes the url page content

txt/checksum.md5

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ c8c386d644d57c659d74542f5f57f632 lib/core/patch.py
5050
0c3eef46bdbf87e29a3f95f90240d192 lib/core/replication.py
5151
a7db43859b61569b601b97f187dd31c5 lib/core/revision.py
5252
fcb74fcc9577523524659ec49e2e964b lib/core/session.py
53-
11c6b10e7e997c019a0837d1de1f23c0 lib/core/settings.py
53+
bdb6b2b1b842c4f5e2874fe3a199f648 lib/core/settings.py
5454
dd68a9d02fccb4fa1428b20e15b0db5d lib/core/shell.py
5555
a7edc9250d13af36ac0108f259859c19 lib/core/subprocessng.py
5656
815d1cf27f0f8738d81531e73149867d lib/core/target.py
@@ -71,7 +71,7 @@ f2af274126ce0a789027d35d367f2b9e lib/parse/payloads.py
7171
492654567e72b6a14584651fcd9f16e6 lib/parse/sitemap.py
7272
30eed3a92a04ed2c29770e1b10d39dc0 lib/request/basicauthhandler.py
7373
2b81435f5a7519298c15c724e3194a0d lib/request/basic.py
74-
c0cabedead14b8a23353b606672cff42 lib/request/comparison.py
74+
859b6ad583e0ffba154f17ee179b5b89 lib/request/comparison.py
7575
e284905d23658b85e94a5dd37bfb80b2 lib/request/connect.py
7676
dd4598675027fae99f2e2475b05986da lib/request/direct.py
7777
2044fce3f4ffa268fcfaaf63241b1e64 lib/request/dns.py

0 commit comments

Comments
 (0)