mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-07 13:11:29 +00:00
minor fix to previous commit
This commit is contained in:
@@ -140,6 +140,7 @@ def liveTest():
|
|||||||
switches = dict(global_)
|
switches = dict(global_)
|
||||||
value = ""
|
value = ""
|
||||||
vulnerable = True
|
vulnerable = True
|
||||||
|
result = None
|
||||||
|
|
||||||
if case.hasAttribute("name"):
|
if case.hasAttribute("name"):
|
||||||
name = case.getAttribute("name")
|
name = case.getAttribute("name")
|
||||||
@@ -167,14 +168,14 @@ def liveTest():
|
|||||||
logger.info(msg)
|
logger.info(msg)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
runCase(switches, parse)
|
result = runCase(switches, parse)
|
||||||
except SqlmapNotVulnerableException:
|
except SqlmapNotVulnerableException:
|
||||||
vulnerable = False
|
vulnerable = False
|
||||||
|
|
||||||
test_case_fd = codecs.open(os.path.join(paths.SQLMAP_OUTPUT_PATH, "test_case"), "wb", UNICODE_ENCODING)
|
test_case_fd = codecs.open(os.path.join(paths.SQLMAP_OUTPUT_PATH, "test_case"), "wb", UNICODE_ENCODING)
|
||||||
test_case_fd.write("%s\n" % name)
|
test_case_fd.write("%s\n" % name)
|
||||||
|
|
||||||
if result:
|
if result is True:
|
||||||
logger.info("test passed")
|
logger.info("test passed")
|
||||||
cleanCase()
|
cleanCase()
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user