-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathhank.py
35 lines (27 loc) · 914 Bytes
/
hank.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
from optparse import OptionParser
from libs.search_engine import Search_Engine,banner,usage
from libs.sites import Binoculars
# Get terminal arguments
def resolve_options():
parser = OptionParser()
parser.set_conflict_handler("resolve")
parser.add_option("-u", "--username",dest="user_name")
parser.add_option("-r", "--real-name",dest="real_name")
parser.add_option("-c", "--count",dest="count")
parser.add_option("-h", "--help", dest="help", action="store_true")
(options, args) = parser.parse_args()
# Check for parameter presence
if options.user_name and options.real_name:
return options
else:
usage()
# Entry of program
if __name__ == "__main__":
print(banner)
OPTIONS = resolve_options()
# Username lookup
bino = Binoculars(OPTIONS)
bino.run()
# Search engine looup
se = Search_Engine(OPTIONS)
se.clean_and_run()