Legion GIT: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
| Zeile 23: | Zeile 23: | ||
*source venv/bin/activate | *source venv/bin/activate | ||
*python3 legion.py | *python3 legion.py | ||
| + | == Fix == | ||
| + | |||
| + | I fixed this issue by modifying /usr/share/legion/app/importers/NmapImporter.py at line 330. | ||
| + | |||
| + | for scr in p.getScripts(): | ||
| + | db_script = session.query(l1ScriptObj).filter_by(scriptId=scr.scriptId) \ | ||
| + | .filter_by(portId=db_port.id).first() | ||
| + | |||
| + | + if not db_script: | ||
| + | + db_script = l1ScriptObj(scr.scriptId, scr.output, db_port.id, db_host.id) | ||
| + | + | ||
| + | if not scr.output == '' and scr.output != None: | ||
| + | db_script.output = scr.output | ||
Version vom 8. Februar 2025, 22:01 Uhr
Legion unter Kali Linux installieren und starten
Schritt 1: System aktualisieren
- apt update && apt upgrade -y
Schritt 2: Abhängigkeiten installieren
- apt install python3-pip python3-gi gir1.2-gtk-3.0 nmap xsltproc -y
Schritt 3: Legion von GitHub klonen
- git clone https://github.com/hackman238/legion
- cd legion
Schritt 4: Virtuelle Umgebung erstellen und aktivieren
- python3 -m venv venv
- source venv/bin/activate
Schritt 5: Abhängigkeiten installieren
- pip install -r requirements.txt
Schritt 6: Legion als Root starten
- sudo -s
- cd legion
- source venv/bin/activate
- python3 legion.py
Fix
I fixed this issue by modifying /usr/share/legion/app/importers/NmapImporter.py at line 330.
for scr in p.getScripts():
db_script = session.query(l1ScriptObj).filter_by(scriptId=scr.scriptId) \
.filter_by(portId=db_port.id).first()
+ if not db_script:
+ db_script = l1ScriptObj(scr.scriptId, scr.output, db_port.id, db_host.id)
+
if not scr.output == and scr.output != None:
db_script.output = scr.output