Legion GIT: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Die Seite wurde neu angelegt: „Du hast recht, **Legion muss als Root ausgeführt werden**, sonst funktioniert es nicht richtig. Ich nehme das „optional“ raus und korrigiere die Anleitung…“ |
|||
| (4 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
| Zeile 1: | Zeile 1: | ||
= Legion unter Kali Linux installieren und starten = | = Legion unter Kali Linux installieren und starten = | ||
== | == System aktualisieren == | ||
*apt update && apt upgrade -y | *apt update && apt upgrade -y | ||
== | == Abhängigkeiten installieren == | ||
*apt install python3-pip python3-gi gir1.2-gtk-3.0 nmap xsltproc -y | *apt install python3-pip python3-gi gir1.2-gtk-3.0 nmap xsltproc -y | ||
== | == Legion von GitHub klonen == | ||
*git clone https://github.com/ | *git clone https://github.com/hackman238/legion | ||
*cd legion | *cd legion | ||
== | == Virtuelle Umgebung erstellen und aktivieren == | ||
*python3 -m venv venv | *python3 -m venv venv | ||
*source venv/bin/activate | *source venv/bin/activate | ||
== | == Abhängigkeiten installieren == | ||
*pip install -r requirements.txt | *pip install -r requirements.txt | ||
== | == Legion als Root starten == | ||
*sudo -s | *sudo -s | ||
*cd legion | *cd legion | ||
*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 | |||
==Quelle== | |||
*https://github.com/Abacus-Group-RTO/legion/issues/247 | |||
Aktuelle Version vom 10. Februar 2025, 12:04 Uhr
Legion unter Kali Linux installieren und starten
System aktualisieren
- apt update && apt upgrade -y
Abhängigkeiten installieren
- apt install python3-pip python3-gi gir1.2-gtk-3.0 nmap xsltproc -y
Legion von GitHub klonen
- git clone https://github.com/hackman238/legion
- cd legion
Virtuelle Umgebung erstellen und aktivieren
- python3 -m venv venv
- source venv/bin/activate
Abhängigkeiten installieren
- pip install -r requirements.txt
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