Skip to content

AI-powered penetration testing assistant using local LLM on linux (Parrot OS)

Python

added pdf,html export option while viewing ,fix: replace duckduckgo_search with ddgs package + added gitignore

sooryathejasa97643a5af9d
diff --git a/db.py b/db.py
index 0a8d138..df621ca 100644
--- a/db.py
+++ b/db.py
@@ -69,15 +69,18 @@ def save_fix(sl_no: int, vuln_id: int, fix_text: str, source: str = "ai"):
conn.close()
-def save_exploit(sl_no: int, exploit_name: str, tool_used: str,
- payload: str, result: str, notes: str):
- """Insert an exploit attempt."""
+def save_exploit(sl_no, exploit_name, tool_used, payload, result, notes):
conn = get_connection()
c = conn.cursor()
c.execute("""
INSERT INTO exploits_attempted (sl_no, exploit_name, tool_used, payload, result, notes)
VALUES (%s, %s, %s, %s, %s, %s)
- """, (sl_no, exploit_name, tool_used, payload, result, notes))
+ """, (sl_no,
+ str(exploit_name or "")[:500],
+ str(tool_used or "")[:200],
+ str(payload or ""),
+ str(result or "")[:500],
+ str(notes or "")))
conn.commit()
conn.close()