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

Skip to content

Commit f33bf06

Browse files
committed
Merge branch 'master' of github.com:sqlmapproject/sqlmap
2 parents 6005046 + 6dfe911 commit f33bf06

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

lib/core/testing.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def liveTest():
135135
vars_[child.tagName] = randomStr(6) if var == "random" else var
136136

137137
for case in livetests.getElementsByTagName("case"):
138-
console_output = False
138+
parse_from_console_output = False
139139
count += 1
140140
name = None
141141
parse = []
@@ -162,9 +162,9 @@ def liveTest():
162162
value = replaceVars(item.getAttribute("value"), vars_)
163163

164164
if item.hasAttribute("console_output"):
165-
console_output = bool(item.getAttribute("console_output"))
165+
parse_from_console_output = bool(item.getAttribute("console_output"))
166166

167-
parse.append((value, console_output))
167+
parse.append((value, parse_from_console_output))
168168

169169
msg = "running live test case: %s (%d/%d)" % (name, count, length)
170170
logger.info(msg)
@@ -292,8 +292,8 @@ def runCase(switches=None, parse=None):
292292
with codecs.open(conf.dumper.getOutputFile(), "rb", UNICODE_ENCODING) as f:
293293
content = f.read()
294294

295-
for item, console_output in parse:
296-
parse_on = console if console_output else content
295+
for item, parse_from_console_output in parse:
296+
parse_on = console if parse_from_console_output else content
297297

298298
if item.startswith("r'") and item.endswith("'"):
299299
if not re.search(item[2:-1], parse_on, re.DOTALL):

xml/livetests.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3110,7 +3110,7 @@
31103110
<answers value="do you want to overwrite it=Y"/>
31113111
</switches>
31123112
<parse>
3113-
<item value="the local file /etc/passwd and the remote file /tmp/passwd-${random} have the same size" console_output="True"/>
3113+
<item value="the local file /etc/passwd and the remote file /tmp/passwd-${random} has the same size" console_output="True"/>
31143114
</parse>
31153115
</case>
31163116
<!-- End of file system access switches -->
@@ -3399,7 +3399,7 @@
33993399
</switches>
34003400
<parse>
34013401
<item value="banner: '5.1.66-0+squeeze1'"/>
3402-
<item value="r'100% \[===.+=\] 17/17 ETA 00:00'" console_output="True"/>
3402+
<item value="r'100\% \[===.+=\] 17\/17'" console_output="True"/>
34033403
</parse>
34043404
</case>
34053405
<case name="Multiple parameters">

0 commit comments

Comments
 (0)