Legion GIT: Unterschied zwischen den Versionen

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen
 
Zeile 36: Zeile 36:
 
                           if not scr.output == '' and scr.output != None:
 
                           if not scr.output == '' and scr.output != None:
 
                               db_script.output = scr.output
 
                               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

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

Quelle