]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
suricatasc: remove "u" prefix when printing JSON output.
authorAlexander Gozman <a.gozman@securitycode.ru>
Tue, 16 Jun 2015 15:12:01 +0000 (18:12 +0300)
committerVictor Julien <victor@inliniac.net>
Wed, 8 Jul 2015 14:05:13 +0000 (16:05 +0200)
If we want to parse suricatasc's output, python's unicode prefix
should be removed to make JSON parsers happy.

scripts/suricatasc/suricatasc.in

index 4b44204bcf500ba577f3d1838c4f652579f00506..6c33ba3237d9b1d8d1a740cef2bbe5ab265a288d 100755 (executable)
@@ -42,7 +42,7 @@ except SuricataReturnException as err:
 if args.command:
     (command, arguments) = sc.parse_command(args.command)
     res = sc.send_command(command, arguments)
-    print(res)
+    print(json.dumps(res))
     sc.close()
     if res['return'] == 'OK':
         sys.exit(0)