Mein Code zu erhalten versuchen sollte aufzuspüren ein Paket mit scapy schnupperte und prüfen, welches Programm gesendet/das Paket empfangen hat, setzen Sie „Unbekannt“, wenn das Programm nichtPython - Fehler bei der Ausgabe von check_output
gefundenCode:
source_software = check_output(["netstat", "-nb"], shell = True).decode()
source_software = source_software[source_software.find(str(packet_dictionary["Port"])) : ]
source_software = source_software[source_software.find("\n") + 2 : source_software.find("]")]
if "Can not" not in source_software and len(source_software) > MINIMUM_LENGTH:
packet_dictionary["Software"] = source_software
else:
packet_dictionary["Software"] = "Unknown"
Fehler:
File "Client.py", line 44, in add_to_list
source_software = check_output(["netstat", "-nb"], shell = True).decode()
File "C:\Python36\lib\subprocess.py", line 336, in check_output
**kwargs).stdout
File "C:\Python36\lib\subprocess.py", line 418, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['netstat', '-nb']' returned non-zero
exit status 1.
Ich habe es vergessen, codierte ich dieses Stück Code vor ein paar Wochen und bin heute wieder reingekommen, habe vergessen, dass ich es als Administrator laufen lassen muss – NeXoR