/
exploitation.py
255 lines (253 loc) 路 11 KB
/
exploitation.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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
import os
from lockdoors import main
from lockdoors import sanitize
from lockdoors import shrts
import sys
from pathlib import Path
from datetime import datetime
from time import sleep
#VAR
yes = set(['yes', 'y', 'ye', 'Y'])
no = set(['no', 'n', 'nop', 'N'])
cwd = os.getcwd()
null = ""
###Cheatsheets
def expsh():
shrts.clscprilo()
print("\033[91mHere is the list of the files :\033[90m")
print("\033[92m")
os.system(" find " + shrts.getinstalldir() + "/EXPLOITATION/CHEATSHEETS/ -type f")
print("\033[90m")
shrts.okex()
##TOOLS
def Findsploit():
Findsploit.title = "Findsploit : Find exploits in local and online databases instantly"
tool_dir = "/EXPLOITATION/Tools/Findsploit"
if os.path.exists('/usr/local/bin/Findsploit'):
shrts.prilogspc()
os.system("git clone https://github.com/1N3/Findsploit.git " + shrts.getinstalldir() + tool_dir + null)
shrts.prilogspc()
print("\033[92m " + Findsploit.title + "\033[90m")
shrts.spc()
ans = sanitize.bash_escape_restrictor(input("\033[92mWhat exploits are you looking ? : \033[90m"))
os.system("Findsploit " + ans)
shrts.okex()
else:
shrts.prilogspc()
print("\033[92m " + Findsploit.title + "\033[90m")
shrts.spc()
print("\033[91mDownloading ...\033[0m")
shrts.spc()
os.system("git clone https://github.com/1N3/Findsploit.git " + shrts.getinstalldir() + tool_dir + null)
shrts.prilogspc()
print("\033[92m " + Findsploit.title + "\033[90m")
shrts.spc()
shrts.prilogspc()
print("\033[91mInstalling ...\033[0m.")
os.system("cd " + shrts.getinstalldir() + tool_dir + " && pip3 install -r " + shrts.getinstalldir() + tool_dir + "/requirements.txt" + null)
os.system("sh " + shrts.getinstalldir() + tool_dir + "/install.sh")
os.system("ln -s /usr/bin/findsploit /usr/local/bin/Findsploit")
shrts.spc()
print("You can now use " + "\033[91m" + Findsploit.title + "\033[90m" + " from Lockdoor [\033[92m Lockdoor \033[90m ]" )
shrts.okex()
def Pompem():
Pompem.title = "Pompem : an Exploit and Vulnerability Finder"
tool_dir = "/EXPLOITATION/Tools/Pompem"
if os.path.exists('/usr/local/bin/Pompem'):
shrts.prilogspc()
os.system("git clone https://github.com/rfunix/Pompem.git " + shrts.getinstalldir() + tool_dir + null)
shrts.prilogspc()
print("\033[92m " + Pompem.title + "\033[90m")
shrts.spc()
ans = sanitize.bash_escape_restrictor(input("\033[92mWhat exploits are you looking ? : \033[90m"))
os.system("python3 " + shrts.getinstalldir() + tool_dir + "/pompem.py -s " + ans)
shrts.spc()
shrts.okex()
else:
shrts.prilogspc()
print("\033[92m " + Pompem.title + "\033[90m")
shrts.spc()
print("\033[91mDownloading ...\033[0m")
shrts.spc()
os.system("git clone https://github.com/rfunix/Pompem.git " + shrts.getinstalldir() + tool_dir + null)
shrts.prilogspc()
print("\033[92m " + Pompem.title + "\033[90m")
shrts.spc()
shrts.prilogspc()
print("\033[91mInstalling ...\033[0m.")
shrts.spc()
os.system("cd " + shrts.getinstalldir() + tool_dir + " && pip3 install -r " + shrts.getinstalldir() + tool_dir + "/requirements.txt" + null)
os.system("""echo "#!/bin/bash" > /usr/local/bin/Pompem""")
os.system("""echo "#Dev : Sofiane Hamlaoui" >> /usr/local/bin/Pompem""")
os.system("echo python3 " + shrts.getinstalldir() + tool_dir + "/pompem.py >> /usr/local/bin/Pompem")
os.system("chmod +x /usr/local/bin/Pompem")
print(("You can now use " + "\033[91m" + Pompem.title + "\033[90m" + " from Lockdoor [\033[92m Lockdoor \033[90m ]" ))
shrts.spc()
shrts.okex()
def rfix():
rfix.title = "Rfix : Python tool that helps RFI exploitation."
tool_dir = "/EXPLOITATION/Tools//rfix"
if os.path.exists('/usr/local/bin/rfix'):
shrts.prilogspc()
os.system("git clone https://github.com/joaogmauricio/rfix.git " + shrts.getinstalldir() + tool_dir + null)
shrts.prilogspc()
print("\033[92m " + rfix.title + "\033[90m")
shrts.spc()
print("\033[92m Usage: rfix target_url payload_path. \033[90m")
shrts.spc()
print("Example: rfix http://target_host/index.php?flawed_param= php.txt ")
shrts.spc()
target = sanitize.bash_escape_restrictor(input("\033[92m Choose a Target : \033[90m"))
payload = sanitize.bash_escape_restrictor(input("\033[92m Choose the payload path : \033[90m"))
os.system("python2 " + shrts.getinstalldir() + tool_dir + "/rfix.py " + target + " " + payload)
shrts.spc()
shrts.okex()
else:
shrts.prilogspc()
print("\033[92m " + rfix.title + "\033[90m")
shrts.spc()
print("\033[91mDownloading ...\033[0m")
shrts.spc()
os.system("git clone https://github.com/joaogmauricio/rfix.git " + shrts.getinstalldir() + tool_dir + null)
shrts.prilogspc()
print("\033[92m " + rfix.title + "\033[90m")
shrts.spc()
shrts.prilogspc()
print("\033[91mInstalling ...\033[0m.")
shrts.spc()
os.system("""echo "#!/bin/bash" > /usr/local/bin/rfix""")
os.system("""echo "#Dev : Sofiane Hamlaoui" >> /usr/local/bin/rfix""")
os.system("echo python3 " + shrts.getinstalldir() + tool_dir + "/rfix.py >> /usr/local/bin/rfix")
os.system("chmod +x /usr/local/bin/rfix")
print(("You can now use " + "\033[91m" + rfix.title + "\033[90m" + " from Lockdoor [\033[92m Lockdoor \033[90m ]" ))
shrts.spc()
shrts.okex()
def inurlbr():
inurlbr.title = "inurlbr : Python tool that helps RFI exploitation."
tool_dir = "/EXPLOITATION/Tools/inurlbr"
if os.path.exists('/usr/local/bin/inurlbr'):
shrts.prilogspc()
os.system("git clone https://github.com/googleinurl/SCANNER-INURLBR.git " + shrts.getinstalldir() + tool_dir + null)
shrts.prilogspc()
print("\033[92m " + inurlbr.title + "\033[90m")
shrts.spc()
print("type : inurlbr --help for more options ")
shrts.spc()
print("Cheatsheets that can help you with this :")
shrts.spc()
print("\033[92m" + shrts.getinstalldir() + '/Google FU.pdf \033[92m')
print("\033[92m" + shrts.getinstalldir() + '/GHDB.pdf \033[92m')
shrts.spc()
dork = input("\033[92m Choose a Dork : \033[90m")
savefile = sanitize.bash_escape_restrictor(input("\033[92m output file ? (Ex : results.txt) : \033[90m"))
os.system("php " + shrts.getinstalldir() + tool_dir + "/inurlbr.php --dork " + dork + " -s " + savefile)
shrts.okex()
else:
shrts.prilogspc()
print("\033[92m " + inurlbr.title + "\033[90m")
shrts.spc()
print("\033[91mDownloading ...\033[0m")
shrts.spc()
os.system("git clone https://github.com/googleinurl/SCANNER-INURLBR.git " + shrts.getinstalldir() + tool_dir + null)
shrts.prilogspc()
print("\033[92m " + inurlbr.title + "\033[90m")
shrts.spc()
shrts.prilogspc()
print("\033[91mInstalling ...\033[0m.")
shrts.spc()
os.system("""echo "#!/bin/bash" > /usr/local/bin/inurlbr""")
os.system("""echo "#Dev : Sofiane Hamlaoui" >> /usr/local/bin/inurlbr""")
os.system("echo php " + shrts.getinstalldir() + tool_dir + "/inurlbr.php >> /usr/local/bin/inurlbr")
os.system("chmod +x /usr/local/bin/inurlbr")
print(("You can now use " + "\033[91m" + inurlbr.title + "\033[90m" + " from Lockdoor [\033[92m Lockdoor \033[90m ]" ))
shrts.okex()
def burp():
burp.title = "BurpSuite : Web vulnerability scanner."
tool_dir = "/EXPLOITATION/Tools/burp"
if os.path.exists('/usr/local/bin/burp'):
shrts.prilogspc()
shrts.prilogspc()
print("\033[92m " + burp.title + "\033[90m")
shrts.spc()
os.system("burpsuite")
shrts.okex()
else:
shrts.prilogspc()
print("\033[92m " + burp.title + "\033[90m")
shrts.spc()
print("\033[91mDownloading ...\033[0m")
shrts.spc()
os.system("mkdir " + shrts.getinstalldir() + tool_dir)
os.system("wget -O " + shrts.getinstalldir() + tool_dir + "/burp.jar https://portswigger.net/DownloadUpdate.ashx\?Product\=Free")
shrts.prilogspc()
print("\033[92m " + burp.title + "\033[90m")
shrts.spc()
shrts.prilogspc()
print("\033[91mInstalling ...\033[0m.")
shrts.spc()
os.system("""echo "#!/bin/bash" > /usr/local/bin/burp""")
os.system("""echo "#Dev : Sofiane Hamlaoui" >> /usr/local/bin/burp""")
os.system("echo java -jar " + shrts.getinstalldir() + tool_dir + "/burp.jar >> /usr/local/bin/burp")
os.system("chmod +x /usr/local/bin/burp")
print(("You can now use " + "\033[91m" + burp.title + "\033[90m" + " from Lockdoor [\033[92m Lockdoor \033[90m ]" ))
shrts.okex()
# More :
def linexpsug():
linexpsug.title = "linux-exploit-suggester2 : A perl Linux exploit suggester script"
tool_dir = "/EXPLOITATION/linux-exploit-suggester"
shrts.prilogspc()
os.system("git clone https://github.com/jondonas/linux-exploit-suggester-2.git " + shrts.getinstalldir() + tool_dir + null)
shrts.clscprilo()
print("\033[92m linux-exploit-suggester2 Downlaoded successfully \033[90m")
shrts.spc()
print("\033[92m Check " + shrts.getinstalldir() + tool_dir +" Folder\033[90m")
shrts.okex()
###Menu
def menu():
shrts.clscprilo()
print("""\033[94m
[ EXPLOITATION ]
Make A Choice :\033[90m
\033[91m -[!]----- Tools ------[!]-\033[90m
\033[93m1) Findsploit
2) Pompem
3) rFix
4) Inurlbr
5) BurpSuite
6) Linux exploit suggester2\033[90m
\033[91m -[!]----- Cheatsheets ------[!]-\033[90m
\033[93m7) Exploitation Cheatsheets\033[90m
------------------------
\033[94mb) Back to ROOT MENU
q) Leave Lockdoor\033[90m
""")
choice = input("\033[92mLockdoor@Exploitation~# \033[0m")
os.system('clear')
if choice == "1":
Findsploit()
elif choice == "2":
Pompem()
elif choice == "3":
rfix()
elif choice == "4":
inurlbr()
elif choice == "5":
burp()
elif choice == "6":
linexpsug()
elif choice =="7":
expsh()
elif choice == "b":
main.menu()
elif choice == "q":
shrts.prilogspc()
now = datetime.now()
dt_string = now.strftime("%d/%m/%Y %H:%M:%S")
print(" \033[91m-[!]- LOCKDOOR IS EXITING -[!]-\033[0m")
shrts.spc()
print(" \033[91m-[!]- EXITING AT " + dt_string + " -[!]-\033[0m")
sys.exit()
elif choice == "":
menu()
else:
menu()