-
Notifications
You must be signed in to change notification settings - Fork 1
/
map.py
25 lines (20 loc) · 991 Bytes
/
map.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
# -*- coding:utf-8 -*-
import optparse
from core.request_handler import serve_forever
def main():
apiparser = optparse.OptionParser()
apiparser.add_option("-s", "--server", help="start server at 0.0.0.0", default=False, action="store_true")
apiparser.add_option("-p", "--port", help="specify server port", default=80, action="store", type="int")
apiparser.add_option("-c", "--cmd", help="start scan in command", default=False, action="store_true")
apiparser.add_option("-f", "--file", help="load ip from files", action="store")
apiparser.add_option("-z", "--zoomeye", help="load ip by searching ZoomEye with query string", action="store")
apiparser.add_option("-t", "--type", help="specify Poc file", action="store")
(args, _) = apiparser.parse_args()
if args.server is True:
serve_forever(args.port)
elif args.cmd is True:
print("under development")
else:
apiparser.print_help()
if __name__ == '__main__':
main()