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

Skip to content

Commit b6fbca0

Browse files
committed
Couple of trivial patches
1 parent 3ac1283 commit b6fbca0

4 files changed

Lines changed: 9 additions & 10 deletions

File tree

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from thirdparty.six import unichr as _unichr
1919

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

lib/request/inject.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,13 @@ def _goInference(payload, expression, charsetType=None, firstChar=None, lastChar
9090

9191
timeBasedCompare = (kb.technique in (PAYLOAD.TECHNIQUE.TIME, PAYLOAD.TECHNIQUE.STACKED))
9292

93+
if timeBasedCompare and conf.threads > 1 and kb.forceThreads is None:
94+
msg = "multi-threading is considered unsafe in "
95+
msg += "time-based data retrieval. Are you sure "
96+
msg += "of your choice (breaking warranty) [y/N] "
97+
98+
kb.forceThreads = readInput(msg, default='N', boolean=True)
99+
93100
if not (timeBasedCompare and kb.dnsTest):
94101
if (conf.eta or conf.threads > 1) and Backend.getIdentifiedDbms() and not re.search(r"(COUNT|LTRIM)\(", expression, re.I) and not (timeBasedCompare and not kb.forceThreads):
95102

lib/techniques/blind/inference.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
from lib.core.common import hashDBRetrieve
2727
from lib.core.common import hashDBWrite
2828
from lib.core.common import incrementCounter
29-
from lib.core.common import readInput
3029
from lib.core.common import safeStringFormat
3130
from lib.core.common import singleTimeWarnMessage
3231
from lib.core.data import conf
@@ -166,13 +165,6 @@ def bisection(payload, expression, length=None, charsetType=None, firstChar=None
166165
if showEta:
167166
progress = ProgressBar(maxValue=length)
168167

169-
if timeBasedCompare and conf.threads > 1 and kb.forceThreads is None:
170-
msg = "multi-threading is considered unsafe in "
171-
msg += "time-based data retrieval. Are you sure "
172-
msg += "of your choice (breaking warranty) [y/N] "
173-
174-
kb.forceThreads = readInput(msg, default='N', boolean=True)
175-
176168
if numThreads > 1:
177169
if not timeBasedCompare or kb.forceThreads:
178170
debugMsg = "starting %d thread%s" % (numThreads, ("s" if numThreads > 1 else ""))

lib/utils/search.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ def _search(dork):
132132
regex = DUCKDUCKGO_REGEX
133133

134134
try:
135-
req = _urllib.request.Request(url, data=data, headers=headers)
135+
req = _urllib.request.Request(url, data=data, headers=requestHeaders)
136136
conn = _urllib.request.urlopen(req)
137137

138138
requestMsg = "HTTP request:\nGET %s" % url

0 commit comments

Comments
 (0)