forked from rfunix/Pompem
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pompem.py
executable file
·91 lines (76 loc) · 2.91 KB
/
pompem.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# -*- coding: utf-8 -*-
import sys
sys.path.insert(0, '..')
import optparse
from engine.update import UpdateVersion
from engine.exec_and_print import execute
def main():
parser = optparse.OptionParser(add_help_option=False)
parser.add_option("-s", "--search", dest="keywords", type="string",
help="text for search",)
parser.add_option("--txt", dest="fileText", \
action="store_true", help="enter the file name",)
parser.add_option("--html", dest="fileHtml", action="store_true", \
help="enter the file name",)
parser.add_option("--update",
action="store_true", dest="update",
help="upgrade to latest version")
parser.add_option("-g","--get",
action="store_true", dest="get",
help="Download Exploits")
parser.add_option("-h", "--help",
action="store_true", dest="help", help="-h")
(options, args) = parser.parse_args()
args_parameters = {}
keywords = options.keywords
fileText = options.fileText
fileHtml = options.fileHtml
update = options.update
get = options.get
help = options.help
if help:
print_help_message()
return
#keywords = "ssh"
if (update):
u = UpdateVersion()
u.update() #Update from github
return
if (get):
args_parameters["get"] = True
if(keywords):
keywordsformated = str(keywords).split(",")
if fileText:
args_parameters["fileText"] = fileText
if fileHtml:
args_parameters["fileHtml"] = fileHtml
if keywordsformated:
args_parameters["keywordsformated"] = keywordsformated
args_parameters["keywords"] = keywords
execute(**args_parameters)
else:
basic_info()
return
def print_help_message():
print """
Options:
-h, --help show this help message and exit
-s, --search <keyword,keyword,keyword> text for search
--txt Write txt File
--html Write html File
--update upgrade to latest version
-g, --get Download exploit files
"""
def basic_info():
print """
Pompem - Exploit Finder | Developed by Relax Lab
\n Rafael Francischini (Programmer and Ethical Hacker) - @rfunix\n
Bruno Fraga (Security Researcher) - @brunofraga_net\n
Usage: pompem.py [-s/--search <keyword,keyword,keyword,...>]
[--txt Write txt file ]
[--html Write html file ]
[-g/--get Download exploit files ]
\n Get basic options and Help, use: -h\--help
"""
if __name__ == "__main__":
main()