forked from laramies/theHarvester
-
Notifications
You must be signed in to change notification settings - Fork 0
/
restfulHarvest.py
executable file
·43 lines (39 loc) · 948 Bytes
/
restfulHarvest.py
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
36
37
38
39
40
41
42
43
#!/usr/bin/env python3
import argparse
import uvicorn
parser = argparse.ArgumentParser()
parser.add_argument(
"-H",
"--host",
default="127.0.0.1",
help="IP address to listen on default is 127.0.0.1",
)
parser.add_argument(
"-p",
"--port",
default=5000,
help="Port to bind the web server to, default is 5000",
type=int,
)
parser.add_argument(
"-l",
"--log-level",
default="info",
help="Set logging level, default is info but [critical|error|warning|info|debug|trace] can be set",
)
parser.add_argument(
"-r",
"--reload",
default=False,
help="Enable automatic reload used during development of the api",
action="store_true",
)
args: argparse.Namespace = parser.parse_args()
if __name__ == "__main__":
uvicorn.run(
"theHarvester.lib.api.api:app",
host=args.host,
port=args.port,
log_level=args.log_level,
reload=args.reload,
)