Updating different scripts related to the issue #21

This commit is contained in:
Félix Aime
2020-12-18 14:57:52 +01:00
parent 9fd360d3a5
commit ea53de887d
7 changed files with 33 additions and 27 deletions

View File

@ -28,8 +28,8 @@ class SuricataEngine():
# Generate the rule file an launch suricata.
if self.generate_rule_file():
sp.Popen("suricata -S {} -r {} -l /tmp/".format(self.rules_file,
self.pcap_path), shell=True).wait()
sp.Popen(["suricata", "-S", self.rules_file, "-r",
self.pcap_path, "-l", "/tmp/"]).wait()
# Let's parse the log file.
for line in open("/tmp/fast.log", "r").readlines():