]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
suricatasc: Don't process empty cmds
authorShivani Bhardwaj <shivani@oisf.net>
Fri, 23 Jun 2023 06:38:25 +0000 (12:08 +0530)
committerVictor Julien <vjulien@oisf.net>
Mon, 3 Jul 2023 15:54:42 +0000 (17:54 +0200)
(cherry picked from commit 6b3dbaa2f257a82171e14cd9a64bc3aaac006501)

python/suricata/sc/suricatasc.py

index f5af664e2b70bb94af0c21a397006235e71028a7..8263276d92d17a75adce6df90e938f7bf9e8302c 100644 (file)
@@ -256,6 +256,8 @@ class SuricataSC:
                     command = input(">>> ").strip()
                 if command == "quit":
                     break
+                if len(command.strip()) == 0:
+                    continue
                 try:
                     cmd, arguments = self.parse_command(command)
                 except SuricataCommandException as err: