-
Notifications
You must be signed in to change notification settings - Fork 7
/
Auxiliator.py
59 lines (59 loc) · 2.24 KB
/
Auxiliator.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
import telebot
import modules.exploitsearch as exploitsearch
import modules.wafmeow as wafmeow
import modules.scanner as scanner
import modules.censys as censys
bot = telebot.TeleBot("YOUR_TOKEN")
def extract_arg(arg):
return arg.split()[1:]
@bot.message_handler(commands=['searchbyip'])
def searchbyip(message):
try:
IP=extract_arg(message.text)[0]
info="\n".join(censys.SearchByIp(IP))
bot.send_message(message.chat.id, info)
except:
bot.send_message(message.chat.id, "Error!")
@bot.message_handler(commands=['searchbydomain'])
def searchbydomain(message):
try:
domain=extract_arg(message.text)[0]
info="\n".join(censys.SearchByDomain(domain))
bot.send_message(message.chat.id, info)
except:
bot.send_message(message.chat.id, "Error!")
@bot.message_handler(commands=['scan'])
def scan(message):
try:
target=extract_arg(message.text)[0]
bot.send_message(message.chat.id, "Scanning Started!")
openedports=scanner.portscan(target)
info="\n".join(str(port) for port in openedports)
bot.send_message(message.chat.id, "Opened Ports\n"+info)
except:
bot.send_message(message.chat.id, "Error!")
@bot.message_handler(commands=['waf'])
def waf(message):
try:
target=extract_arg(message.text)[0]
if("https" in target):
firewall=wafmeow.wafsearch(target.replace("https://", ""), "https://")
bot.send_message(message.chat.id, firewall)
if("http" in target):
firewall=wafmeow.wafsearch(target.replace("http://", ""), "http://")
bot.send_message(message.chat.id, firewall)
else:
bot.send_message(message.chat.id, "No scheme is provided, use either http or https!")
except:
bot.send_message(message.chat.id, "Error!")
@bot.message_handler(commands=['searchsploit'])
def searchsploit(message):
try:
query=" ".join(extract_arg(message.text))
print(query)
info=exploitsearch.searchsploit(query)
for exploit in info:
bot.send_message(message.chat.id, exploit+": "+info[exploit])
except:
bot.send_message(message.chat.id, "Error!")
bot.polling()