forked from tophant-ai/osprey
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathosprey.py
More file actions
35 lines (27 loc) · 695 Bytes
/
osprey.py
File metadata and controls
35 lines (27 loc) · 695 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import os
import signal
from gevent import monkey
monkey.patch_all()
from core.PocManager import PoCManager
from lib.core.cmdparser import cmdline_parse
from lib.log import logger as log
from lib.core.prepare import prepare
def main():
init_signal()
options, args = cmdline_parse()
fb = prepare(options)
start(fb)
def init_signal():
os.setpgrp()
signal.signal(
signal.SIGTERM,
lambda *_: os.kill(0, signal.SIGKILL))
def start(fb):
poc_manager = PoCManager(fb)
results = poc_manager.run()
if fb.console:
return results if results else None
else:
if results: log.result(results)
if __name__ == "__main__":
main()