-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathScrutin.py
executable file
·83 lines (73 loc) · 2.34 KB
/
Scrutin.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
#!bin/bash/python3
# -*- coding: utf-8 -*-
import time
from threading import Thread
from datetime import datetime
from zipfile import ZipFile
import subprocess
import sys
import telepot
from Handle import user_commands
from PyMyAdmin import Database as db
group_id = str(-1001166468779)
bot = telepot.Bot(sys.argv[1])
def add_group(idU,chatT,chatId):
bot.sendMessage(group_id,'`{}` Added me to the group `{}` : `{}`'.format(idU,chatT,chatId),parse_mode="Markdown")
db(chatId,chatT,idU).add_groups()
def del_group(idU,chatT,chatId):
bot.sendMessage(group_id,'`{}` Removed me from the group `{}` : `{}`'.format(idU,chatT,chatId),parse_mode="Markdown")
db(chatId,chatT,idU).remove_groups()
def check(func):
commands = (
'/start','/sql', '/xss',
'/lfi', '/bing', '/dork',
'/ch', '/help','$statist',
'/decrypt','/encrypt','/bkp',
'/file'
)
def inner(msg):
if msg.get('text'):
cmd = msg.get('text').split()[0].lower()
msg['command'] = {
'check': cmd in commands,
'cmd': cmd
}
try:
if msg['new_chat_participant']['username'] == 'ScrutinBot':
add_group(msg['from']['id'],str(msg['chat']['title']),str(msg['chat']['id']))
elif msg['left_chat_participant']['username'] == 'ScrutinBot':
del_group(msg['from']['id'],str(msg['chat']['title']),str(msg['chat']['id']))
except:
pass
func(msg)
return inner
@check
def control(msg):
try:
handle = user_commands(bot,msg)
user_command = {
'/start': handle.welcome,
'/sql': handle.sqli,
'/xss': handle.xss,
'/lfi': handle.lfi,
'/bing': handle.bing,
'/dork': handle.gen_dork,
'/help': handle.help_users,
'/encrypt': handle._Encrypt,
'/decrypt': handle._Decrypt,
'/ch': handle.changelog_for_users,
'/bkp': handle.manual_bkp,
'/file': handle.sendFile,
'$statist': handle.statistcs
}
if msg['command']['check']:
user_command[msg['command']['cmd']]()
else:
pass
except:
pass
time.sleep(2)
bot.message_loop(control)
print("[+] Scrutin Iniciado [+]\n")
while 1:
time.sleep(10)