summaryrefslogtreecommitdiff
path: root/manual-scan
diff options
context:
space:
mode:
authorEvgeny Zinoviev <me@ch1p.io>2021-06-06 01:37:50 +0300
committerEvgeny Zinoviev <me@ch1p.io>2021-06-06 01:37:50 +0300
commit7c1494cd502e1a99f96f27b12ddf23a84de188b5 (patch)
tree0a236d75fa14ed9176d8013a0b4c00d8ea64cb86 /manual-scan
parentfe07ea26f41be1eda6f8cccc591a5165dd3fb135 (diff)
refactor code, add manual-scan script
Diffstat (limited to 'manual-scan')
-rwxr-xr-xmanual-scan27
1 files changed, 27 insertions, 0 deletions
diff --git a/manual-scan b/manual-scan
new file mode 100755
index 0000000..3318ae1
--- /dev/null
+++ b/manual-scan
@@ -0,0 +1,27 @@
+#!/usr/bin/env python3
+import logging
+
+from argparse import ArgumentParser
+from lib.worker import Worker
+from lib.results import Results
+
+
+if __name__ == '__main__':
+ parser = ArgumentParser()
+ parser.add_argument('--host', type=str, required=True)
+ parser.add_argument('--threads', type=int, default=200)
+ parser.add_argument('--timeout', type=int, default=5)
+ parser.add_argument('--verbose', action='store_true')
+ args = parser.parse_args()
+
+ logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
+ level=(logging.DEBUG if args.verbose else logging.INFO))
+
+ results = Results()
+ worker = Worker(args.host, args.host, [],
+ concurrency=args.threads,
+ timeout=args.timeout)
+ worker.start()
+ worker.join()
+
+ results.add(worker) \ No newline at end of file