diff options
author | Michael Weiser <michael.weiser@gmx.de> | 2018-11-13 09:44:18 +0000 |
---|---|---|
committer | Michael Weiser <michael.weiser@gmx.de> | 2018-11-13 16:23:55 +0000 |
commit | 4bcfa51e7d8c8f3740c7b353d7e1be888dd0bea6 (patch) | |
tree | cd7fb0bb10adfd30797e700ad70bb35a2c9b3a65 | |
parent | dc51374148de17036e9c3c8857b2a418dfad2f3e (diff) |
Add debug option to file scan
Add a debug option to scan_file.py to show the actual request sent and
potentially additional diagnostics in the future.
-rwxr-xr-x | bin/scan_file.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/bin/scan_file.py b/bin/scan_file.py index cf11577..b2cc4f2 100755 --- a/bin/scan_file.py +++ b/bin/scan_file.py @@ -45,6 +45,8 @@ def main(): help='List results of all files not only bad ones') parser.add_argument('-vv', '--verbose2', action='store_true', required=False, help='List detailed analysis results of every rule') + parser.add_argument('-d', '--debug', action='store_true', required=False, + help='Output additional diagnostics') parser.add_argument('-s', '--socket_file', action='store', required=True, help='Path to Peekaboo\'s socket file') parser.add_argument('-f', '--filename', action='store', required=True, @@ -57,6 +59,8 @@ def main(): peekaboo = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) peekaboo.connect(args.socket_file) request = '[ { "full_name": "%s" } ]' % file_abspath + if args.debug: + print ('Sending request: %s' % request) peekaboo.send(request) print ('Waiting for response...') |