mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-01-18 06:19:10 +03:00
Fix undefined variable in parse_results
Co-authored-by: GilbertKrantz <90319182+GilbertKrantz@users.noreply.github.com>
This commit is contained in:
parent
41b4c3011f
commit
0d22b027f4
|
|
@ -119,6 +119,7 @@ class SQLMapCLI:
|
||||||
if "sqlmap identified the following injection point" in output:
|
if "sqlmap identified the following injection point" in output:
|
||||||
# Extract injection details
|
# Extract injection details
|
||||||
lines = output.split('\n')
|
lines = output.split('\n')
|
||||||
|
param = None # Initialize to avoid undefined reference
|
||||||
for i, line in enumerate(lines):
|
for i, line in enumerate(lines):
|
||||||
if "Parameter:" in line:
|
if "Parameter:" in line:
|
||||||
param = line.split("Parameter:")[1].strip()
|
param = line.split("Parameter:")[1].strip()
|
||||||
|
|
@ -127,7 +128,7 @@ class SQLMapCLI:
|
||||||
if i + 1 < len(lines) and "Title:" in lines[i + 1]:
|
if i + 1 < len(lines) and "Title:" in lines[i + 1]:
|
||||||
title = lines[i + 1].split("Title:")[1].strip()
|
title = lines[i + 1].split("Title:")[1].strip()
|
||||||
vulns.append({
|
vulns.append({
|
||||||
'parameter': param if 'param' in locals() else 'Unknown',
|
'parameter': param if param is not None else 'Unknown',
|
||||||
'type': vuln_type,
|
'type': vuln_type,
|
||||||
'title': title
|
'title': title
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user