Upload 14 files
Browse files- Black.py +73 -0
- README.md +4 -4
- accs.json +234 -0
- app.py +950 -0
- approved.txt +0 -0
- black9.py +494 -0
- blacklist.txt +0 -0
- byte.py +449 -0
- gitattributes.txt +35 -0
- requirements.txt +11 -0
- xC4.py +505 -0
- xGeTJwT.py +89 -0
- xHeaders.py +213 -0
- xKEys.py +36 -0
Black.py
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import json
|
| 2 |
+
from protobuf_decoder.protobuf_decoder import Parser
|
| 3 |
+
from Crypto.Cipher import AES
|
| 4 |
+
from Crypto.Util.Padding import unpad, pad
|
| 5 |
+
|
| 6 |
+
key = bytes([89, 103, 38, 116, 99, 37, 68, 69, 117, 104, 54, 37, 90, 99, 94, 56])
|
| 7 |
+
iv = bytes([54, 111, 121, 90, 68, 114, 50, 50, 69, 51, 121, 99, 104, 106, 77, 37])
|
| 8 |
+
|
| 9 |
+
def EnC_AEs(HeX):
|
| 10 |
+
cipher = AES.new(key, AES.MODE_CBC, iv)
|
| 11 |
+
return cipher.encrypt(pad(bytes.fromhex(HeX), AES.block_size)).hex()
|
| 12 |
+
|
| 13 |
+
def EnC_Uid(n):
|
| 14 |
+
e = []
|
| 15 |
+
while n:
|
| 16 |
+
e.append((n & 0x7F) | (0x80 if n > 0x7F else 0))
|
| 17 |
+
n >>= 7
|
| 18 |
+
return bytes(e).hex()
|
| 19 |
+
|
| 20 |
+
def EnC_Vr(n):
|
| 21 |
+
e = []
|
| 22 |
+
while n:
|
| 23 |
+
e.append((n & 0x7F) | (0x80 if n > 0x7F else 0))
|
| 24 |
+
n >>= 7
|
| 25 |
+
return bytes(e)
|
| 26 |
+
|
| 27 |
+
def Fix_PackEt(parsed_results):
|
| 28 |
+
result_dict = {}
|
| 29 |
+
for result in parsed_results:
|
| 30 |
+
field_data = {}
|
| 31 |
+
field_data['wire_type'] = result.wire_type
|
| 32 |
+
if result.wire_type == "varint":
|
| 33 |
+
field_data['data'] = result.data
|
| 34 |
+
if result.wire_type == "string":
|
| 35 |
+
field_data['data'] = result.data
|
| 36 |
+
if result.wire_type == "bytes":
|
| 37 |
+
field_data['data'] = result.data
|
| 38 |
+
elif result.wire_type == 'length_delimited':
|
| 39 |
+
field_data["data"] = Fix_PackEt(result.data.results)
|
| 40 |
+
result_dict[result.field] = field_data
|
| 41 |
+
return result_dict
|
| 42 |
+
|
| 43 |
+
def DeCode_PackEt(input_text):
|
| 44 |
+
try:
|
| 45 |
+
parsed_results = Parser().parse(input_text)
|
| 46 |
+
parsed_results_objects = parsed_results
|
| 47 |
+
parsed_results_dict = Fix_PackEt(parsed_results_objects)
|
| 48 |
+
json_data = json.dumps(parsed_results_dict)
|
| 49 |
+
return json_data
|
| 50 |
+
except Exception as e:
|
| 51 |
+
print(f"error {e}")
|
| 52 |
+
return None
|
| 53 |
+
|
| 54 |
+
def CrEaTe_VarianT(field_number, value):
|
| 55 |
+
field_header = (field_number << 3) | 0
|
| 56 |
+
return EnC_Vr(field_header) + EnC_Vr(value)
|
| 57 |
+
|
| 58 |
+
def CrEaTe_LenGTh(field_number, value):
|
| 59 |
+
field_header = (field_number << 3) | 2
|
| 60 |
+
encoded_value = value.encode() if isinstance(value, str) else value
|
| 61 |
+
return EnC_Vr(field_header) + EnC_Vr(len(encoded_value)) + encoded_value
|
| 62 |
+
|
| 63 |
+
def CrEaTe_ProTo(fields):
|
| 64 |
+
packet = bytearray()
|
| 65 |
+
for field, value in fields.items():
|
| 66 |
+
if isinstance(value, dict):
|
| 67 |
+
nested_packet = CrEaTe_ProTo(value)
|
| 68 |
+
packet.extend(CrEaTe_LenGTh(field, nested_packet))
|
| 69 |
+
elif isinstance(value, int):
|
| 70 |
+
packet.extend(CrEaTe_VarianT(field, value))
|
| 71 |
+
elif isinstance(value, str) or isinstance(value, bytes):
|
| 72 |
+
packet.extend(CrEaTe_LenGTh(field, value))
|
| 73 |
+
return packet
|
README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
| 1 |
---
|
| 2 |
-
title: BOT
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: gradio
|
| 7 |
sdk_version: 6.9.0
|
| 8 |
app_file: app.py
|
|
|
|
| 1 |
---
|
| 2 |
+
title: BOT Spam
|
| 3 |
+
emoji: 💻
|
| 4 |
+
colorFrom: gray
|
| 5 |
+
colorTo: indigo
|
| 6 |
sdk: gradio
|
| 7 |
sdk_version: 6.9.0
|
| 8 |
app_file: app.py
|
accs.json
ADDED
|
@@ -0,0 +1,234 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"name": "OTMAN-ROOM¹",
|
| 4 |
+
"uid": 4649643634,
|
| 5 |
+
"password": "AllFF_VIPTNQBBUWJK",
|
| 6 |
+
"region": "ME",
|
| 7 |
+
"status_code": 200,
|
| 8 |
+
"created_at": "2026-03-18 14:16:12"
|
| 9 |
+
},
|
| 10 |
+
{
|
| 11 |
+
"name": "OTMAN-ROOM²",
|
| 12 |
+
"uid": 4649644081,
|
| 13 |
+
"password": "AllFF_VIPRNCR9CVV3",
|
| 14 |
+
"region": "ME",
|
| 15 |
+
"status_code": 200,
|
| 16 |
+
"created_at": "2026-03-18 14:16:26"
|
| 17 |
+
},
|
| 18 |
+
{
|
| 19 |
+
"name": "OTMAN-ROOM³",
|
| 20 |
+
"uid": 4649644519,
|
| 21 |
+
"password": "AllFF_VIPDQS90TSEN",
|
| 22 |
+
"region": "ME",
|
| 23 |
+
"status_code": 200,
|
| 24 |
+
"created_at": "2026-03-18 14:16:39"
|
| 25 |
+
},
|
| 26 |
+
{
|
| 27 |
+
"name": "OTMAN-ROOM⁴",
|
| 28 |
+
"uid": 4649645073,
|
| 29 |
+
"password": "AllFF_VIPMWD73XJ69",
|
| 30 |
+
"region": "ME",
|
| 31 |
+
"status_code": 200,
|
| 32 |
+
"created_at": "2026-03-18 14:16:58"
|
| 33 |
+
},
|
| 34 |
+
{
|
| 35 |
+
"name": "OTMAN-ROOM⁵",
|
| 36 |
+
"uid": 4649645606,
|
| 37 |
+
"password": "AllFF_VIP7A2SJPWYC",
|
| 38 |
+
"region": "ME",
|
| 39 |
+
"status_code": 200,
|
| 40 |
+
"created_at": "2026-03-18 14:17:15"
|
| 41 |
+
},
|
| 42 |
+
{
|
| 43 |
+
"name": "OTMAN-ROOM⁶",
|
| 44 |
+
"uid": 4649646224,
|
| 45 |
+
"password": "AllFF_VIP54YKKSUUC",
|
| 46 |
+
"region": "ME",
|
| 47 |
+
"status_code": 200,
|
| 48 |
+
"created_at": "2026-03-18 14:17:32"
|
| 49 |
+
},
|
| 50 |
+
{
|
| 51 |
+
"name": "OTMAN-ROOM⁷",
|
| 52 |
+
"uid": 4649646719,
|
| 53 |
+
"password": "AllFF_VIPWTSIDH3ZJ",
|
| 54 |
+
"region": "ME",
|
| 55 |
+
"status_code": 200,
|
| 56 |
+
"created_at": "2026-03-18 14:17:47"
|
| 57 |
+
},
|
| 58 |
+
{
|
| 59 |
+
"name": "OTMAN-ROOM⁸",
|
| 60 |
+
"uid": 4649647198,
|
| 61 |
+
"password": "AllFF_VIPQVXUFGX0R",
|
| 62 |
+
"region": "ME",
|
| 63 |
+
"status_code": 200,
|
| 64 |
+
"created_at": "2026-03-18 14:18:00"
|
| 65 |
+
},
|
| 66 |
+
{
|
| 67 |
+
"name": "OTMAN-ROOM⁹",
|
| 68 |
+
"uid": 4649647654,
|
| 69 |
+
"password": "AllFF_VIP3TVN9TA1K",
|
| 70 |
+
"region": "ME",
|
| 71 |
+
"status_code": 200,
|
| 72 |
+
"created_at": "2026-03-18 14:18:12"
|
| 73 |
+
},
|
| 74 |
+
{
|
| 75 |
+
"name": "OTMAN-ROOM¹⁰",
|
| 76 |
+
"uid": 4649648089,
|
| 77 |
+
"password": "AllFF_VIPJSEBEHQDN",
|
| 78 |
+
"region": "ME",
|
| 79 |
+
"status_code": 200,
|
| 80 |
+
"created_at": "2026-03-18 14:18:27"
|
| 81 |
+
},
|
| 82 |
+
{
|
| 83 |
+
"name": "OTMAN-ROOM¹¹",
|
| 84 |
+
"uid": 4649648578,
|
| 85 |
+
"password": "AllFF_VIPYJGTGPSQV",
|
| 86 |
+
"region": "ME",
|
| 87 |
+
"status_code": 200,
|
| 88 |
+
"created_at": "2026-03-18 14:18:45"
|
| 89 |
+
},
|
| 90 |
+
{
|
| 91 |
+
"name": "OTMAN-ROOM¹²",
|
| 92 |
+
"uid": 4649649090,
|
| 93 |
+
"password": "AllFF_VIPUSOP2VZ8Y",
|
| 94 |
+
"region": "ME",
|
| 95 |
+
"status_code": 200,
|
| 96 |
+
"created_at": "2026-03-18 14:18:58"
|
| 97 |
+
},
|
| 98 |
+
{
|
| 99 |
+
"name": "OTMAN-ROOM¹³",
|
| 100 |
+
"uid": 4649649526,
|
| 101 |
+
"password": "AllFF_VIPZWPLODLWG",
|
| 102 |
+
"region": "ME",
|
| 103 |
+
"status_code": 200,
|
| 104 |
+
"created_at": "2026-03-18 14:19:12"
|
| 105 |
+
},
|
| 106 |
+
{
|
| 107 |
+
"name": "OTMAN-ROOM¹⁵",
|
| 108 |
+
"uid": 4649650031,
|
| 109 |
+
"password": "AllFF_VIPIKL7LFG5A",
|
| 110 |
+
"region": "ME",
|
| 111 |
+
"status_code": 200,
|
| 112 |
+
"created_at": "2026-03-18 14:19:28"
|
| 113 |
+
},
|
| 114 |
+
{
|
| 115 |
+
"name": "OTMAN-ROOM¹⁶",
|
| 116 |
+
"uid": 4649650450,
|
| 117 |
+
"password": "AllFF_VIPXOXCGCQBV",
|
| 118 |
+
"region": "ME",
|
| 119 |
+
"status_code": 200,
|
| 120 |
+
"created_at": "2026-03-18 14:19:45"
|
| 121 |
+
},
|
| 122 |
+
{
|
| 123 |
+
"name": "OTMAN-ROOM¹⁷",
|
| 124 |
+
"uid": 4649651513,
|
| 125 |
+
"password": "AllFF_VIPSRZNWNQ2S",
|
| 126 |
+
"region": "ME",
|
| 127 |
+
"status_code": 200,
|
| 128 |
+
"created_at": "2026-03-18 14:20:14"
|
| 129 |
+
},
|
| 130 |
+
{
|
| 131 |
+
"name": "OTMAN-ROOM¹⁸",
|
| 132 |
+
"uid": 4649651939,
|
| 133 |
+
"password": "AllFF_VIPWHXVMIBIX",
|
| 134 |
+
"region": "ME",
|
| 135 |
+
"status_code": 200,
|
| 136 |
+
"created_at": "2026-03-18 14:20:28"
|
| 137 |
+
},
|
| 138 |
+
{
|
| 139 |
+
"name": "OTMAN-ROOM¹⁹",
|
| 140 |
+
"uid": 4649652438,
|
| 141 |
+
"password": "AllFF_VIPYSA0GZKE8",
|
| 142 |
+
"region": "ME",
|
| 143 |
+
"status_code": 200,
|
| 144 |
+
"created_at": "2026-03-18 14:20:41"
|
| 145 |
+
},
|
| 146 |
+
{
|
| 147 |
+
"name": "OTMAN-ROOM²⁰",
|
| 148 |
+
"uid": 4649652846,
|
| 149 |
+
"password": "AllFF_VIP84Y93FWQL",
|
| 150 |
+
"region": "ME",
|
| 151 |
+
"status_code": 200,
|
| 152 |
+
"created_at": "2026-03-18 14:20:53"
|
| 153 |
+
},
|
| 154 |
+
{
|
| 155 |
+
"name": "OTMAN-ROOM²¹",
|
| 156 |
+
"uid": 4649653204,
|
| 157 |
+
"password": "AllFF_VIPQODNP1RXE",
|
| 158 |
+
"region": "ME",
|
| 159 |
+
"status_code": 200,
|
| 160 |
+
"created_at": "2026-03-18 14:21:06"
|
| 161 |
+
},
|
| 162 |
+
{
|
| 163 |
+
"name": "OTMAN-ROOM²²",
|
| 164 |
+
"uid": 4649653680,
|
| 165 |
+
"password": "AllFF_VIPMTH5EIRHS",
|
| 166 |
+
"region": "ME",
|
| 167 |
+
"status_code": 200,
|
| 168 |
+
"created_at": "2026-03-18 14:21:19"
|
| 169 |
+
},
|
| 170 |
+
{
|
| 171 |
+
"name": "OTMAN-ROOM²³",
|
| 172 |
+
"uid": 4649654188,
|
| 173 |
+
"password": "AllFF_VIPD5OC36FLQ",
|
| 174 |
+
"region": "ME",
|
| 175 |
+
"status_code": 200,
|
| 176 |
+
"created_at": "2026-03-18 14:21:33"
|
| 177 |
+
},
|
| 178 |
+
{
|
| 179 |
+
"name": "OTMAN-ROOM²⁴",
|
| 180 |
+
"uid": 4649654626,
|
| 181 |
+
"password": "AllFF_VIP4GAMZOYYQ",
|
| 182 |
+
"region": "ME",
|
| 183 |
+
"status_code": 200,
|
| 184 |
+
"created_at": "2026-03-18 14:21:47"
|
| 185 |
+
},
|
| 186 |
+
{
|
| 187 |
+
"name": "OTMAN-ROOM²⁵",
|
| 188 |
+
"uid": 4649655050,
|
| 189 |
+
"password": "AllFF_VIP1LHL5FPQ5",
|
| 190 |
+
"region": "ME",
|
| 191 |
+
"status_code": 200,
|
| 192 |
+
"created_at": "2026-03-18 14:22:07"
|
| 193 |
+
},
|
| 194 |
+
{
|
| 195 |
+
"name": "OTMAN-ROOM²⁶",
|
| 196 |
+
"uid": 4649655790,
|
| 197 |
+
"password": "AllFF_VIPKS2IOLCGQ",
|
| 198 |
+
"region": "ME",
|
| 199 |
+
"status_code": 200,
|
| 200 |
+
"created_at": "2026-03-18 14:22:34"
|
| 201 |
+
},
|
| 202 |
+
{
|
| 203 |
+
"name": "OTMAN-ROOM²⁷",
|
| 204 |
+
"uid": 4649656656,
|
| 205 |
+
"password": "AllFF_VIPHIMDJMLEN",
|
| 206 |
+
"region": "ME",
|
| 207 |
+
"status_code": 200,
|
| 208 |
+
"created_at": "2026-03-18 14:22:55"
|
| 209 |
+
},
|
| 210 |
+
{
|
| 211 |
+
"name": "OTMAN-ROOM²⁸",
|
| 212 |
+
"uid": 4649657284,
|
| 213 |
+
"password": "AllFF_VIPBIVSDG6BD",
|
| 214 |
+
"region": "ME",
|
| 215 |
+
"status_code": 200,
|
| 216 |
+
"created_at": "2026-03-18 14:23:08"
|
| 217 |
+
},
|
| 218 |
+
{
|
| 219 |
+
"name": "OTMAN-ROOM²⁹",
|
| 220 |
+
"uid": 4649657737,
|
| 221 |
+
"password": "AllFF_VIP4CFIBWI0P",
|
| 222 |
+
"region": "ME",
|
| 223 |
+
"status_code": 200,
|
| 224 |
+
"created_at": "2026-03-18 14:23:20"
|
| 225 |
+
},
|
| 226 |
+
{
|
| 227 |
+
"name": "OTMAN-ROOM³⁰",
|
| 228 |
+
"uid": 4649658157,
|
| 229 |
+
"password": "AllFF_VIPRCQVLKAKD",
|
| 230 |
+
"region": "ME",
|
| 231 |
+
"status_code": 200,
|
| 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import requests, os, sys, jwt, json, binascii, time, urllib3, xKEys, base64, datetime, re, socket, threading
|
| 2 |
+
from flask import Flask, request, abort
|
| 3 |
+
import psutil
|
| 4 |
+
from protobuf_decoder.protobuf_decoder import Parser
|
| 5 |
+
from byte import *
|
| 6 |
+
from byte import xSendTeamMsg, xSEndMsg
|
| 7 |
+
from byte import Auth_Chat
|
| 8 |
+
from xHeaders import *
|
| 9 |
+
from datetime import datetime
|
| 10 |
+
from google.protobuf.timestamp_pb2 import Timestamp
|
| 11 |
+
from concurrent.futures import ThreadPoolExecutor
|
| 12 |
+
from threading import Thread
|
| 13 |
+
from black9 import openroom, spmroom
|
| 14 |
+
import telebot
|
| 15 |
+
from telebot import types
|
| 16 |
+
import logging
|
| 17 |
+
|
| 18 |
+
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
|
| 19 |
+
|
| 20 |
+
TOKEN = "8263073239:AAFAHKIy2-aFgXkFfgfFA8_aBXrYVdxGam0"
|
| 21 |
+
ADMIN_IDS = [8368309157]
|
| 22 |
+
|
| 23 |
+
from telebot import apihelper
|
| 24 |
+
import socket
|
| 25 |
+
import ssl
|
| 26 |
+
|
| 27 |
+
def resolve_via_doh(hostname):
|
| 28 |
+
"""Resolve hostname using Cloudflare DNS over HTTPS to bypass HF DNS block"""
|
| 29 |
+
try:
|
| 30 |
+
import urllib.request
|
| 31 |
+
import json
|
| 32 |
+
url = f"https://cloudflare-dns.com/dns-query?name={hostname}&type=A"
|
| 33 |
+
req = urllib.request.Request(url, headers={"accept": "application/dns-json"})
|
| 34 |
+
with urllib.request.urlopen(req, timeout=10) as resp:
|
| 35 |
+
data = json.loads(resp.read())
|
| 36 |
+
answers = data.get("Answer", [])
|
| 37 |
+
for ans in answers:
|
| 38 |
+
if ans.get("type") == 1: # A record
|
| 39 |
+
return ans["data"]
|
| 40 |
+
except Exception as e:
|
| 41 |
+
print(f"DoH resolution failed: {e}")
|
| 42 |
+
return None
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
_original_getaddrinfo = socket.getaddrinfo
|
| 46 |
+
def _patched_getaddrinfo(host, port, *args, **kwargs):
|
| 47 |
+
if host == 'api.telegram.org':
|
| 48 |
+
ip = resolve_via_doh(host)
|
| 49 |
+
if ip:
|
| 50 |
+
return _original_getaddrinfo(ip, port, *args, **kwargs)
|
| 51 |
+
return _original_getaddrinfo(host, port, *args, **kwargs)
|
| 52 |
+
socket.getaddrinfo = _patched_getaddrinfo
|
| 53 |
+
print("DNS patch applied: api.telegram.org will be resolved via Cloudflare DoH")
|
| 54 |
+
|
| 55 |
+
|
| 56 |
+
WEBHOOK_URL = os.environ.get('WEBHOOK_URL', 'https://otmanbot/bot-spam.hf.space')
|
| 57 |
+
|
| 58 |
+
bot = telebot.TeleBot(TOKEN, parse_mode="HTML")
|
| 59 |
+
app = Flask(__name__)
|
| 60 |
+
|
| 61 |
+
connected_clients = {}
|
| 62 |
+
connected_clients_lock = threading.Lock()
|
| 63 |
+
|
| 64 |
+
active_spam_targets = {}
|
| 65 |
+
active_room_spam_targets = {}
|
| 66 |
+
active_spam_lock = threading.Lock()
|
| 67 |
+
|
| 68 |
+
spam_initiators = {}
|
| 69 |
+
spam_initiators_lock = threading.Lock()
|
| 70 |
+
|
| 71 |
+
spam_start_times = {}
|
| 72 |
+
spam_start_times_lock = threading.Lock()
|
| 73 |
+
|
| 74 |
+
logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', level=logging.INFO)
|
| 75 |
+
logger = logging.getLogger(__name__)
|
| 76 |
+
|
| 77 |
+
@bot.message_handler(commands=['start'])
|
| 78 |
+
def start(message):
|
| 79 |
+
user_id = message.from_user.id
|
| 80 |
+
is_admin = user_id in ADMIN_IDS
|
| 81 |
+
chat_type = message.chat.type
|
| 82 |
+
|
| 83 |
+
if chat_type != 'private':
|
| 84 |
+
msg = (
|
| 85 |
+
"<b>🎮 Spam Bot Commands</b>\n\n"
|
| 86 |
+
"<b>📝 Available Commands:</b>\n"
|
| 87 |
+
"• <code>/spam {id} {hours}</code> - Start normal spam\n"
|
| 88 |
+
"• <code>/room {id} {hours}</code> - Start room spam\n"
|
| 89 |
+
"• <code>/status {id}</code> - Check spam status\n"
|
| 90 |
+
"• <code>/stop_spam {id}</code> - Stop normal spam\n"
|
| 91 |
+
"• <code>/stop_room {id}</code> - Stop room spam\n\n"
|
| 92 |
+
"<b>⏰ Note:</b> Maximum 24 hours\n\n"
|
| 93 |
+
"<b>📞 Support:</b> @AlliFF_BOT"
|
| 94 |
+
)
|
| 95 |
+
else:
|
| 96 |
+
if is_admin:
|
| 97 |
+
msg = (
|
| 98 |
+
"<b>👑 Welcome Admin</b>\n\n"
|
| 99 |
+
"<b>📝 Available Commands:</b>\n"
|
| 100 |
+
"• <code>/spam {id} {hours/d}</code> - Start normal spam (use d for days)\n"
|
| 101 |
+
"• <code>/room {id} {hours/d}</code> - Start room spam (use d for days)\n"
|
| 102 |
+
"• <code>/status {id}</code> - Check spam status\n"
|
| 103 |
+
"• <code>/stop_spam {id}</code> - Stop normal spam\n"
|
| 104 |
+
"• <code>/stop_room {id}</code> - Stop room spam\n"
|
| 105 |
+
"• <code>/restart</code> - Restart accounts (Admin only)\n\n"
|
| 106 |
+
"<b>📞 Support:</b> @AlliFF_BOT"
|
| 107 |
+
)
|
| 108 |
+
else:
|
| 109 |
+
msg = "🗿"
|
| 110 |
+
|
| 111 |
+
bot.reply_to(message, msg)
|
| 112 |
+
|
| 113 |
+
@bot.message_handler(func=lambda message: message.chat.type == 'private' and message.from_user.id not in ADMIN_IDS and not message.text.startswith('/'))
|
| 114 |
+
def handle_private(message):
|
| 115 |
+
bot.reply_to(message, "🗿")
|
| 116 |
+
|
| 117 |
+
@bot.message_handler(commands=['spam'])
|
| 118 |
+
def spam_command(message):
|
| 119 |
+
user_id = message.from_user.id
|
| 120 |
+
args = message.text.split()
|
| 121 |
+
|
| 122 |
+
try:
|
| 123 |
+
if len(args) != 3:
|
| 124 |
+
bot.reply_to(message, "<b>❌ Wrong Format</b>\nUse: <code>/spam {id} {hours}</code>")
|
| 125 |
+
return
|
| 126 |
+
|
| 127 |
+
target_id = args[1]
|
| 128 |
+
|
| 129 |
+
if user_id in ADMIN_IDS:
|
| 130 |
+
time_value = args[2]
|
| 131 |
+
if 'd' in time_value:
|
| 132 |
+
days = int(time_value.replace('d', ''))
|
| 133 |
+
hours = days * 24
|
| 134 |
+
else:
|
| 135 |
+
hours = int(time_value)
|
| 136 |
+
else:
|
| 137 |
+
hours = int(args[2])
|
| 138 |
+
|
| 139 |
+
if hours <= 0 or hours > 720:
|
| 140 |
+
bot.reply_to(message, "<b>❌ Error</b>\nMaximum 30 days (720 hours)")
|
| 141 |
+
return
|
| 142 |
+
|
| 143 |
+
if not ChEck_Commande(target_id):
|
| 144 |
+
bot.reply_to(message, "<b>❌ Error</b>\nInvalid user_id")
|
| 145 |
+
return
|
| 146 |
+
|
| 147 |
+
with active_spam_lock:
|
| 148 |
+
if target_id in active_spam_targets:
|
| 149 |
+
bot.reply_to(message, f"<b>⚠️ This account is already in spam</b>")
|
| 150 |
+
return
|
| 151 |
+
|
| 152 |
+
active_spam_targets[target_id] = {
|
| 153 |
+
'active': True,
|
| 154 |
+
'start_time': datetime.now(),
|
| 155 |
+
'duration': hours,
|
| 156 |
+
'type': 'normal',
|
| 157 |
+
'initiator': user_id
|
| 158 |
+
}
|
| 159 |
+
|
| 160 |
+
with spam_start_times_lock:
|
| 161 |
+
spam_start_times[target_id] = datetime.now()
|
| 162 |
+
|
| 163 |
+
with spam_initiators_lock:
|
| 164 |
+
spam_initiators[target_id] = user_id
|
| 165 |
+
|
| 166 |
+
threading.Thread(target=normal_spam_worker, args=(target_id, hours), daemon=True).start()
|
| 167 |
+
|
| 168 |
+
time_text = "days" if hours >= 24 else "hours"
|
| 169 |
+
time_value = hours // 24 if hours >= 24 else hours
|
| 170 |
+
|
| 171 |
+
bot.reply_to(
|
| 172 |
+
message,
|
| 173 |
+
f"<b>✅ Successfully started spam for ID <code>{target_id}</code> for {time_value} {time_text}</b>"
|
| 174 |
+
)
|
| 175 |
+
|
| 176 |
+
except ValueError:
|
| 177 |
+
bot.reply_to(message, "<b>❌ Error</b>\nPlease enter a valid number")
|
| 178 |
+
except Exception as e:
|
| 179 |
+
bot.reply_to(message, f"<b>❌ Error:</b> {str(e)}")
|
| 180 |
+
|
| 181 |
+
@bot.message_handler(commands=['room'])
|
| 182 |
+
def room_command(message):
|
| 183 |
+
user_id = message.from_user.id
|
| 184 |
+
args = message.text.split()
|
| 185 |
+
|
| 186 |
+
try:
|
| 187 |
+
if len(args) != 3:
|
| 188 |
+
bot.reply_to(message, "<b>❌ Wrong Format</b>\nUse: <code>/room {id} {hours}</code>")
|
| 189 |
+
return
|
| 190 |
+
|
| 191 |
+
target_id = args[1]
|
| 192 |
+
|
| 193 |
+
if user_id in ADMIN_IDS:
|
| 194 |
+
time_value = args[2]
|
| 195 |
+
if 'd' in time_value:
|
| 196 |
+
days = int(time_value.replace('d', ''))
|
| 197 |
+
hours = days * 24
|
| 198 |
+
else:
|
| 199 |
+
hours = int(time_value)
|
| 200 |
+
else:
|
| 201 |
+
hours = int(args[2])
|
| 202 |
+
|
| 203 |
+
if hours <= 0 or hours > 720:
|
| 204 |
+
bot.reply_to(message, "<b>❌ Error</b>\nMaximum 30 days (720 hours)")
|
| 205 |
+
return
|
| 206 |
+
|
| 207 |
+
if not ChEck_Commande(target_id):
|
| 208 |
+
bot.reply_to(message, "<b>❌ Error</b>\nInvalid user_id")
|
| 209 |
+
return
|
| 210 |
+
|
| 211 |
+
with active_spam_lock:
|
| 212 |
+
if target_id in active_room_spam_targets:
|
| 213 |
+
bot.reply_to(message, f"<b>⚠️ This account is already in room spam</b>")
|
| 214 |
+
return
|
| 215 |
+
|
| 216 |
+
active_room_spam_targets[target_id] = {
|
| 217 |
+
'active': True,
|
| 218 |
+
'start_time': datetime.now(),
|
| 219 |
+
'duration': hours,
|
| 220 |
+
'type': 'room',
|
| 221 |
+
'initiator': user_id
|
| 222 |
+
}
|
| 223 |
+
|
| 224 |
+
with spam_start_times_lock:
|
| 225 |
+
spam_start_times[f"room_{target_id}"] = datetime.now()
|
| 226 |
+
|
| 227 |
+
with spam_initiators_lock:
|
| 228 |
+
spam_initiators[f"room_{target_id}"] = user_id
|
| 229 |
+
|
| 230 |
+
threading.Thread(target=room_spam_worker, args=(target_id, hours), daemon=True).start()
|
| 231 |
+
|
| 232 |
+
time_text = "days" if hours >= 24 else "hours"
|
| 233 |
+
time_value = hours // 24 if hours >= 24 else hours
|
| 234 |
+
|
| 235 |
+
bot.reply_to(
|
| 236 |
+
message,
|
| 237 |
+
f"<b>✅ Successfully started room spam for ID <code>{target_id}</code> for {time_value} {time_text}</b>"
|
| 238 |
+
)
|
| 239 |
+
|
| 240 |
+
except ValueError:
|
| 241 |
+
bot.reply_to(message, "<b>❌ Error</b>\nPlease enter a valid number")
|
| 242 |
+
except Exception as e:
|
| 243 |
+
bot.reply_to(message, f"<b>❌ Error:</b> {str(e)}")
|
| 244 |
+
|
| 245 |
+
@bot.message_handler(commands=['status'])
|
| 246 |
+
def status_command(message):
|
| 247 |
+
user_id = message.from_user.id
|
| 248 |
+
args = message.text.split()
|
| 249 |
+
|
| 250 |
+
try:
|
| 251 |
+
if len(args) != 2:
|
| 252 |
+
bot.reply_to(message, "<b>❌ Wrong Format</b>\nUse: <code>/status {id}</code>")
|
| 253 |
+
return
|
| 254 |
+
|
| 255 |
+
target_id = args[1]
|
| 256 |
+
found = False
|
| 257 |
+
|
| 258 |
+
with active_spam_lock:
|
| 259 |
+
if target_id in active_spam_targets:
|
| 260 |
+
with spam_start_times_lock:
|
| 261 |
+
if target_id in spam_start_times:
|
| 262 |
+
start_time = spam_start_times[target_id]
|
| 263 |
+
elapsed = datetime.now() - start_time
|
| 264 |
+
total_seconds = int(elapsed.total_seconds())
|
| 265 |
+
duration = active_spam_targets[target_id]['duration'] * 3600
|
| 266 |
+
remaining = duration - total_seconds
|
| 267 |
+
|
| 268 |
+
if remaining > 0:
|
| 269 |
+
days = remaining // 86400
|
| 270 |
+
hours = (remaining % 86400) // 3600
|
| 271 |
+
minutes = (remaining % 3600) // 60
|
| 272 |
+
seconds = remaining % 60
|
| 273 |
+
|
| 274 |
+
time_parts = []
|
| 275 |
+
if days > 0:
|
| 276 |
+
time_parts.append(f"{days}d")
|
| 277 |
+
if hours > 0:
|
| 278 |
+
time_parts.append(f"{hours}h")
|
| 279 |
+
if minutes > 0:
|
| 280 |
+
time_parts.append(f"{minutes}m")
|
| 281 |
+
if seconds > 0:
|
| 282 |
+
time_parts.append(f"{seconds}s")
|
| 283 |
+
|
| 284 |
+
time_left = " ".join(time_parts)
|
| 285 |
+
|
| 286 |
+
bot.reply_to(
|
| 287 |
+
message,
|
| 288 |
+
f"<b>📊 Spam Status</b>\n\n"
|
| 289 |
+
f"<b>Target:</b> <code>{target_id}</code>\n"
|
| 290 |
+
f"<b>Type:</b> Normal Spam\n"
|
| 291 |
+
f"<b>Time Left:</b> {time_left}\n"
|
| 292 |
+
f"<b>Started By:</b> <code>{active_spam_targets[target_id]['initiator']}</code>"
|
| 293 |
+
)
|
| 294 |
+
found = True
|
| 295 |
+
|
| 296 |
+
if not found:
|
| 297 |
+
with active_spam_lock:
|
| 298 |
+
if target_id in active_room_spam_targets:
|
| 299 |
+
with spam_start_times_lock:
|
| 300 |
+
room_key = f"room_{target_id}"
|
| 301 |
+
if room_key in spam_start_times:
|
| 302 |
+
start_time = spam_start_times[room_key]
|
| 303 |
+
elapsed = datetime.now() - start_time
|
| 304 |
+
total_seconds = int(elapsed.total_seconds())
|
| 305 |
+
duration = active_room_spam_targets[target_id]['duration'] * 3600
|
| 306 |
+
remaining = duration - total_seconds
|
| 307 |
+
|
| 308 |
+
if remaining > 0:
|
| 309 |
+
days = remaining // 86400
|
| 310 |
+
hours = (remaining % 86400) // 3600
|
| 311 |
+
minutes = (remaining % 3600) // 60
|
| 312 |
+
seconds = remaining % 60
|
| 313 |
+
|
| 314 |
+
time_parts = []
|
| 315 |
+
if days > 0:
|
| 316 |
+
time_parts.append(f"{days}d")
|
| 317 |
+
if hours > 0:
|
| 318 |
+
time_parts.append(f"{hours}h")
|
| 319 |
+
if minutes > 0:
|
| 320 |
+
time_parts.append(f"{minutes}m")
|
| 321 |
+
if seconds > 0:
|
| 322 |
+
time_parts.append(f"{seconds}s")
|
| 323 |
+
|
| 324 |
+
time_left = " ".join(time_parts)
|
| 325 |
+
|
| 326 |
+
bot.reply_to(
|
| 327 |
+
message,
|
| 328 |
+
f"<b>📊 Spam Status</b>\n\n"
|
| 329 |
+
f"<b>Target:</b> <code>{target_id}</code>\n"
|
| 330 |
+
f"<b>Type:</b> Room Spam\n"
|
| 331 |
+
f"<b>Time Left:</b> {time_left}\n"
|
| 332 |
+
f"<b>Started By:</b> <code>{active_room_spam_targets[target_id]['initiator']}</code>"
|
| 333 |
+
)
|
| 334 |
+
found = True
|
| 335 |
+
|
| 336 |
+
if not found:
|
| 337 |
+
bot.reply_to(message, f"<b>❌ No active spam found for ID <code>{target_id}</code></b>")
|
| 338 |
+
|
| 339 |
+
except Exception as e:
|
| 340 |
+
bot.reply_to(message, f"<b>❌ Error:</b> {str(e)}")
|
| 341 |
+
|
| 342 |
+
@bot.message_handler(commands=['stop_spam'])
|
| 343 |
+
def stop_spam_command(message):
|
| 344 |
+
user_id = message.from_user.id
|
| 345 |
+
args = message.text.split()
|
| 346 |
+
|
| 347 |
+
try:
|
| 348 |
+
if len(args) != 2:
|
| 349 |
+
bot.reply_to(message, "<b>❌ Wrong Format</b>\nUse: <code>/stop_spam {id}</code>")
|
| 350 |
+
return
|
| 351 |
+
|
| 352 |
+
target_id = args[1]
|
| 353 |
+
|
| 354 |
+
with active_spam_lock:
|
| 355 |
+
if target_id not in active_spam_targets:
|
| 356 |
+
bot.reply_to(message, f"<b>❌ No active spam found for ID <code>{target_id}</code></b>")
|
| 357 |
+
return
|
| 358 |
+
|
| 359 |
+
with spam_initiators_lock:
|
| 360 |
+
initiator = spam_initiators.get(target_id)
|
| 361 |
+
if initiator != user_id and user_id not in ADMIN_IDS:
|
| 362 |
+
bot.reply_to(
|
| 363 |
+
message,
|
| 364 |
+
"<b>⛔ Sorry, you cannot stop this spam. Only the person who added the ID can stop it.</b>"
|
| 365 |
+
)
|
| 366 |
+
return
|
| 367 |
+
|
| 368 |
+
if target_id in spam_initiators:
|
| 369 |
+
del spam_initiators[target_id]
|
| 370 |
+
|
| 371 |
+
with spam_start_times_lock:
|
| 372 |
+
if target_id in spam_start_times:
|
| 373 |
+
del spam_start_times[target_id]
|
| 374 |
+
|
| 375 |
+
del active_spam_targets[target_id]
|
| 376 |
+
|
| 377 |
+
bot.reply_to(
|
| 378 |
+
message,
|
| 379 |
+
f"<b>✅ Successfully stopped spam for target ID <code>{target_id}</code></b>"
|
| 380 |
+
)
|
| 381 |
+
|
| 382 |
+
except Exception as e:
|
| 383 |
+
bot.reply_to(message, f"<b>❌ Error:</b> {str(e)}")
|
| 384 |
+
|
| 385 |
+
@bot.message_handler(commands=['stop_room'])
|
| 386 |
+
def stop_room_command(message):
|
| 387 |
+
user_id = message.from_user.id
|
| 388 |
+
args = message.text.split()
|
| 389 |
+
|
| 390 |
+
try:
|
| 391 |
+
if len(args) != 2:
|
| 392 |
+
bot.reply_to(message, "<b>❌ Wrong Format</b>\nUse: <code>/stop_room {id}</code>")
|
| 393 |
+
return
|
| 394 |
+
|
| 395 |
+
target_id = args[1]
|
| 396 |
+
room_key = f"room_{target_id}"
|
| 397 |
+
|
| 398 |
+
with active_spam_lock:
|
| 399 |
+
if target_id not in active_room_spam_targets:
|
| 400 |
+
bot.reply_to(message, f"<b>❌ No active room spam found for ID <code>{target_id}</code></b>")
|
| 401 |
+
return
|
| 402 |
+
|
| 403 |
+
with spam_initiators_lock:
|
| 404 |
+
initiator = spam_initiators.get(room_key)
|
| 405 |
+
if initiator != user_id and user_id not in ADMIN_IDS:
|
| 406 |
+
bot.reply_to(
|
| 407 |
+
message,
|
| 408 |
+
"<b>⛔ Sorry, you cannot stop this spam. Only the person who added the ID can stop it.</b>"
|
| 409 |
+
)
|
| 410 |
+
return
|
| 411 |
+
|
| 412 |
+
if room_key in spam_initiators:
|
| 413 |
+
del spam_initiators[room_key]
|
| 414 |
+
|
| 415 |
+
with spam_start_times_lock:
|
| 416 |
+
if room_key in spam_start_times:
|
| 417 |
+
del spam_start_times[room_key]
|
| 418 |
+
|
| 419 |
+
del active_room_spam_targets[target_id]
|
| 420 |
+
|
| 421 |
+
bot.reply_to(
|
| 422 |
+
message,
|
| 423 |
+
f"<b>✅ Successfully stopped room spam for target ID <code>{target_id}</code></b>"
|
| 424 |
+
)
|
| 425 |
+
|
| 426 |
+
except Exception as e:
|
| 427 |
+
bot.reply_to(message, f"<b>❌ Error:</b> {str(e)}")
|
| 428 |
+
|
| 429 |
+
@bot.message_handler(commands=['restart'])
|
| 430 |
+
def restart_command(message):
|
| 431 |
+
user_id = message.from_user.id
|
| 432 |
+
|
| 433 |
+
if user_id not in ADMIN_IDS:
|
| 434 |
+
bot.reply_to(message, "<b>❌ This command is for admins only</b>")
|
| 435 |
+
return
|
| 436 |
+
|
| 437 |
+
bot.reply_to(message, "<b>🔄 Restarting accounts...</b>")
|
| 438 |
+
threading.Thread(target=restart_accounts, daemon=True).start()
|
| 439 |
+
|
| 440 |
+
def restart_accounts():
|
| 441 |
+
time.sleep(2)
|
| 442 |
+
ResTarT_BoT()
|
| 443 |
+
|
| 444 |
+
def AuTo_ResTartinG():
|
| 445 |
+
time.sleep(6 * 60 * 60)
|
| 446 |
+
print(' - AuTo ResTartinG The BoT ... ! ')
|
| 447 |
+
p = psutil.Process(os.getpid())
|
| 448 |
+
for handler in p.open_files():
|
| 449 |
+
try:
|
| 450 |
+
os.close(handler.fd)
|
| 451 |
+
except Exception as e:
|
| 452 |
+
print(f" - Error CLose Files : {e}")
|
| 453 |
+
for conn in p.net_connections():
|
| 454 |
+
try:
|
| 455 |
+
if hasattr(conn, 'fd'):
|
| 456 |
+
os.close(conn.fd)
|
| 457 |
+
except Exception as e:
|
| 458 |
+
print(f" - Error CLose Connection : {e}")
|
| 459 |
+
sys.path.append(os.path.dirname(os.path.abspath(sys.argv[0])))
|
| 460 |
+
python = sys.executable
|
| 461 |
+
os.execl(python, python, *sys.argv)
|
| 462 |
+
|
| 463 |
+
def ResTarT_BoT():
|
| 464 |
+
print(' - ResTartinG The BoT ... ! ')
|
| 465 |
+
p = psutil.Process(os.getpid())
|
| 466 |
+
open_files = p.open_files()
|
| 467 |
+
connections = p.net_connections()
|
| 468 |
+
for handler in open_files:
|
| 469 |
+
try:
|
| 470 |
+
os.close(handler.fd)
|
| 471 |
+
except Exception:
|
| 472 |
+
pass
|
| 473 |
+
for conn in connections:
|
| 474 |
+
try:
|
| 475 |
+
conn.close()
|
| 476 |
+
except Exception:
|
| 477 |
+
pass
|
| 478 |
+
sys.path.append(os.path.dirname(os.path.abspath(sys.argv[0])))
|
| 479 |
+
python = sys.executable
|
| 480 |
+
os.execl(python, python, *sys.argv)
|
| 481 |
+
|
| 482 |
+
def GeT_Time(timestamp):
|
| 483 |
+
last_login = datetime.fromtimestamp(timestamp)
|
| 484 |
+
now = datetime.now()
|
| 485 |
+
diff = now - last_login
|
| 486 |
+
d = diff.days
|
| 487 |
+
h , rem = divmod(diff.seconds, 3600)
|
| 488 |
+
m , s = divmod(rem, 60)
|
| 489 |
+
return d, h, m, s
|
| 490 |
+
|
| 491 |
+
def Time_En_Ar(t):
|
| 492 |
+
return ' '.join(t.replace("Day","Day").replace("Hour","Hour").replace("Min","Min").replace("Sec","Sec").split(" - "))
|
| 493 |
+
|
| 494 |
+
Thread(target = AuTo_ResTartinG , daemon = True).start()
|
| 495 |
+
|
| 496 |
+
ACCOUNTS = []
|
| 497 |
+
|
| 498 |
+
def load_accounts_from_file(filename="accs.json"):
|
| 499 |
+
accounts = []
|
| 500 |
+
try:
|
| 501 |
+
with open(filename, "r", encoding="utf-8") as file:
|
| 502 |
+
data = json.load(file)
|
| 503 |
+
|
| 504 |
+
if isinstance(data, list):
|
| 505 |
+
for account in data:
|
| 506 |
+
if isinstance(account, dict):
|
| 507 |
+
account_id = account.get('uid', '')
|
| 508 |
+
password = account.get('password', '')
|
| 509 |
+
|
| 510 |
+
if account_id:
|
| 511 |
+
accounts.append({
|
| 512 |
+
'id': str(account_id),
|
| 513 |
+
'password': password
|
| 514 |
+
})
|
| 515 |
+
|
| 516 |
+
print(f"Loaded {len(accounts)} accounts from {filename}")
|
| 517 |
+
|
| 518 |
+
except FileNotFoundError:
|
| 519 |
+
print(f"File {filename} not found!")
|
| 520 |
+
except json.JSONDecodeError:
|
| 521 |
+
print(f"JSON format error in file {filename}!")
|
| 522 |
+
except Exception as e:
|
| 523 |
+
print(f"Error reading file: {e}")
|
| 524 |
+
|
| 525 |
+
return accounts
|
| 526 |
+
|
| 527 |
+
ACCOUNTS = load_accounts_from_file()
|
| 528 |
+
|
| 529 |
+
def normal_spam_worker(target_id, duration_hours=None):
|
| 530 |
+
print(f"Starting normal spam on target: {target_id}" + (f" for {duration_hours} hours" if duration_hours else ""))
|
| 531 |
+
|
| 532 |
+
start_time = datetime.now()
|
| 533 |
+
|
| 534 |
+
while True:
|
| 535 |
+
with active_spam_lock:
|
| 536 |
+
if target_id not in active_spam_targets:
|
| 537 |
+
print(f"Normal spam stopped on target: {target_id}")
|
| 538 |
+
break
|
| 539 |
+
|
| 540 |
+
if duration_hours:
|
| 541 |
+
elapsed = datetime.now() - start_time
|
| 542 |
+
if elapsed.total_seconds() >= duration_hours * 3600:
|
| 543 |
+
print(f"Normal spam duration ended for target: {target_id}")
|
| 544 |
+
with spam_initiators_lock:
|
| 545 |
+
if target_id in spam_initiators:
|
| 546 |
+
del spam_initiators[target_id]
|
| 547 |
+
with spam_start_times_lock:
|
| 548 |
+
if target_id in spam_start_times:
|
| 549 |
+
del spam_start_times[target_id]
|
| 550 |
+
del active_spam_targets[target_id]
|
| 551 |
+
break
|
| 552 |
+
|
| 553 |
+
try:
|
| 554 |
+
send_normal_spam_from_all_accounts(target_id)
|
| 555 |
+
time.sleep(0.1)
|
| 556 |
+
except Exception as e:
|
| 557 |
+
print(f"Error in normal spam on {target_id}: {e}")
|
| 558 |
+
time.sleep(1)
|
| 559 |
+
|
| 560 |
+
def room_spam_worker(target_id, duration_hours=None):
|
| 561 |
+
print(f"Starting room spam on target: {target_id}" + (f" for {duration_hours} hours" if duration_hours else ""))
|
| 562 |
+
|
| 563 |
+
start_time = datetime.now()
|
| 564 |
+
|
| 565 |
+
while True:
|
| 566 |
+
with active_spam_lock:
|
| 567 |
+
if target_id not in active_room_spam_targets:
|
| 568 |
+
print(f"Room spam stopped on target: {target_id}")
|
| 569 |
+
break
|
| 570 |
+
|
| 571 |
+
if duration_hours:
|
| 572 |
+
elapsed = datetime.now() - start_time
|
| 573 |
+
if elapsed.total_seconds() >= duration_hours * 3600:
|
| 574 |
+
print(f"Room spam duration ended for target: {target_id}")
|
| 575 |
+
with spam_initiators_lock:
|
| 576 |
+
room_key = f"room_{target_id}"
|
| 577 |
+
if room_key in spam_initiators:
|
| 578 |
+
del spam_initiators[room_key]
|
| 579 |
+
with spam_start_times_lock:
|
| 580 |
+
if room_key in spam_start_times:
|
| 581 |
+
del spam_start_times[room_key]
|
| 582 |
+
del active_room_spam_targets[target_id]
|
| 583 |
+
break
|
| 584 |
+
|
| 585 |
+
try:
|
| 586 |
+
send_room_spam_from_all_accounts(target_id)
|
| 587 |
+
time.sleep(0.1)
|
| 588 |
+
except Exception as e:
|
| 589 |
+
print(f"Error in room spam on {target_id}: {e}")
|
| 590 |
+
time.sleep(1)
|
| 591 |
+
|
| 592 |
+
def send_normal_spam_from_all_accounts(target_id):
|
| 593 |
+
with connected_clients_lock:
|
| 594 |
+
for account_id, client in connected_clients.items():
|
| 595 |
+
try:
|
| 596 |
+
if (hasattr(client, 'CliEnts2') and client.CliEnts2 and
|
| 597 |
+
hasattr(client, 'key') and client.key and
|
| 598 |
+
hasattr(client, 'iv') and client.iv):
|
| 599 |
+
|
| 600 |
+
for i in range(10):
|
| 601 |
+
try:
|
| 602 |
+
client.CliEnts2.send(SEnd_InV(1, target_id, client.key, client.iv))
|
| 603 |
+
client.CliEnts2.send(OpEnSq(client.key, client.iv))
|
| 604 |
+
client.CliEnts2.send(SPamSq(target_id, client.key, client.iv))
|
| 605 |
+
except (BrokenPipeError, ConnectionResetError, OSError) as e:
|
| 606 |
+
print(f"Connection error for account {account_id}: {e}")
|
| 607 |
+
break
|
| 608 |
+
except Exception as e:
|
| 609 |
+
print(f"Error sending from account {account_id}: {e}")
|
| 610 |
+
break
|
| 611 |
+
else:
|
| 612 |
+
print(f"Account {account_id} connection is inactive")
|
| 613 |
+
except Exception as e:
|
| 614 |
+
print(f"Error sending normal spam from account {account_id}: {e}")
|
| 615 |
+
|
| 616 |
+
def send_room_spam_from_all_accounts(target_id):
|
| 617 |
+
with connected_clients_lock:
|
| 618 |
+
for account_id, client in connected_clients.items():
|
| 619 |
+
try:
|
| 620 |
+
if (hasattr(client, 'CliEnts2') and client.CliEnts2 and
|
| 621 |
+
hasattr(client, 'key') and client.key and
|
| 622 |
+
hasattr(client, 'iv') and client.iv):
|
| 623 |
+
|
| 624 |
+
try:
|
| 625 |
+
client.CliEnts2.send(openroom(client.key, client.iv))
|
| 626 |
+
except Exception as e:
|
| 627 |
+
print(f"Error opening room from account {account_id}: {e}")
|
| 628 |
+
|
| 629 |
+
for i in range(10):
|
| 630 |
+
try:
|
| 631 |
+
client.CliEnts2.send(spmroom(client.key, client.iv, target_id))
|
| 632 |
+
except (BrokenPipeError, ConnectionResetError, OSError) as e:
|
| 633 |
+
print(f"Connection error for account {account_id}: {e}")
|
| 634 |
+
break
|
| 635 |
+
except Exception as e:
|
| 636 |
+
print(f"Error sending from account {account_id}: {e}")
|
| 637 |
+
break
|
| 638 |
+
else:
|
| 639 |
+
print(f"Account {account_id} connection is inactive")
|
| 640 |
+
except Exception as e:
|
| 641 |
+
print(f"Error sending room spam from account {account_id}: {e}")
|
| 642 |
+
|
| 643 |
+
class FF_CLient():
|
| 644 |
+
|
| 645 |
+
def __init__(self, id, password):
|
| 646 |
+
self.id = id
|
| 647 |
+
self.password = password
|
| 648 |
+
self.key = None
|
| 649 |
+
self.iv = None
|
| 650 |
+
self.connection_active = True
|
| 651 |
+
self.Get_FiNal_ToKen_0115()
|
| 652 |
+
|
| 653 |
+
def Connect_SerVer_OnLine(self , Token , tok , host , port , key , iv , host2 , port2):
|
| 654 |
+
try:
|
| 655 |
+
self.AutH_ToKen_0115 = tok
|
| 656 |
+
self.CliEnts2 = socket.create_connection((host2 , int(port2)))
|
| 657 |
+
self.CliEnts2.send(bytes.fromhex(self.AutH_ToKen_0115))
|
| 658 |
+
except:pass
|
| 659 |
+
while self.connection_active:
|
| 660 |
+
try:
|
| 661 |
+
self.DaTa2 = self.CliEnts2.recv(99999)
|
| 662 |
+
if '0500' in self.DaTa2.hex()[0:4] and len(self.DaTa2.hex()) > 30:
|
| 663 |
+
self.packet = json.loads(DeCode_PackEt(f'08{self.DaTa2.hex().split("08", 1)[1]}'))
|
| 664 |
+
self.AutH = self.packet['5']['data']['7']['data']
|
| 665 |
+
except:pass
|
| 666 |
+
|
| 667 |
+
def Connect_SerVer(self , Token , tok , host , port , key , iv , host2 , port2):
|
| 668 |
+
self.AutH_ToKen_0115 = tok
|
| 669 |
+
self.CliEnts = socket.create_connection((host , int(port)))
|
| 670 |
+
self.CliEnts.send(bytes.fromhex(self.AutH_ToKen_0115))
|
| 671 |
+
self.DaTa = self.CliEnts.recv(1024)
|
| 672 |
+
threading.Thread(target=self.Connect_SerVer_OnLine, args=(Token , tok , host , port , key , iv , host2 , port2)).start()
|
| 673 |
+
self.Exemple = xMsGFixinG('12345678')
|
| 674 |
+
|
| 675 |
+
self.key = key
|
| 676 |
+
self.iv = iv
|
| 677 |
+
|
| 678 |
+
with connected_clients_lock:
|
| 679 |
+
connected_clients[self.id] = self
|
| 680 |
+
print(f"Account {self.id} registered, total accounts: {len(connected_clients)}")
|
| 681 |
+
|
| 682 |
+
while True:
|
| 683 |
+
try:
|
| 684 |
+
self.DaTa = self.CliEnts.recv(1024)
|
| 685 |
+
if len(self.DaTa) == 0 or (hasattr(self, 'DaTa2') and len(self.DaTa2) == 0):
|
| 686 |
+
print(f"Connection lost for account {self.id}, reconnecting...")
|
| 687 |
+
try:
|
| 688 |
+
self.CliEnts.close()
|
| 689 |
+
if hasattr(self, 'CliEnts2'):
|
| 690 |
+
self.CliEnts2.close()
|
| 691 |
+
|
| 692 |
+
time.sleep(3)
|
| 693 |
+
self.Connect_SerVer(Token , tok , host , port , key , iv , host2 , port2)
|
| 694 |
+
except:
|
| 695 |
+
print(f"Failed to reconnect account {self.id}")
|
| 696 |
+
with connected_clients_lock:
|
| 697 |
+
if self.id in connected_clients:
|
| 698 |
+
del connected_clients[self.id]
|
| 699 |
+
break
|
| 700 |
+
|
| 701 |
+
if '/pp/' in self.input_msg[:4]:
|
| 702 |
+
self.target_id = self.input_msg[4:]
|
| 703 |
+
self.Zx = ChEck_Commande(self.target_id)
|
| 704 |
+
if True == self.Zx:
|
| 705 |
+
threading.Thread(target=send_normal_spam_from_all_accounts, args=(self.target_id,)).start()
|
| 706 |
+
time.sleep(2.5)
|
| 707 |
+
self.CliEnts.send(xSEndMsg(f'\n[b][c][{ArA_CoLor()}] SuccEss Spam To {xMsGFixinG(self.target_id)} From All Accounts\n', 2 , self.DeCode_CliEnt_Uid , self.DeCode_CliEnt_Uid , key , iv))
|
| 708 |
+
time.sleep(1.3)
|
| 709 |
+
self.CliEnts.close()
|
| 710 |
+
if hasattr(self, 'CliEnts2'):
|
| 711 |
+
self.CliEnts2.close()
|
| 712 |
+
self.Connect_SerVer(Token , tok , host , port , key , iv , host2 , port2)
|
| 713 |
+
elif False == self.Zx:
|
| 714 |
+
self.CliEnts.send(xSEndMsg(f'\n[b][c][{ArA_CoLor()}] - PLease Use /pp/<id>\n - Ex : /pp/{self.Exemple}\n', 2 , self.DeCode_CliEnt_Uid , self.DeCode_CliEnt_Uid , key , iv))
|
| 715 |
+
time.sleep(1.1)
|
| 716 |
+
self.CliEnts.close()
|
| 717 |
+
if hasattr(self, 'CliEnts2'):
|
| 718 |
+
self.CliEnts2.close()
|
| 719 |
+
self.Connect_SerVer(Token , tok , host , port , key , iv , host2 , port2)
|
| 720 |
+
|
| 721 |
+
except Exception as e:
|
| 722 |
+
print(f"Error in Connect_SerVer: {e}")
|
| 723 |
+
try:
|
| 724 |
+
self.CliEnts.close()
|
| 725 |
+
if hasattr(self, 'CliEnts2'):
|
| 726 |
+
self.CliEnts2.close()
|
| 727 |
+
except:
|
| 728 |
+
pass
|
| 729 |
+
time.sleep(5)
|
| 730 |
+
try:
|
| 731 |
+
self.Connect_SerVer(Token , tok , host , port , key , iv , host2 , port2)
|
| 732 |
+
except:
|
| 733 |
+
print(f"Final reconnection failed for account {self.id}")
|
| 734 |
+
with connected_clients_lock:
|
| 735 |
+
if self.id in connected_clients:
|
| 736 |
+
del connected_clients[self.id]
|
| 737 |
+
break
|
| 738 |
+
|
| 739 |
+
def GeT_Key_Iv(self , serialized_data):
|
| 740 |
+
my_message = xKEys.MyMessage()
|
| 741 |
+
my_message.ParseFromString(serialized_data)
|
| 742 |
+
timestamp , key , iv = my_message.field21 , my_message.field22 , my_message.field23
|
| 743 |
+
timestamp_obj = Timestamp()
|
| 744 |
+
timestamp_obj.FromNanoseconds(timestamp)
|
| 745 |
+
timestamp_seconds = timestamp_obj.seconds
|
| 746 |
+
timestamp_nanos = timestamp_obj.nanos
|
| 747 |
+
combined_timestamp = timestamp_seconds * 1_000_000_000 + timestamp_nanos
|
| 748 |
+
return combined_timestamp , key , iv
|
| 749 |
+
|
| 750 |
+
def Guest_GeneRaTe(self , uid , password):
|
| 751 |
+
self.url = "https://100067.connect.garena.com/oauth/guest/token/grant"
|
| 752 |
+
self.headers = {"Host": "100067.connect.garena.com","User-Agent": "GarenaMSDK/4.0.19P4(G011A ;Android 9;en;US;)","Content-Type": "application/x-www-form-urlencoded","Accept-Encoding": "gzip, deflate, br","Connection": "close",}
|
| 753 |
+
self.dataa = {"uid": f"{uid}","password": f"{password}","response_type": "token","client_type": "2","client_secret": "2ee44819e9b4598845141067b281621874d0d5d7af9d8f7e00c1e54715b7d1e3","client_id": "100067",}
|
| 754 |
+
try:
|
| 755 |
+
self.response = requests.post(self.url, headers=self.headers, data=self.dataa).json()
|
| 756 |
+
self.Access_ToKen , self.Access_Uid = self.response['access_token'] , self.response['open_id']
|
| 757 |
+
time.sleep(0.2)
|
| 758 |
+
return self.ToKen_GeneRaTe(self.Access_ToKen , self.Access_Uid)
|
| 759 |
+
except Exception as e:
|
| 760 |
+
print(f"Error in Guest_GeneRaTe: {e}")
|
| 761 |
+
time.sleep(10)
|
| 762 |
+
return self.Guest_GeneRaTe(uid, password)
|
| 763 |
+
|
| 764 |
+
def GeT_LoGin_PorTs(self , JwT_ToKen , PayLoad):
|
| 765 |
+
self.UrL = 'https://clientbp.ggwhitehawk.com/GetLoginData'
|
| 766 |
+
self.HeadErs = {
|
| 767 |
+
'Expect': '100-continue',
|
| 768 |
+
'Authorization': f'Bearer {JwT_ToKen}',
|
| 769 |
+
'X-Unity-Version': '2022.3.47f1',
|
| 770 |
+
'X-GA': 'v1 1',
|
| 771 |
+
'ReleaseVersion': 'OB52',
|
| 772 |
+
'Content-Type': 'application/x-www-form-urlencoded',
|
| 773 |
+
'User-Agent': 'UnityPlayer/2022.3.47f1 (UnityWebRequest/1.0, libcurl/8.5.0-DEV)',
|
| 774 |
+
'Host': 'clientbp.ggwhitehawk.com',
|
| 775 |
+
'Connection': 'close',
|
| 776 |
+
'Accept-Encoding': 'deflate, gzip',}
|
| 777 |
+
try:
|
| 778 |
+
self.Res = requests.post(self.UrL , headers=self.HeadErs , data=PayLoad , verify=False)
|
| 779 |
+
self.BesTo_data = json.loads(DeCode_PackEt(self.Res.content.hex()))
|
| 780 |
+
address , address2 = self.BesTo_data['32']['data'] , self.BesTo_data['14']['data']
|
| 781 |
+
ip , ip2 = address[:len(address) - 6] , address2[:len(address2) - 6]
|
| 782 |
+
port , port2 = address[len(address) - 5:] , address2[len(address2) - 5:]
|
| 783 |
+
return ip , port , ip2 , port2
|
| 784 |
+
except requests.RequestException as e:
|
| 785 |
+
print(f" - Bad Requests !")
|
| 786 |
+
print(" - Failed To GeT PorTs !")
|
| 787 |
+
return None, None, None, None
|
| 788 |
+
|
| 789 |
+
def ToKen_GeneRaTe(self , Access_ToKen , Access_Uid):
|
| 790 |
+
self.UrL = "https://loginbp.ggwhitehawk.com/MajorLogin"
|
| 791 |
+
self.HeadErs = {
|
| 792 |
+
'X-Unity-Version': '2022.3.47f1',
|
| 793 |
+
'ReleaseVersion': 'OB52',
|
| 794 |
+
'Content-Type': 'application/x-www-form-urlencoded',
|
| 795 |
+
'X-GA': 'v1 1',
|
| 796 |
+
'Content-Length': '928',
|
| 797 |
+
'User-Agent': 'UnityPlayer/2022.3.47f1 (UnityWebRequest/1.0, libcurl/8.5.0-DEV)',
|
| 798 |
+
'Host': 'loginbp.ggwhitehawk.com',
|
| 799 |
+
'Connection': 'Keep-Alive',
|
| 800 |
+
'Accept-Encoding': 'deflate, gzip'}
|
| 801 |
+
|
| 802 |
+
self.dT = bytes.fromhex('1a13323032362d30312d31342031323a31393a3032220966726565206669726528013a07312e3132302e324232416e64726f6964204f532039202f204150492d3238202850492f72656c2e636a772e32303232303531382e313134313333294a0848616e6468656c64520c4d544e2f537061636574656c5a045749464960800a68d00572033234307a2d7838362d3634205353453320535345342e3120535345342e32204156582041565832207c2032343030207c20348001e61e8a010f416472656e6f2028544d292036343092010d4f70656e474c20455320332e329a012b476f6f676c657c36323566373136662d393161372d343935622d396631362d303866653964336336353333a2010d3137362e32382e3134352e3239aa01026172b201203931333263366662373263616363666463383132306439656332636330366238ba010134c2010848616e6468656c64ca010d4f6e65506c7573204135303130d201025347ea014033646661396162396432353237306661663433326637623532383536346265396563343739306263373434613465626137303232353230373432376430633430f00101ca020c4d544e2f537061636574656cd2020457494649ca03203161633462383065636630343738613434323033626638666163363132306635e003b5ee02e803c28302f003af13f80384078004cf92028804b5ee029004cf92029804b5ee02b00404c80403d2043d2f646174612f6170702f636f6d2e6474732e667265656669726574682d49316855713474347641365f516f34432d58676165513d3d2f6c69622f61726de00401ea045f65363261623933353464386662356662303831646233333861636233333439317c2f646174612f6170702f636f6d2e6474732e667265656669726574682d49316855713474347641365f516f34432d58676165513d3d2f626173652e61706bf00406f804018a050233329a050a32303139313139363234b205094f70656e474c455332b805ff01c00504e005edb402ea05093372645f7061727479f2055c4b7173485438512b6c73302b4464496c2f4f617652726f7670795a596377676e51485151636d57776a476d587642514b4f4d63747870796f7054515754487653354a714d6967476b534c434c423651387839544161764d666c6a6f3d8806019006019a060134a2060134b206224006474f56540a011a5d0e115e00170d4b6e085709510a685a02586800096f000161')
|
| 803 |
+
|
| 804 |
+
self.dT = self.dT.replace(b'2026-01-14 12:19:02' , str(datetime.now())[:-7].encode())
|
| 805 |
+
self.dT = self.dT.replace(b'3dfa9ab9d25270faf432f7b528564be9ec4790bc744a4eba70225207427d0c40' , Access_ToKen.encode())
|
| 806 |
+
self.dT = self.dT.replace(b'9132c6fb72caccfdc8120d9ec2cc06b8' , Access_Uid.encode())
|
| 807 |
+
|
| 808 |
+
try:
|
| 809 |
+
hex_data = self.dT.hex()
|
| 810 |
+
encoded_data = EnC_AEs(hex_data)
|
| 811 |
+
|
| 812 |
+
if not all(c in '0123456789abcdefABCDEF' for c in encoded_data):
|
| 813 |
+
print("Invalid hex output from EnC_AEs, using alternative encoding")
|
| 814 |
+
encoded_data = hex_data
|
| 815 |
+
|
| 816 |
+
self.PaYload = bytes.fromhex(encoded_data)
|
| 817 |
+
except Exception as e:
|
| 818 |
+
print(f"Error in encoding: {e}")
|
| 819 |
+
self.PaYload = self.dT
|
| 820 |
+
|
| 821 |
+
self.ResPonse = requests.post(self.UrL, headers = self.HeadErs , data = self.PaYload , verify=False)
|
| 822 |
+
if self.ResPonse.status_code == 200 and len(self.ResPonse.text) > 10:
|
| 823 |
+
try:
|
| 824 |
+
self.BesTo_data = json.loads(DeCode_PackEt(self.ResPonse.content.hex()))
|
| 825 |
+
self.JwT_ToKen = self.BesTo_data['8']['data']
|
| 826 |
+
self.combined_timestamp , self.key , self.iv = self.GeT_Key_Iv(self.ResPonse.content)
|
| 827 |
+
ip , port , ip2 , port2 = self.GeT_LoGin_PorTs(self.JwT_ToKen , self.PaYload)
|
| 828 |
+
return self.JwT_ToKen , self.key , self.iv, self.combined_timestamp , ip , port , ip2 , port2
|
| 829 |
+
except Exception as e:
|
| 830 |
+
print(f"Error parsing response: {e}")
|
| 831 |
+
time.sleep(5)
|
| 832 |
+
return self.ToKen_GeneRaTe(Access_ToKen, Access_Uid)
|
| 833 |
+
else:
|
| 834 |
+
print(f"Error in ToKen_GeneRaTe, status: {self.ResPonse.status_code}")
|
| 835 |
+
time.sleep(5)
|
| 836 |
+
return self.ToKen_GeneRaTe(Access_ToKen, Access_Uid)
|
| 837 |
+
|
| 838 |
+
def Get_FiNal_ToKen_0115(self):
|
| 839 |
+
try:
|
| 840 |
+
result = self.Guest_GeneRaTe(self.id , self.password)
|
| 841 |
+
if not result:
|
| 842 |
+
print("Failed to get tokens, retrying...")
|
| 843 |
+
time.sleep(5)
|
| 844 |
+
return self.Get_FiNal_ToKen_0115()
|
| 845 |
+
|
| 846 |
+
token , key , iv , Timestamp , ip , port , ip2 , port2 = result
|
| 847 |
+
|
| 848 |
+
if not all([ip, port, ip2, port2]):
|
| 849 |
+
print("Failed to get ports, retrying...")
|
| 850 |
+
time.sleep(5)
|
| 851 |
+
return self.Get_FiNal_ToKen_0115()
|
| 852 |
+
|
| 853 |
+
self.JwT_ToKen = token
|
| 854 |
+
try:
|
| 855 |
+
self.AfTer_DeC_JwT = jwt.decode(token, options={"verify_signature": False})
|
| 856 |
+
self.AccounT_Uid = self.AfTer_DeC_JwT.get('account_id')
|
| 857 |
+
self.EncoDed_AccounT = hex(self.AccounT_Uid)[2:]
|
| 858 |
+
self.HeX_VaLue = DecodE_HeX(Timestamp)
|
| 859 |
+
self.TimE_HEx = self.HeX_VaLue
|
| 860 |
+
self.JwT_ToKen_ = token.encode().hex()
|
| 861 |
+
print(f'ProxCed Uid : {self.AccounT_Uid}')
|
| 862 |
+
except Exception as e:
|
| 863 |
+
print(f"Error In ToKen : {e}")
|
| 864 |
+
time.sleep(5)
|
| 865 |
+
return self.Get_FiNal_ToKen_0115()
|
| 866 |
+
|
| 867 |
+
try:
|
| 868 |
+
self.Header = hex(len(EnC_PacKeT(self.JwT_ToKen_, key, iv)) // 2)[2:]
|
| 869 |
+
length = len(self.EncoDed_AccounT)
|
| 870 |
+
self.__ = '00000000'
|
| 871 |
+
if length == 9: self.__ = '0000000'
|
| 872 |
+
elif length == 8: self.__ = '00000000'
|
| 873 |
+
elif length == 10: self.__ = '000000'
|
| 874 |
+
elif length == 7: self.__ = '000000000'
|
| 875 |
+
else:
|
| 876 |
+
print('Unexpected length encountered')
|
| 877 |
+
self.Header = f'0115{self.__}{self.EncoDed_AccounT}{self.TimE_HEx}00000{self.Header}'
|
| 878 |
+
self.FiNal_ToKen_0115 = self.Header + EnC_PacKeT(self.JwT_ToKen_ , key , iv)
|
| 879 |
+
except Exception as e:
|
| 880 |
+
print(f"Error In Final Token : {e}")
|
| 881 |
+
time.sleep(5)
|
| 882 |
+
return self.Get_FiNal_ToKen_0115()
|
| 883 |
+
|
| 884 |
+
self.AutH_ToKen = self.FiNal_ToKen_0115
|
| 885 |
+
self.Connect_SerVer(self.JwT_ToKen , self.AutH_ToKen , ip , port , key , iv , ip2 , port2)
|
| 886 |
+
return self.AutH_ToKen , key , iv
|
| 887 |
+
|
| 888 |
+
except Exception as e:
|
| 889 |
+
print(f"Error in Get_FiNal_ToKen_0115: {e}")
|
| 890 |
+
time.sleep(10)
|
| 891 |
+
return self.Get_FiNal_ToKen_0115()
|
| 892 |
+
|
| 893 |
+
def start_account(account):
|
| 894 |
+
try:
|
| 895 |
+
print(f"Starting account: {account['id']}")
|
| 896 |
+
FF_CLient(account['id'], account['password'])
|
| 897 |
+
except Exception as e:
|
| 898 |
+
print(f"Error starting account {account['id']}: {e}")
|
| 899 |
+
time.sleep(5)
|
| 900 |
+
start_account(account)
|
| 901 |
+
|
| 902 |
+
def run_bot():
|
| 903 |
+
print("Bot started...")
|
| 904 |
+
if WEBHOOK_URL:
|
| 905 |
+
try:
|
| 906 |
+
bot.remove_webhook()
|
| 907 |
+
time.sleep(1)
|
| 908 |
+
webhook_full_url = WEBHOOK_URL.rstrip('/') + '/' + TOKEN
|
| 909 |
+
bot.set_webhook(url=webhook_full_url)
|
| 910 |
+
print(f"Webhook set successfully to: {webhook_full_url}")
|
| 911 |
+
except Exception as e:
|
| 912 |
+
print(f"Failed to set webhook (will still receive updates if pre-configured): {e}")
|
| 913 |
+
else:
|
| 914 |
+
print("No WEBHOOK_URL set, running in passive webhook mode")
|
| 915 |
+
print("Bot is ready to receive webhook updates via Flask")
|
| 916 |
+
|
| 917 |
+
@app.route('/' + TOKEN, methods=['POST'])
|
| 918 |
+
def webhook():
|
| 919 |
+
if request.headers.get('content-type') == 'application/json':
|
| 920 |
+
json_string = request.get_data().decode('utf-8')
|
| 921 |
+
update = telebot.types.Update.de_json(json_string)
|
| 922 |
+
bot.process_new_updates([update])
|
| 923 |
+
return ''
|
| 924 |
+
else:
|
| 925 |
+
abort(403)
|
| 926 |
+
|
| 927 |
+
@app.route('/')
|
| 928 |
+
def index():
|
| 929 |
+
return 'Bot is running!'
|
| 930 |
+
|
| 931 |
+
def StarT_SerVer():
|
| 932 |
+
threads = []
|
| 933 |
+
|
| 934 |
+
for account in ACCOUNTS:
|
| 935 |
+
thread = threading.Thread(target=start_account, args=(account,))
|
| 936 |
+
thread.daemon = True
|
| 937 |
+
threads.append(thread)
|
| 938 |
+
thread.start()
|
| 939 |
+
time.sleep(1)
|
| 940 |
+
|
| 941 |
+
for thread in threads:
|
| 942 |
+
thread.join()
|
| 943 |
+
|
| 944 |
+
if __name__ == "__main__":
|
| 945 |
+
bot_thread = threading.Thread(target=run_bot, daemon=True)
|
| 946 |
+
bot_thread.start()
|
| 947 |
+
accounts_thread = threading.Thread(target=StarT_SerVer, daemon=True)
|
| 948 |
+
accounts_thread.start()
|
| 949 |
+
print("Starting Flask server for webhook...")
|
| 950 |
+
app.run(host='0.0.0.0', port=7860)
|
approved.txt
ADDED
|
File without changes
|
black9.py
ADDED
|
@@ -0,0 +1,494 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# By AbdeeLkarim BesTo
|
| 2 |
+
|
| 3 |
+
import requests , json , binascii , time , urllib3 , base64 , datetime , re ,socket , threading , random , os
|
| 4 |
+
from protobuf_decoder.protobuf_decoder import Parser
|
| 5 |
+
from Crypto.Cipher import AES
|
| 6 |
+
from Crypto.Util.Padding import pad , unpad
|
| 7 |
+
from datetime import datetime
|
| 8 |
+
from google.protobuf.timestamp_pb2 import Timestamp
|
| 9 |
+
|
| 10 |
+
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
|
| 11 |
+
|
| 12 |
+
Key , Iv = bytes([89, 103, 38, 116, 99, 37, 68, 69, 117, 104, 54, 37, 90, 99, 94, 56]) , bytes([54, 111, 121, 90, 68, 114, 50, 50, 69, 51, 121, 99, 104, 106, 77, 37])
|
| 13 |
+
|
| 14 |
+
def EnC_AEs(HeX):
|
| 15 |
+
cipher = AES.new(Key , AES.MODE_CBC , Iv)
|
| 16 |
+
return cipher.encrypt(pad(bytes.fromhex(HeX), AES.block_size)).hex()
|
| 17 |
+
|
| 18 |
+
def DEc_AEs(HeX):
|
| 19 |
+
cipher = AES.new(Key , AES.MODE_CBC , Iv)
|
| 20 |
+
return unpad(cipher.decrypt(bytes.fromhex(HeX)), AES.block_size).hex()
|
| 21 |
+
|
| 22 |
+
def EnC_PacKeT(HeX , K , V):
|
| 23 |
+
return AES.new(K , AES.MODE_CBC , V).encrypt(pad(bytes.fromhex(HeX) ,16)).hex()
|
| 24 |
+
|
| 25 |
+
def DEc_PacKeT(HeX , K , V):
|
| 26 |
+
return unpad(AES.new(K , AES.MODE_CBC , V).decrypt(bytes.fromhex(HeX)) , 16).hex()
|
| 27 |
+
|
| 28 |
+
def EnC_Uid(H , Tp):
|
| 29 |
+
e , H = [] , int(H)
|
| 30 |
+
while H:
|
| 31 |
+
e.append((H & 0x7F) | (0x80 if H > 0x7F else 0)) ; H >>= 7
|
| 32 |
+
return bytes(e).hex() if Tp == 'Uid' else None
|
| 33 |
+
|
| 34 |
+
def EnC_Vr(N):
|
| 35 |
+
if N < 0: ''
|
| 36 |
+
H = []
|
| 37 |
+
while True:
|
| 38 |
+
BesTo = N & 0x7F ; N >>= 7
|
| 39 |
+
if N: BesTo |= 0x80
|
| 40 |
+
H.append(BesTo)
|
| 41 |
+
if not N: break
|
| 42 |
+
return bytes(H)
|
| 43 |
+
|
| 44 |
+
def DEc_Uid(H):
|
| 45 |
+
n = s = 0
|
| 46 |
+
for b in bytes.fromhex(H):
|
| 47 |
+
n |= (b & 0x7F) << s
|
| 48 |
+
if not b & 0x80: break
|
| 49 |
+
s += 7
|
| 50 |
+
return n
|
| 51 |
+
|
| 52 |
+
def CrEaTe_VarianT(field_number, value):
|
| 53 |
+
field_header = (field_number << 3) | 0
|
| 54 |
+
return EnC_Vr(field_header) + EnC_Vr(value)
|
| 55 |
+
|
| 56 |
+
def CrEaTe_LenGTh(field_number, value):
|
| 57 |
+
field_header = (field_number << 3) | 2
|
| 58 |
+
encoded_value = value.encode() if isinstance(value, str) else value
|
| 59 |
+
return EnC_Vr(field_header) + EnC_Vr(len(encoded_value)) + encoded_value
|
| 60 |
+
|
| 61 |
+
def CrEaTe_ProTo(fields):
|
| 62 |
+
packet = bytearray()
|
| 63 |
+
for field, value in fields.items():
|
| 64 |
+
if isinstance(value, dict):
|
| 65 |
+
nested_packet = CrEaTe_ProTo(value)
|
| 66 |
+
packet.extend(CrEaTe_LenGTh(field, nested_packet))
|
| 67 |
+
elif isinstance(value, int):
|
| 68 |
+
packet.extend(CrEaTe_VarianT(field, value))
|
| 69 |
+
elif isinstance(value, str) or isinstance(value, bytes):
|
| 70 |
+
packet.extend(CrEaTe_LenGTh(field, value))
|
| 71 |
+
return packet
|
| 72 |
+
|
| 73 |
+
def DecodE_HeX(H):
|
| 74 |
+
R = hex(H)
|
| 75 |
+
F = str(R)[2:]
|
| 76 |
+
if len(F) == 1: F = "0" + F ; return F
|
| 77 |
+
else: return F
|
| 78 |
+
|
| 79 |
+
def Fix_PackEt(parsed_results):
|
| 80 |
+
result_dict = {}
|
| 81 |
+
for result in parsed_results:
|
| 82 |
+
field_data = {}
|
| 83 |
+
field_data['wire_type'] = result.wire_type
|
| 84 |
+
if result.wire_type == "varint":
|
| 85 |
+
field_data['data'] = result.data
|
| 86 |
+
if result.wire_type == "string":
|
| 87 |
+
field_data['data'] = result.data
|
| 88 |
+
if result.wire_type == "bytes":
|
| 89 |
+
field_data['data'] = result.data
|
| 90 |
+
elif result.wire_type == 'length_delimited':
|
| 91 |
+
field_data["data"] = Fix_PackEt(result.data.results)
|
| 92 |
+
result_dict[result.field] = field_data
|
| 93 |
+
return result_dict
|
| 94 |
+
|
| 95 |
+
def DeCode_PackEt(input_text):
|
| 96 |
+
try:
|
| 97 |
+
parsed_results = Parser().parse(input_text)
|
| 98 |
+
parsed_results_objects = parsed_results
|
| 99 |
+
parsed_results_dict = Fix_PackEt(parsed_results_objects)
|
| 100 |
+
json_data = json.dumps(parsed_results_dict)
|
| 101 |
+
return json_data
|
| 102 |
+
except Exception as e:
|
| 103 |
+
print(f"error {e}")
|
| 104 |
+
return None
|
| 105 |
+
|
| 106 |
+
def xMsGFixinG(n):
|
| 107 |
+
return '🗿'.join(str(n)[i:i + 3] for i in range(0 , len(str(n)) , 3))
|
| 108 |
+
|
| 109 |
+
def ArA_CoLor():
|
| 110 |
+
Tp = ["32CD32" , "00BFFF" , "00FA9A" , "90EE90" , "FF4500" , "FF6347" , "FF69B4" , "FF8C00" , "FF6347" , "FFD700" , "FFDAB9" , "F0F0F0" , "F0E68C" , "D3D3D3" , "A9A9A9" , "D2691E" , "CD853F" , "BC8F8F" , "6A5ACD" , "483D8B" , "4682B4", "9370DB" , "C71585" , "FF8C00" , "FFA07A"]
|
| 111 |
+
return random.choice(Tp)
|
| 112 |
+
|
| 113 |
+
def xBunnEr():
|
| 114 |
+
bN = [902000306 , 902000305 , 902000003 , 902000016 , 902000017 , 902000019 , 902000020 , 902000021 , 902000023 , 902000070 , 902000087 , 902000108 , 902000011 , 902049020 , 902049018 , 902049017 , 902049016 , 902049015 , 902049003 , 902033016 , 902033017 , 902033018 , 902048018 , 902000306 , 902000305]
|
| 115 |
+
return random.choice(bN)
|
| 116 |
+
|
| 117 |
+
def xSEndMsg(Msg , Tp , Tp2 , id , K , V):
|
| 118 |
+
feilds = {1: id, 2: Tp2, 3: Tp, 4: Msg , 5: 1735129800, 7: 2, 9: {1: "xBesTo - C4", 2: xBunnEr(), 3: 901048018, 4: 330, 5: 909034009, 8: "xBesTo - C4", 10: 1, 11: 1, 14: {1: 1158053040, 2: 8, 3: "\u0010\u0015\b\n\u000b\u0015\f\u000f\u0011\u0004\u0007\u0002\u0003\r\u000e\u0012\u0001\u0005\u0006"}}, 10: "en", 13: {2: 1, 3: 1}, 14: {}}
|
| 119 |
+
Pk = str(CrEaTe_ProTo(feilds).hex())
|
| 120 |
+
Pk = "080112" + EnC_Uid(len(Pk) // 2 , Tp = 'Uid') + Pk
|
| 121 |
+
return GeneRaTePk(str(Pk) , '1215' , K , V)
|
| 122 |
+
|
| 123 |
+
def Auth_Chat(idT, sq, K, V):
|
| 124 |
+
fields = {
|
| 125 |
+
1: 3,
|
| 126 |
+
2: {
|
| 127 |
+
1: idT,
|
| 128 |
+
3: "fr",
|
| 129 |
+
4: sq
|
| 130 |
+
}
|
| 131 |
+
}
|
| 132 |
+
return GeneRaTePk(str(CrEaTe_ProTo(fields).hex()) , '1215' , K , V)
|
| 133 |
+
def xSendTeamMsg(msg, idT, K, V):
|
| 134 |
+
fields = {
|
| 135 |
+
1: 1,
|
| 136 |
+
2: {
|
| 137 |
+
1: 12404281032,
|
| 138 |
+
2: idT,
|
| 139 |
+
4: msg,
|
| 140 |
+
7: 2,
|
| 141 |
+
10: "fr",
|
| 142 |
+
9: {
|
| 143 |
+
1: "C4 TEAM",
|
| 144 |
+
2: xBunnEr(),
|
| 145 |
+
4: 330,
|
| 146 |
+
5: 827001005,
|
| 147 |
+
8: "C4 TEAM",
|
| 148 |
+
10: 1,
|
| 149 |
+
11: 1,
|
| 150 |
+
12: {
|
| 151 |
+
1: 2
|
| 152 |
+
},
|
| 153 |
+
14: {
|
| 154 |
+
1: 1158053040,
|
| 155 |
+
2: 8,
|
| 156 |
+
3: "\u0010\u0015\b\n\u000b\u0015\f\u000f\u0011\u0004\u0007\u0002\u0003\r\u000e\u0012\u0001\u0005\u0006"
|
| 157 |
+
}
|
| 158 |
+
},
|
| 159 |
+
13: {
|
| 160 |
+
1: 2,
|
| 161 |
+
2: 1
|
| 162 |
+
},
|
| 163 |
+
14:{}
|
| 164 |
+
}
|
| 165 |
+
}
|
| 166 |
+
|
| 167 |
+
return GeneRaTePk(str(CrEaTe_ProTo(fields).hex()) , '1215' , K , V)
|
| 168 |
+
|
| 169 |
+
|
| 170 |
+
def spmroom(K, V, uid):
|
| 171 |
+
fields = {
|
| 172 |
+
1: 22, # ✅ مفتاح رقمي
|
| 173 |
+
2: { # ✅ مفتاح رقمي
|
| 174 |
+
1: int(uid) # ✅ مفتاح رقمي
|
| 175 |
+
}
|
| 176 |
+
}
|
| 177 |
+
return GeneRaTePk(str(CrEaTe_ProTo(fields).hex()), '0E15', K, V)
|
| 178 |
+
|
| 179 |
+
def openroom(K, V):
|
| 180 |
+
fields = {
|
| 181 |
+
1: 2, # ✅ Integer key
|
| 182 |
+
2: { # ✅ Integer key
|
| 183 |
+
1: 1, # ✅ Integer key
|
| 184 |
+
2: 15, # ✅ Integer key
|
| 185 |
+
3: 5,
|
| 186 |
+
4: "AlliFF",
|
| 187 |
+
5: "1",
|
| 188 |
+
6: 12,
|
| 189 |
+
7: 1,
|
| 190 |
+
8: 1,
|
| 191 |
+
9: 1,
|
| 192 |
+
11: 1,
|
| 193 |
+
12: 2,
|
| 194 |
+
14: 36981056,
|
| 195 |
+
15: {
|
| 196 |
+
1: "IDC3",
|
| 197 |
+
2: 126,
|
| 198 |
+
3: "ME"
|
| 199 |
+
},
|
| 200 |
+
16: "\u0001\u0003\u0004\u0007\t\n\u000b\u0012\u000f\u000e\u0016\u0019\u001a \u001d",
|
| 201 |
+
18: 2368584,
|
| 202 |
+
27: 1,
|
| 203 |
+
34: "\u0000\u0001",
|
| 204 |
+
40: "en",
|
| 205 |
+
48: 1,
|
| 206 |
+
49: {
|
| 207 |
+
1: 21
|
| 208 |
+
},
|
| 209 |
+
50: {
|
| 210 |
+
1: 36981056,
|
| 211 |
+
2: 2368584,
|
| 212 |
+
5: 2
|
| 213 |
+
}
|
| 214 |
+
}
|
| 215 |
+
}
|
| 216 |
+
return GeneRaTePk(str(CrEaTe_ProTo(fields).hex()), '0E15', K, V)
|
| 217 |
+
|
| 218 |
+
|
| 219 |
+
def OpEnSq(K , V):
|
| 220 |
+
fields = {1: 1, 2: {2: "\u0001", 3: 1, 4: 1, 5: "en", 9: 1, 11: 1, 13: 1, 14: {2: 5756, 6: 11, 8: "1.111.5", 9: 2, 10: 4}}}
|
| 221 |
+
return GeneRaTePk(str(CrEaTe_ProTo(fields).hex()) , '0515' , K , V)
|
| 222 |
+
|
| 223 |
+
def cHSq(Nu , Uid , K , V):
|
| 224 |
+
fields = {1: 17, 2: {1: int(Uid), 2: 1, 3: int(Nu - 1), 4: 62, 5: "\u001a", 8: 5, 13: 329}}
|
| 225 |
+
return GeneRaTePk(str(CrEaTe_ProTo(fields).hex()) , '0515' , K , V)
|
| 226 |
+
|
| 227 |
+
def SEnd_InV(Nu , Uid , K , V):
|
| 228 |
+
fields = {1: 2 , 2: {1: int(Uid) , 2: "ME" , 4: int(Nu)}}
|
| 229 |
+
return GeneRaTePk(str(CrEaTe_ProTo(fields).hex()) , '0515' , K , V)
|
| 230 |
+
|
| 231 |
+
def ExiT(id , K , V):
|
| 232 |
+
fields = {
|
| 233 |
+
1: 7,
|
| 234 |
+
2: {
|
| 235 |
+
1: int(11037044965)
|
| 236 |
+
}
|
| 237 |
+
}
|
| 238 |
+
return GeneRaTePk(str(CrEaTe_ProTo(fields).hex()) , '0515' , K , V)
|
| 239 |
+
|
| 240 |
+
def AuthClan(CLan_Uid , AuTh , K , V):
|
| 241 |
+
fields = {1: 3, 2: {1: int(CLan_Uid) , 2: 1, 4: str(AuTh)}}
|
| 242 |
+
return GeneRaTePk(str(CrEaTe_ProTo(fields).hex()) , '1201' , K , V)
|
| 243 |
+
|
| 244 |
+
def GeT_Status(PLayer_Uid , K , V):
|
| 245 |
+
PLayer_Uid = EnC_Uid(PLayer_Uid , Tp = 'Uid')
|
| 246 |
+
if len(PLayer_Uid) == 8: Pk = f'080112080a04{PLayer_Uid}1005'
|
| 247 |
+
elif len(PLayer_Uid) == 10: Pk = f"080112090a05{PLayer_Uid}1005"
|
| 248 |
+
return GeneRaTePk(Pk , '0f15' , K , V)
|
| 249 |
+
|
| 250 |
+
def SPam_Room(Uid , Rm , Nm , K , V):
|
| 251 |
+
fields = {1: 78, 2: {1: int(Rm), 2: f"[{ArA_CoLor()}]{Nm}", 3: {2: 1, 3: 1}, 4: 330, 5: 1, 6: 201, 10: xBunnEr(), 11: int(Uid), 12: 1}}
|
| 252 |
+
return GeneRaTePk(str(CrEaTe_ProTo(fields).hex()) , '0e15' , K , V)
|
| 253 |
+
|
| 254 |
+
def Join_Room(room_id , K , V):
|
| 255 |
+
fields = {1: 3, 2: {1: int(room_id), 8: {1: "IDC1", 2: 3000, 3: "ME"}, 9: "\x01\t\n\x12\x19 ", 10: 1, 12: b"\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01", 13: 3, 14: 3, 16: "ME"}}
|
| 256 |
+
return GeneRaTePk(str(CrEaTe_ProTo(fields).hex()) , '0e10' , K , V)
|
| 257 |
+
|
| 258 |
+
def SPamSq(Uid , K , V):
|
| 259 |
+
fields = {1: 33, 2: {1: int(Uid) , 2: 'ME', 3: 1, 4: 1, 7: 330, 8: 19459, 9: 100, 12: 1, 16: 1, 17: {2: 94, 6: 11, 8: '1.111.5', 9: 3, 10: 2}, 18: 201, 23: {2: 1, 3: 1}, 24: xBunnEr() , 26: {}, 28: {}}}
|
| 260 |
+
return GeneRaTePk(str(CrEaTe_ProTo(fields).hex()) , '0515' , K , V)
|
| 261 |
+
|
| 262 |
+
def AccEpT(PLayer_Uid , AuTh_CodE_Sq , K , V):
|
| 263 |
+
fields = {1: 4, 2: {1: int(PLayer_Uid), 3: int(PLayer_Uid), 4: "\u0001\u0007\t\n\u0012\u0019\u001a ", 8: 1, 9: {2: 1393, 4: "wW_T", 6: 11, 8: "1.111.5", 9: 3, 10: 2}, 10: AuTh_CodE_Sq, 12: 1, 13: "en", 16: "OR"}}
|
| 264 |
+
return GeneRaTePk(str(CrEaTe_ProTo(fields).hex()) , '0515' , K , V)
|
| 265 |
+
|
| 266 |
+
def GenJoinSquadsPacket(code, key, iv):
|
| 267 |
+
fields = {}
|
| 268 |
+
fields[1] = 4
|
| 269 |
+
fields[2] = {}
|
| 270 |
+
fields[2][4] = bytes.fromhex("01090a0b121920")
|
| 271 |
+
fields[2][5] = str(code)
|
| 272 |
+
fields[2][6] = 6
|
| 273 |
+
fields[2][8] = 1
|
| 274 |
+
fields[2][9] = {}
|
| 275 |
+
fields[2][9][2] = 800
|
| 276 |
+
fields[2][9][6] = 11
|
| 277 |
+
fields[2][9][8] = "1.111.1"
|
| 278 |
+
fields[2][9][9] = 5
|
| 279 |
+
fields[2][9][10] = 1
|
| 280 |
+
print(fields)
|
| 281 |
+
return GeneRaTePk(str(CrEaTe_ProTo(fields).hex()), '0515', key, iv)
|
| 282 |
+
#1750287629500765351_vfhkisb7hv 8679231987
|
| 283 |
+
def ghost_pakcet(player_id , nm , secret_code , key ,iv):
|
| 284 |
+
fields = {
|
| 285 |
+
1: 61,
|
| 286 |
+
2: {
|
| 287 |
+
1: int(player_id),
|
| 288 |
+
2: {
|
| 289 |
+
1: int(player_id),
|
| 290 |
+
2: 1159,
|
| 291 |
+
3: f"[b][c][{ArA_CoLor()}]{nm}",
|
| 292 |
+
5: 12,
|
| 293 |
+
6: 15,
|
| 294 |
+
7: 1,
|
| 295 |
+
8: {
|
| 296 |
+
2: 1,
|
| 297 |
+
3: 1,
|
| 298 |
+
},
|
| 299 |
+
9: 3,
|
| 300 |
+
},
|
| 301 |
+
3: secret_code,},}
|
| 302 |
+
return GeneRaTePk(str(CrEaTe_ProTo(fields).hex()), '0515', key, iv)
|
| 303 |
+
|
| 304 |
+
def _V(b, i):
|
| 305 |
+
r = s = 0
|
| 306 |
+
while True:
|
| 307 |
+
c = b[i]; i += 1
|
| 308 |
+
r |= (c & 0x7F) << s
|
| 309 |
+
if c < 0x80: break
|
| 310 |
+
s += 7
|
| 311 |
+
return r, i
|
| 312 |
+
|
| 313 |
+
def PrOtO(hx):
|
| 314 |
+
b, i, R = bytes.fromhex(hx), 0, {}
|
| 315 |
+
while i < len(b):
|
| 316 |
+
H, i = _V(b, i)
|
| 317 |
+
F, T = H >> 3, H & 7
|
| 318 |
+
if T == 0:
|
| 319 |
+
R[F], i = _V(b, i)
|
| 320 |
+
elif T == 2:
|
| 321 |
+
L, i = _V(b, i)
|
| 322 |
+
S = b[i:i+L]; i += L
|
| 323 |
+
try: R[F] = S.decode()
|
| 324 |
+
except:
|
| 325 |
+
try: R[F] = PrOtO(S.hex())
|
| 326 |
+
except: R[F] = S
|
| 327 |
+
elif T == 5:
|
| 328 |
+
R[F] = int.from_bytes(b[i:i+4], 'little'); i += 4
|
| 329 |
+
else:
|
| 330 |
+
raise ValueError(f'Unknown wire type: {T}')
|
| 331 |
+
return R
|
| 332 |
+
|
| 333 |
+
def GeT_KEy(obj , target):
|
| 334 |
+
values = []
|
| 335 |
+
def collect(o):
|
| 336 |
+
if isinstance(o, dict):
|
| 337 |
+
for k, v in o.items():
|
| 338 |
+
if k == target:
|
| 339 |
+
values.append(v)
|
| 340 |
+
collect(v)
|
| 341 |
+
elif isinstance(o, list):
|
| 342 |
+
for v in o:
|
| 343 |
+
collect(v)
|
| 344 |
+
collect(obj)
|
| 345 |
+
return values[-1] if values else None
|
| 346 |
+
|
| 347 |
+
|
| 348 |
+
def GeneRaTePk(Pk , N , K , V):
|
| 349 |
+
PkEnc = EnC_PacKeT(Pk , K , V)
|
| 350 |
+
_ = DecodE_HeX(int(len(PkEnc) // 2))
|
| 351 |
+
if len(_) == 2: HeadEr = N + "000000"
|
| 352 |
+
elif len(_) == 3: HeadEr = N + "00000"
|
| 353 |
+
elif len(_) == 4: HeadEr = N + "0000"
|
| 354 |
+
elif len(_) == 5: HeadEr = N + "000"
|
| 355 |
+
return bytes.fromhex(HeadEr + _ + PkEnc)
|
| 356 |
+
|
| 357 |
+
def GuiLd_AccEss(Tg , Nm , Uid , BLk , OwN , AprV):
|
| 358 |
+
return Tg in Nm and Uid not in BLk and Uid in (OwN | AprV)
|
| 359 |
+
|
| 360 |
+
def ChEck_Commande(id):
|
| 361 |
+
return "<" not in id and ">" not in id and "[" not in id and "]" not in id
|
| 362 |
+
|
| 363 |
+
def L_DaTa():
|
| 364 |
+
load = lambda f: json.load(open(f)) if os.path.exists(f) else {}
|
| 365 |
+
return map(load, ["BesTo_CLan_LiKes.json" , "BesTo_RemaininG_LiKes.json" , "BesTo_RemaininG_Room.json"])
|
| 366 |
+
|
| 367 |
+
def ChEck_Limit_CLan(Uid , STaTus):
|
| 368 |
+
data , max_use , file = (like_data_clan, 10, "BesTo_CLan_LiKes.json") if STaTus == "like" else ''
|
| 369 |
+
t , limit = time.time(), 86400
|
| 370 |
+
u = data.get(str(Uid), {"count": 0, "start_time": t})
|
| 371 |
+
if t - u["start_time"] >= limit:
|
| 372 |
+
u = {"count": 0, "start_time": t}
|
| 373 |
+
if u["count"] < max_use:
|
| 374 |
+
u["count"] += 1
|
| 375 |
+
data[str(Uid)] = u
|
| 376 |
+
json.dump(data , open(file, "w"))
|
| 377 |
+
return f"{max_use - u['count']}" , datetime.fromtimestamp(u["start_time"] + limit).strftime("%I:%M %p - %d/%m/%y")
|
| 378 |
+
return False , datetime.fromtimestamp(u["start_time"] + limit).strftime("%I:%M %p - %d/%m/%y")
|
| 379 |
+
|
| 380 |
+
def ChEck_Limit(Uid , STaTus):
|
| 381 |
+
data , max_use , file = (like_data, 10, "BesTo_RemaininG_LiKes.json") if STaTus == "like" else (room_data, 10, "BesTo_RemaininG_Room.json")
|
| 382 |
+
t , limit = time.time(), 86400
|
| 383 |
+
u = data.get(str(Uid), {"count": 0, "start_time": t})
|
| 384 |
+
if t - u["start_time"] >= limit:
|
| 385 |
+
u = {"count": 0, "start_time": t}
|
| 386 |
+
if u["count"] < max_use:
|
| 387 |
+
u["count"] += 1
|
| 388 |
+
data[str(Uid)] = u
|
| 389 |
+
json.dump(data , open(file, "w"))
|
| 390 |
+
return f"{max_use - u['count']}" , datetime.fromtimestamp(u["start_time"] + limit).strftime("%I:%M %p - %d/%m/%y")
|
| 391 |
+
return False , datetime.fromtimestamp(u["start_time"] + limit).strftime("%I:%M %p - %d/%m/%y")
|
| 392 |
+
|
| 393 |
+
f = 'blacklist.txt'
|
| 394 |
+
approvee = 'approved.txt'
|
| 395 |
+
black , approve = [] , []
|
| 396 |
+
|
| 397 |
+
def load_blacklist():
|
| 398 |
+
global black
|
| 399 |
+
try:
|
| 400 |
+
with open(f, 'r') as file:
|
| 401 |
+
black = [line.strip() for line in file if line.strip()]
|
| 402 |
+
except: black = []
|
| 403 |
+
|
| 404 |
+
def encrypt_uids():
|
| 405 |
+
global black
|
| 406 |
+
try:
|
| 407 |
+
if black: black = [EnC_Uid(uid , Tp = 'Uid') for uid in black]
|
| 408 |
+
except:
|
| 409 |
+
try: open(f, 'w').close()
|
| 410 |
+
except: pass
|
| 411 |
+
load_blacklist()
|
| 412 |
+
|
| 413 |
+
if not black: open(f, 'w').close()
|
| 414 |
+
|
| 415 |
+
def load_approve():
|
| 416 |
+
global approve
|
| 417 |
+
try:
|
| 418 |
+
with open(approvee, 'r') as file: approve = [line.strip() for line in file if line.strip()]
|
| 419 |
+
except: approve = []
|
| 420 |
+
|
| 421 |
+
def encrypt_uids2():
|
| 422 |
+
global approve
|
| 423 |
+
try:
|
| 424 |
+
if approve: approve = [EnC_Uid(uid , Tp = 'Uid') for uid in approve]
|
| 425 |
+
except:
|
| 426 |
+
try: open(approvee, 'w').close()
|
| 427 |
+
except: pass
|
| 428 |
+
load_approve()
|
| 429 |
+
|
| 430 |
+
if not approve: open(approvee, 'w').close()
|
| 431 |
+
|
| 432 |
+
def Add_Uid(user_id):
|
| 433 |
+
with open(f, 'r') as file: lines = file.read().splitlines()
|
| 434 |
+
if str(user_id) not in lines:
|
| 435 |
+
with open(f, 'a') as file: file.write(f"{user_id}\n")
|
| 436 |
+
|
| 437 |
+
def Remove_Uid(f, player_uid):
|
| 438 |
+
try:
|
| 439 |
+
with open(f, 'r+') as file: lines = file.readlines() ; file.seek(0), file.truncate(), file.writelines(l for l in lines if l.strip() != player_uid) ; return True
|
| 440 |
+
except FileNotFoundError: return False
|
| 441 |
+
|
| 442 |
+
def A(user_id):
|
| 443 |
+
with open(approvee, 'r') as file: lines = file.read().splitlines()
|
| 444 |
+
if str(user_id) not in lines:
|
| 445 |
+
with open(approvee, 'a') as file: file.write(f"{user_id}\n")
|
| 446 |
+
|
| 447 |
+
def D(approvee, player_uid):
|
| 448 |
+
try:
|
| 449 |
+
with open(approvee, 'r+') as file: lines = file.readlines() ; file.seek(0), file.truncate(), file.writelines(l for l in lines if l.strip() != player_uid) ; return True
|
| 450 |
+
except FileNotFoundError: return False
|
| 451 |
+
|
| 452 |
+
def Clear():
|
| 453 |
+
try:
|
| 454 |
+
open(f, 'w').close() ; black.clear() ; return True
|
| 455 |
+
except: return False
|
| 456 |
+
|
| 457 |
+
def Add_Black(user_id):
|
| 458 |
+
Add_Uid(user_id)
|
| 459 |
+
if EnC_Uid(user_id , Tp = 'Uid') not in black: black.append(EnC_Uid(user_id , Tp = 'Uid')) ; return True
|
| 460 |
+
else: return False
|
| 461 |
+
|
| 462 |
+
def Rem_Black(user_id):
|
| 463 |
+
user_id_encrypted = EnC_Uid(user_id , Tp = 'Uid')
|
| 464 |
+
if user_id_encrypted in black: black.remove(user_id_encrypted) ; Remove_Uid(f , user_id) ; return True
|
| 465 |
+
else: return False
|
| 466 |
+
|
| 467 |
+
def Show_Uids():
|
| 468 |
+
try:
|
| 469 |
+
with open(f) as file: return "\n".join(sorted(file.read().splitlines(), key=int)) or False
|
| 470 |
+
except (FileNotFoundError, ValueError): return False
|
| 471 |
+
|
| 472 |
+
def Approved(user_id):
|
| 473 |
+
A(user_id)
|
| 474 |
+
if EnC_Uid(user_id , Tp = 'Uid') not in approve: approve.append(EnC_Uid(user_id , Tp = 'Uid')) ; return True
|
| 475 |
+
else: return False
|
| 476 |
+
|
| 477 |
+
def DeApproved(user_id):
|
| 478 |
+
user_id_encrypted = EnC_Uid(user_id , Tp = 'Uid')
|
| 479 |
+
if user_id_encrypted in approve: approve.remove(user_id_encrypted) ; D(approvee , user_id) ; return True
|
| 480 |
+
else: return False
|
| 481 |
+
|
| 482 |
+
def Show_Approvs():
|
| 483 |
+
try:
|
| 484 |
+
with open(approvee) as file: return "\n".join(sorted(file.read().splitlines(), key=int)) or False
|
| 485 |
+
except (FileNotFoundError, ValueError): return False
|
| 486 |
+
|
| 487 |
+
def Clear_Approvs():
|
| 488 |
+
try:
|
| 489 |
+
open(approvee, 'w').close() ; approve.clear() ; return True
|
| 490 |
+
except: return False
|
| 491 |
+
|
| 492 |
+
load_blacklist() ; encrypt_uids()
|
| 493 |
+
load_approve() ; encrypt_uids2()
|
| 494 |
+
like_data_clan , like_data , room_data = L_DaTa()
|
blacklist.txt
ADDED
|
File without changes
|
byte.py
ADDED
|
@@ -0,0 +1,449 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# By AbdeeLkarim BesTo
|
| 2 |
+
|
| 3 |
+
import requests , json , binascii , time , urllib3 , base64 , datetime , re ,socket , threading , random , os
|
| 4 |
+
from protobuf_decoder.protobuf_decoder import Parser
|
| 5 |
+
from Crypto.Cipher import AES
|
| 6 |
+
from Crypto.Util.Padding import pad , unpad
|
| 7 |
+
from datetime import datetime
|
| 8 |
+
from google.protobuf.timestamp_pb2 import Timestamp
|
| 9 |
+
|
| 10 |
+
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
|
| 11 |
+
|
| 12 |
+
Key , Iv = bytes([89, 103, 38, 116, 99, 37, 68, 69, 117, 104, 54, 37, 90, 99, 94, 56]) , bytes([54, 111, 121, 90, 68, 114, 50, 50, 69, 51, 121, 99, 104, 106, 77, 37])
|
| 13 |
+
|
| 14 |
+
def EnC_AEs(HeX):
|
| 15 |
+
cipher = AES.new(Key , AES.MODE_CBC , Iv)
|
| 16 |
+
return cipher.encrypt(pad(bytes.fromhex(HeX), AES.block_size)).hex()
|
| 17 |
+
|
| 18 |
+
def DEc_AEs(HeX):
|
| 19 |
+
cipher = AES.new(Key , AES.MODE_CBC , Iv)
|
| 20 |
+
return unpad(cipher.decrypt(bytes.fromhex(HeX)), AES.block_size).hex()
|
| 21 |
+
|
| 22 |
+
def EnC_PacKeT(HeX , K , V):
|
| 23 |
+
return AES.new(K , AES.MODE_CBC , V).encrypt(pad(bytes.fromhex(HeX) ,16)).hex()
|
| 24 |
+
|
| 25 |
+
def DEc_PacKeT(HeX , K , V):
|
| 26 |
+
return unpad(AES.new(K , AES.MODE_CBC , V).decrypt(bytes.fromhex(HeX)) , 16).hex()
|
| 27 |
+
|
| 28 |
+
def EnC_Uid(H , Tp):
|
| 29 |
+
e , H = [] , int(H)
|
| 30 |
+
while H:
|
| 31 |
+
e.append((H & 0x7F) | (0x80 if H > 0x7F else 0)) ; H >>= 7
|
| 32 |
+
return bytes(e).hex() if Tp == 'Uid' else None
|
| 33 |
+
|
| 34 |
+
def EnC_Vr(N):
|
| 35 |
+
if N < 0: ''
|
| 36 |
+
H = []
|
| 37 |
+
while True:
|
| 38 |
+
BesTo = N & 0x7F ; N >>= 7
|
| 39 |
+
if N: BesTo |= 0x80
|
| 40 |
+
H.append(BesTo)
|
| 41 |
+
if not N: break
|
| 42 |
+
return bytes(H)
|
| 43 |
+
|
| 44 |
+
def DEc_Uid(H):
|
| 45 |
+
n = s = 0
|
| 46 |
+
for b in bytes.fromhex(H):
|
| 47 |
+
n |= (b & 0x7F) << s
|
| 48 |
+
if not b & 0x80: break
|
| 49 |
+
s += 7
|
| 50 |
+
return n
|
| 51 |
+
|
| 52 |
+
def CrEaTe_VarianT(field_number, value):
|
| 53 |
+
field_header = (field_number << 3) | 0
|
| 54 |
+
return EnC_Vr(field_header) + EnC_Vr(value)
|
| 55 |
+
|
| 56 |
+
def CrEaTe_LenGTh(field_number, value):
|
| 57 |
+
field_header = (field_number << 3) | 2
|
| 58 |
+
encoded_value = value.encode() if isinstance(value, str) else value
|
| 59 |
+
return EnC_Vr(field_header) + EnC_Vr(len(encoded_value)) + encoded_value
|
| 60 |
+
|
| 61 |
+
def CrEaTe_ProTo(fields):
|
| 62 |
+
packet = bytearray()
|
| 63 |
+
for field, value in fields.items():
|
| 64 |
+
if isinstance(value, dict):
|
| 65 |
+
nested_packet = CrEaTe_ProTo(value)
|
| 66 |
+
packet.extend(CrEaTe_LenGTh(field, nested_packet))
|
| 67 |
+
elif isinstance(value, int):
|
| 68 |
+
packet.extend(CrEaTe_VarianT(field, value))
|
| 69 |
+
elif isinstance(value, str) or isinstance(value, bytes):
|
| 70 |
+
packet.extend(CrEaTe_LenGTh(field, value))
|
| 71 |
+
return packet
|
| 72 |
+
|
| 73 |
+
def DecodE_HeX(H):
|
| 74 |
+
R = hex(H)
|
| 75 |
+
F = str(R)[2:]
|
| 76 |
+
if len(F) == 1: F = "0" + F ; return F
|
| 77 |
+
else: return F
|
| 78 |
+
|
| 79 |
+
def Fix_PackEt(parsed_results):
|
| 80 |
+
result_dict = {}
|
| 81 |
+
for result in parsed_results:
|
| 82 |
+
field_data = {}
|
| 83 |
+
field_data['wire_type'] = result.wire_type
|
| 84 |
+
if result.wire_type == "varint":
|
| 85 |
+
field_data['data'] = result.data
|
| 86 |
+
if result.wire_type == "string":
|
| 87 |
+
field_data['data'] = result.data
|
| 88 |
+
if result.wire_type == "bytes":
|
| 89 |
+
field_data['data'] = result.data
|
| 90 |
+
elif result.wire_type == 'length_delimited':
|
| 91 |
+
field_data["data"] = Fix_PackEt(result.data.results)
|
| 92 |
+
result_dict[result.field] = field_data
|
| 93 |
+
return result_dict
|
| 94 |
+
|
| 95 |
+
def DeCode_PackEt(input_text):
|
| 96 |
+
try:
|
| 97 |
+
parsed_results = Parser().parse(input_text)
|
| 98 |
+
parsed_results_objects = parsed_results
|
| 99 |
+
parsed_results_dict = Fix_PackEt(parsed_results_objects)
|
| 100 |
+
json_data = json.dumps(parsed_results_dict)
|
| 101 |
+
return json_data
|
| 102 |
+
except Exception as e:
|
| 103 |
+
print(f"error {e}")
|
| 104 |
+
return None
|
| 105 |
+
|
| 106 |
+
def xMsGFixinG(n):
|
| 107 |
+
return '🗿'.join(str(n)[i:i + 3] for i in range(0 , len(str(n)) , 3))
|
| 108 |
+
|
| 109 |
+
def ArA_CoLor():
|
| 110 |
+
Tp = ["32CD32" , "00BFFF" , "00FA9A" , "90EE90" , "FF4500" , "FF6347" , "FF69B4" , "FF8C00" , "FF6347" , "FFD700" , "FFDAB9" , "F0F0F0" , "F0E68C" , "D3D3D3" , "A9A9A9" , "D2691E" , "CD853F" , "BC8F8F" , "6A5ACD" , "483D8B" , "4682B4", "9370DB" , "C71585" , "FF8C00" , "FFA07A"]
|
| 111 |
+
return random.choice(Tp)
|
| 112 |
+
|
| 113 |
+
def xBunnEr():
|
| 114 |
+
bN = [902000306 , 902000305 , 902000003 , 902000016 , 902000017 , 902000019 , 902000020 , 902000021 , 902000023 , 902000070 , 902000087 , 902000108 , 902000011 , 902049020 , 902049018 , 902049017 , 902049016 , 902049015 , 902049003 , 902033016 , 902033017 , 902033018 , 902048018 , 902000306 , 902000305]
|
| 115 |
+
return random.choice(bN)
|
| 116 |
+
|
| 117 |
+
def xSEndMsg(Msg , Tp , Tp2 , id , K , V):
|
| 118 |
+
feilds = {1: id, 2: Tp2, 3: Tp, 4: Msg , 5: 1735129800, 7: 2, 9: {1: "xBesTo - C4", 2: xBunnEr(), 3: 901048018, 4: 330, 5: 909034009, 8: "xBesTo - C4", 10: 1, 11: 1, 14: {1: 1158053040, 2: 8, 3: "\u0010\u0015\b\n\u000b\u0015\f\u000f\u0011\u0004\u0007\u0002\u0003\r\u000e\u0012\u0001\u0005\u0006"}}, 10: "en", 13: {2: 1, 3: 1}, 14: {}}
|
| 119 |
+
Pk = str(CrEaTe_ProTo(feilds).hex())
|
| 120 |
+
Pk = "080112" + EnC_Uid(len(Pk) // 2 , Tp = 'Uid') + Pk
|
| 121 |
+
return GeneRaTePk(str(Pk) , '1215' , K , V)
|
| 122 |
+
|
| 123 |
+
def Auth_Chat(idT, sq, K, V):
|
| 124 |
+
fields = {
|
| 125 |
+
1: 3,
|
| 126 |
+
2: {
|
| 127 |
+
1: idT,
|
| 128 |
+
3: "fr",
|
| 129 |
+
4: sq
|
| 130 |
+
}
|
| 131 |
+
}
|
| 132 |
+
return GeneRaTePk(str(CrEaTe_ProTo(fields).hex()) , '1215' , K , V)
|
| 133 |
+
def xSendTeamMsg(msg, idT, K, V):
|
| 134 |
+
fields = {
|
| 135 |
+
1: 1,
|
| 136 |
+
2: {
|
| 137 |
+
1: 12404281032,
|
| 138 |
+
2: idT,
|
| 139 |
+
4: msg,
|
| 140 |
+
7: 2,
|
| 141 |
+
10: "fr",
|
| 142 |
+
9: {
|
| 143 |
+
1: "C4 TEAM",
|
| 144 |
+
2: xBunnEr(),
|
| 145 |
+
4: 330,
|
| 146 |
+
5: 827001005,
|
| 147 |
+
8: "C4 TEAM",
|
| 148 |
+
10: 1,
|
| 149 |
+
11: 1,
|
| 150 |
+
12: {
|
| 151 |
+
1: 2
|
| 152 |
+
},
|
| 153 |
+
14: {
|
| 154 |
+
1: 1158053040,
|
| 155 |
+
2: 8,
|
| 156 |
+
3: "\u0010\u0015\b\n\u000b\u0015\f\u000f\u0011\u0004\u0007\u0002\u0003\r\u000e\u0012\u0001\u0005\u0006"
|
| 157 |
+
}
|
| 158 |
+
},
|
| 159 |
+
13: {
|
| 160 |
+
1: 2,
|
| 161 |
+
2: 1
|
| 162 |
+
},
|
| 163 |
+
14:{}
|
| 164 |
+
}
|
| 165 |
+
}
|
| 166 |
+
|
| 167 |
+
return GeneRaTePk(str(CrEaTe_ProTo(fields).hex()) , '1215' , K , V)
|
| 168 |
+
|
| 169 |
+
def OpEnSq(K , V):
|
| 170 |
+
fields = {1: 1, 2: {2: "\u0001", 3: 1, 4: 1, 5: "en", 9: 1, 11: 1, 13: 1, 14: {2: 5756, 6: 11, 8: "1.111.5", 9: 2, 10: 4}}}
|
| 171 |
+
return GeneRaTePk(str(CrEaTe_ProTo(fields).hex()) , '0515' , K , V)
|
| 172 |
+
|
| 173 |
+
def cHSq(Nu , Uid , K , V):
|
| 174 |
+
fields = {1: 17, 2: {1: int(Uid), 2: 1, 3: int(Nu - 1), 4: 62, 5: "\u001a", 8: 5, 13: 329}}
|
| 175 |
+
return GeneRaTePk(str(CrEaTe_ProTo(fields).hex()) , '0515' , K , V)
|
| 176 |
+
|
| 177 |
+
def SEnd_InV(Nu , Uid , K , V):
|
| 178 |
+
fields = {1: 2 , 2: {1: int(Uid) , 2: "ME" , 4: int(Nu)}}
|
| 179 |
+
return GeneRaTePk(str(CrEaTe_ProTo(fields).hex()) , '0515' , K , V)
|
| 180 |
+
|
| 181 |
+
def ExiT(id , K , V):
|
| 182 |
+
fields = {
|
| 183 |
+
1: 7,
|
| 184 |
+
2: {
|
| 185 |
+
1: int(11037044965)
|
| 186 |
+
}
|
| 187 |
+
}
|
| 188 |
+
return GeneRaTePk(str(CrEaTe_ProTo(fields).hex()) , '0515' , K , V)
|
| 189 |
+
|
| 190 |
+
def AuthClan(CLan_Uid , AuTh , K , V):
|
| 191 |
+
fields = {1: 3, 2: {1: int(CLan_Uid) , 2: 1, 4: str(AuTh)}}
|
| 192 |
+
return GeneRaTePk(str(CrEaTe_ProTo(fields).hex()) , '1201' , K , V)
|
| 193 |
+
|
| 194 |
+
def GeT_Status(PLayer_Uid , K , V):
|
| 195 |
+
PLayer_Uid = EnC_Uid(PLayer_Uid , Tp = 'Uid')
|
| 196 |
+
if len(PLayer_Uid) == 8: Pk = f'080112080a04{PLayer_Uid}1005'
|
| 197 |
+
elif len(PLayer_Uid) == 10: Pk = f"080112090a05{PLayer_Uid}1005"
|
| 198 |
+
return GeneRaTePk(Pk , '0f15' , K , V)
|
| 199 |
+
|
| 200 |
+
def SPam_Room(Uid , Rm , Nm , K , V):
|
| 201 |
+
fields = {1: 78, 2: {1: int(Rm), 2: f"[{ArA_CoLor()}]{Nm}", 3: {2: 1, 3: 1}, 4: 330, 5: 1, 6: 201, 10: xBunnEr(), 11: int(Uid), 12: 1}}
|
| 202 |
+
return GeneRaTePk(str(CrEaTe_ProTo(fields).hex()) , '0e15' , K , V)
|
| 203 |
+
|
| 204 |
+
def Join_Room(room_id , K , V):
|
| 205 |
+
fields = {1: 3, 2: {1: int(room_id), 8: {1: "IDC1", 2: 3000, 3: "ME"}, 9: "\x01\t\n\x12\x19 ", 10: 1, 12: b"\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01", 13: 3, 14: 3, 16: "ME"}}
|
| 206 |
+
return GeneRaTePk(str(CrEaTe_ProTo(fields).hex()) , '0e10' , K , V)
|
| 207 |
+
|
| 208 |
+
def SPamSq(bot_uid, Uid,K,V):
|
| 209 |
+
fields = {1: 33, 2: {1: int(Uid), 2: "ME", 3: 1, 4: 1, 6: "RedZedKing!!", 7: 330, 8: 1000, 9: 100, 10: "DZ", 12: 1, 13: int(Uid), 16: 1, 17: {2: 159, 4: "y[WW", 6: 11, 8: "1.118.1", 9: 3, 10: 1}, 18: 306, 19: 18, 24: 902000306, 26: {}, 27: {1: 11, 2: int(bot_uid), 3: 999}, 28: {}, 31: {1: 1, 2: 32768}, 32: 32768, 34: {1: bot_uid, 2: 8, 3: "\u0010\u0015\b\n\u000b\u0013\f\u000f\u0011\u0004\u0007\u0002\u0003\r\u000e\u0012\u0001\u0005\u0006"}}}
|
| 210 |
+
return GeneRaTePk(str(CrEaTe_ProTo(fields).hex()) , '0515' , K , V)
|
| 211 |
+
|
| 212 |
+
|
| 213 |
+
def SPjamhhSq(Uid , K , V):
|
| 214 |
+
fields = {1: 33, 2: {1: int(Uid) , 2: 'ME', 3: 1, 4: 1, 7: 330, 8: 19459, 9: 100, 12: 1, 16: 1, 17: {2: 94, 6: 11, 8: '1.111.5', 9: 3, 10: 2}, 18: 201, 23: {2: 1, 3: 1}, 24: xBunnEr() , 26: {}, 28: {}}}
|
| 215 |
+
return GeneRaTePk(str(CrEaTe_ProTo(fields).hex()) , '0515' , K , V)
|
| 216 |
+
|
| 217 |
+
def AccEpT(PLayer_Uid , AuTh_CodE_Sq , K , V):
|
| 218 |
+
fields = {1: 4, 2: {1: int(PLayer_Uid), 3: int(PLayer_Uid), 4: "\u0001\u0007\t\n\u0012\u0019\u001a ", 8: 1, 9: {2: 1393, 4: "wW_T", 6: 11, 8: "1.111.5", 9: 3, 10: 2}, 10: AuTh_CodE_Sq, 12: 1, 13: "en", 16: "OR"}}
|
| 219 |
+
return GeneRaTePk(str(CrEaTe_ProTo(fields).hex()) , '0515' , K , V)
|
| 220 |
+
|
| 221 |
+
def GenJoinSquadsPacket(code, key, iv):
|
| 222 |
+
fields = {}
|
| 223 |
+
fields[1] = 4
|
| 224 |
+
fields[2] = {}
|
| 225 |
+
fields[2][4] = bytes.fromhex("01090a0b121920")
|
| 226 |
+
fields[2][5] = str(code)
|
| 227 |
+
fields[2][6] = 6
|
| 228 |
+
fields[2][8] = 1
|
| 229 |
+
fields[2][9] = {}
|
| 230 |
+
fields[2][9][2] = 800
|
| 231 |
+
fields[2][9][6] = 11
|
| 232 |
+
fields[2][9][8] = "1.111.1"
|
| 233 |
+
fields[2][9][9] = 5
|
| 234 |
+
fields[2][9][10] = 1
|
| 235 |
+
print(fields)
|
| 236 |
+
return GeneRaTePk(str(CrEaTe_ProTo(fields).hex()), '0515', key, iv)
|
| 237 |
+
#1750287629500765351_vfhkisb7hv 8679231987
|
| 238 |
+
def ghost_pakcet(player_id , nm , secret_code , key ,iv):
|
| 239 |
+
fields = {
|
| 240 |
+
1: 61,
|
| 241 |
+
2: {
|
| 242 |
+
1: int(player_id),
|
| 243 |
+
2: {
|
| 244 |
+
1: int(player_id),
|
| 245 |
+
2: 1159,
|
| 246 |
+
3: f"[b][c][{ArA_CoLor()}]{nm}",
|
| 247 |
+
5: 12,
|
| 248 |
+
6: 15,
|
| 249 |
+
7: 1,
|
| 250 |
+
8: {
|
| 251 |
+
2: 1,
|
| 252 |
+
3: 1,
|
| 253 |
+
},
|
| 254 |
+
9: 3,
|
| 255 |
+
},
|
| 256 |
+
3: secret_code,},}
|
| 257 |
+
return GeneRaTePk(str(CrEaTe_ProTo(fields).hex()), '0515', key, iv)
|
| 258 |
+
|
| 259 |
+
def _V(b, i):
|
| 260 |
+
r = s = 0
|
| 261 |
+
while True:
|
| 262 |
+
c = b[i]; i += 1
|
| 263 |
+
r |= (c & 0x7F) << s
|
| 264 |
+
if c < 0x80: break
|
| 265 |
+
s += 7
|
| 266 |
+
return r, i
|
| 267 |
+
|
| 268 |
+
def PrOtO(hx):
|
| 269 |
+
b, i, R = bytes.fromhex(hx), 0, {}
|
| 270 |
+
while i < len(b):
|
| 271 |
+
H, i = _V(b, i)
|
| 272 |
+
F, T = H >> 3, H & 7
|
| 273 |
+
if T == 0:
|
| 274 |
+
R[F], i = _V(b, i)
|
| 275 |
+
elif T == 2:
|
| 276 |
+
L, i = _V(b, i)
|
| 277 |
+
S = b[i:i+L]; i += L
|
| 278 |
+
try: R[F] = S.decode()
|
| 279 |
+
except:
|
| 280 |
+
try: R[F] = PrOtO(S.hex())
|
| 281 |
+
except: R[F] = S
|
| 282 |
+
elif T == 5:
|
| 283 |
+
R[F] = int.from_bytes(b[i:i+4], 'little'); i += 4
|
| 284 |
+
else:
|
| 285 |
+
raise ValueError(f'Unknown wire type: {T}')
|
| 286 |
+
return R
|
| 287 |
+
|
| 288 |
+
def GeT_KEy(obj , target):
|
| 289 |
+
values = []
|
| 290 |
+
def collect(o):
|
| 291 |
+
if isinstance(o, dict):
|
| 292 |
+
for k, v in o.items():
|
| 293 |
+
if k == target:
|
| 294 |
+
values.append(v)
|
| 295 |
+
collect(v)
|
| 296 |
+
elif isinstance(o, list):
|
| 297 |
+
for v in o:
|
| 298 |
+
collect(v)
|
| 299 |
+
collect(obj)
|
| 300 |
+
return values[-1] if values else None
|
| 301 |
+
|
| 302 |
+
|
| 303 |
+
def GeneRaTePk(Pk , N , K , V):
|
| 304 |
+
PkEnc = EnC_PacKeT(Pk , K , V)
|
| 305 |
+
_ = DecodE_HeX(int(len(PkEnc) // 2))
|
| 306 |
+
if len(_) == 2: HeadEr = N + "000000"
|
| 307 |
+
elif len(_) == 3: HeadEr = N + "00000"
|
| 308 |
+
elif len(_) == 4: HeadEr = N + "0000"
|
| 309 |
+
elif len(_) == 5: HeadEr = N + "000"
|
| 310 |
+
return bytes.fromhex(HeadEr + _ + PkEnc)
|
| 311 |
+
|
| 312 |
+
def GuiLd_AccEss(Tg , Nm , Uid , BLk , OwN , AprV):
|
| 313 |
+
return Tg in Nm and Uid not in BLk and Uid in (OwN | AprV)
|
| 314 |
+
|
| 315 |
+
def ChEck_Commande(id):
|
| 316 |
+
return "<" not in id and ">" not in id and "[" not in id and "]" not in id
|
| 317 |
+
|
| 318 |
+
def L_DaTa():
|
| 319 |
+
load = lambda f: json.load(open(f)) if os.path.exists(f) else {}
|
| 320 |
+
return map(load, ["BesTo_CLan_LiKes.json" , "BesTo_RemaininG_LiKes.json" , "BesTo_RemaininG_Room.json"])
|
| 321 |
+
|
| 322 |
+
def ChEck_Limit_CLan(Uid , STaTus):
|
| 323 |
+
data , max_use , file = (like_data_clan, 10, "BesTo_CLan_LiKes.json") if STaTus == "like" else ''
|
| 324 |
+
t , limit = time.time(), 86400
|
| 325 |
+
u = data.get(str(Uid), {"count": 0, "start_time": t})
|
| 326 |
+
if t - u["start_time"] >= limit:
|
| 327 |
+
u = {"count": 0, "start_time": t}
|
| 328 |
+
if u["count"] < max_use:
|
| 329 |
+
u["count"] += 1
|
| 330 |
+
data[str(Uid)] = u
|
| 331 |
+
json.dump(data , open(file, "w"))
|
| 332 |
+
return f"{max_use - u['count']}" , datetime.fromtimestamp(u["start_time"] + limit).strftime("%I:%M %p - %d/%m/%y")
|
| 333 |
+
return False , datetime.fromtimestamp(u["start_time"] + limit).strftime("%I:%M %p - %d/%m/%y")
|
| 334 |
+
|
| 335 |
+
def ChEck_Limit(Uid , STaTus):
|
| 336 |
+
data , max_use , file = (like_data, 10, "BesTo_RemaininG_LiKes.json") if STaTus == "like" else (room_data, 10, "BesTo_RemaininG_Room.json")
|
| 337 |
+
t , limit = time.time(), 86400
|
| 338 |
+
u = data.get(str(Uid), {"count": 0, "start_time": t})
|
| 339 |
+
if t - u["start_time"] >= limit:
|
| 340 |
+
u = {"count": 0, "start_time": t}
|
| 341 |
+
if u["count"] < max_use:
|
| 342 |
+
u["count"] += 1
|
| 343 |
+
data[str(Uid)] = u
|
| 344 |
+
json.dump(data , open(file, "w"))
|
| 345 |
+
return f"{max_use - u['count']}" , datetime.fromtimestamp(u["start_time"] + limit).strftime("%I:%M %p - %d/%m/%y")
|
| 346 |
+
return False , datetime.fromtimestamp(u["start_time"] + limit).strftime("%I:%M %p - %d/%m/%y")
|
| 347 |
+
|
| 348 |
+
f = 'blacklist.txt'
|
| 349 |
+
approvee = 'approved.txt'
|
| 350 |
+
black , approve = [] , []
|
| 351 |
+
|
| 352 |
+
def load_blacklist():
|
| 353 |
+
global black
|
| 354 |
+
try:
|
| 355 |
+
with open(f, 'r') as file:
|
| 356 |
+
black = [line.strip() for line in file if line.strip()]
|
| 357 |
+
except: black = []
|
| 358 |
+
|
| 359 |
+
def encrypt_uids():
|
| 360 |
+
global black
|
| 361 |
+
try:
|
| 362 |
+
if black: black = [EnC_Uid(uid , Tp = 'Uid') for uid in black]
|
| 363 |
+
except:
|
| 364 |
+
try: open(f, 'w').close()
|
| 365 |
+
except: pass
|
| 366 |
+
load_blacklist()
|
| 367 |
+
|
| 368 |
+
if not black: open(f, 'w').close()
|
| 369 |
+
|
| 370 |
+
def load_approve():
|
| 371 |
+
global approve
|
| 372 |
+
try:
|
| 373 |
+
with open(approvee, 'r') as file: approve = [line.strip() for line in file if line.strip()]
|
| 374 |
+
except: approve = []
|
| 375 |
+
|
| 376 |
+
def encrypt_uids2():
|
| 377 |
+
global approve
|
| 378 |
+
try:
|
| 379 |
+
if approve: approve = [EnC_Uid(uid , Tp = 'Uid') for uid in approve]
|
| 380 |
+
except:
|
| 381 |
+
try: open(approvee, 'w').close()
|
| 382 |
+
except: pass
|
| 383 |
+
load_approve()
|
| 384 |
+
|
| 385 |
+
if not approve: open(approvee, 'w').close()
|
| 386 |
+
|
| 387 |
+
def Add_Uid(user_id):
|
| 388 |
+
with open(f, 'r') as file: lines = file.read().splitlines()
|
| 389 |
+
if str(user_id) not in lines:
|
| 390 |
+
with open(f, 'a') as file: file.write(f"{user_id}\n")
|
| 391 |
+
|
| 392 |
+
def Remove_Uid(f, player_uid):
|
| 393 |
+
try:
|
| 394 |
+
with open(f, 'r+') as file: lines = file.readlines() ; file.seek(0), file.truncate(), file.writelines(l for l in lines if l.strip() != player_uid) ; return True
|
| 395 |
+
except FileNotFoundError: return False
|
| 396 |
+
|
| 397 |
+
def A(user_id):
|
| 398 |
+
with open(approvee, 'r') as file: lines = file.read().splitlines()
|
| 399 |
+
if str(user_id) not in lines:
|
| 400 |
+
with open(approvee, 'a') as file: file.write(f"{user_id}\n")
|
| 401 |
+
|
| 402 |
+
def D(approvee, player_uid):
|
| 403 |
+
try:
|
| 404 |
+
with open(approvee, 'r+') as file: lines = file.readlines() ; file.seek(0), file.truncate(), file.writelines(l for l in lines if l.strip() != player_uid) ; return True
|
| 405 |
+
except FileNotFoundError: return False
|
| 406 |
+
|
| 407 |
+
def Clear():
|
| 408 |
+
try:
|
| 409 |
+
open(f, 'w').close() ; black.clear() ; return True
|
| 410 |
+
except: return False
|
| 411 |
+
|
| 412 |
+
def Add_Black(user_id):
|
| 413 |
+
Add_Uid(user_id)
|
| 414 |
+
if EnC_Uid(user_id , Tp = 'Uid') not in black: black.append(EnC_Uid(user_id , Tp = 'Uid')) ; return True
|
| 415 |
+
else: return False
|
| 416 |
+
|
| 417 |
+
def Rem_Black(user_id):
|
| 418 |
+
user_id_encrypted = EnC_Uid(user_id , Tp = 'Uid')
|
| 419 |
+
if user_id_encrypted in black: black.remove(user_id_encrypted) ; Remove_Uid(f , user_id) ; return True
|
| 420 |
+
else: return False
|
| 421 |
+
|
| 422 |
+
def Show_Uids():
|
| 423 |
+
try:
|
| 424 |
+
with open(f) as file: return "\n".join(sorted(file.read().splitlines(), key=int)) or False
|
| 425 |
+
except (FileNotFoundError, ValueError): return False
|
| 426 |
+
|
| 427 |
+
def Approved(user_id):
|
| 428 |
+
A(user_id)
|
| 429 |
+
if EnC_Uid(user_id , Tp = 'Uid') not in approve: approve.append(EnC_Uid(user_id , Tp = 'Uid')) ; return True
|
| 430 |
+
else: return False
|
| 431 |
+
|
| 432 |
+
def DeApproved(user_id):
|
| 433 |
+
user_id_encrypted = EnC_Uid(user_id , Tp = 'Uid')
|
| 434 |
+
if user_id_encrypted in approve: approve.remove(user_id_encrypted) ; D(approvee , user_id) ; return True
|
| 435 |
+
else: return False
|
| 436 |
+
|
| 437 |
+
def Show_Approvs():
|
| 438 |
+
try:
|
| 439 |
+
with open(approvee) as file: return "\n".join(sorted(file.read().splitlines(), key=int)) or False
|
| 440 |
+
except (FileNotFoundError, ValueError): return False
|
| 441 |
+
|
| 442 |
+
def Clear_Approvs():
|
| 443 |
+
try:
|
| 444 |
+
open(approvee, 'w').close() ; approve.clear() ; return True
|
| 445 |
+
except: return False
|
| 446 |
+
|
| 447 |
+
load_blacklist() ; encrypt_uids()
|
| 448 |
+
load_approve() ; encrypt_uids2()
|
| 449 |
+
like_data_clan , like_data , room_data = L_DaTa()
|
gitattributes.txt
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
*.7z filter=lfs diff=lfs merge=lfs -text
|
| 2 |
+
*.arrow filter=lfs diff=lfs merge=lfs -text
|
| 3 |
+
*.bin filter=lfs diff=lfs merge=lfs -text
|
| 4 |
+
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
| 5 |
+
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
| 6 |
+
*.ftz filter=lfs diff=lfs merge=lfs -text
|
| 7 |
+
*.gz filter=lfs diff=lfs merge=lfs -text
|
| 8 |
+
*.h5 filter=lfs diff=lfs merge=lfs -text
|
| 9 |
+
*.joblib filter=lfs diff=lfs merge=lfs -text
|
| 10 |
+
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
| 11 |
+
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
| 12 |
+
*.model filter=lfs diff=lfs merge=lfs -text
|
| 13 |
+
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
| 14 |
+
*.npy filter=lfs diff=lfs merge=lfs -text
|
| 15 |
+
*.npz filter=lfs diff=lfs merge=lfs -text
|
| 16 |
+
*.onnx filter=lfs diff=lfs merge=lfs -text
|
| 17 |
+
*.ot filter=lfs diff=lfs merge=lfs -text
|
| 18 |
+
*.parquet filter=lfs diff=lfs merge=lfs -text
|
| 19 |
+
*.pb filter=lfs diff=lfs merge=lfs -text
|
| 20 |
+
*.pickle filter=lfs diff=lfs merge=lfs -text
|
| 21 |
+
*.pkl filter=lfs diff=lfs merge=lfs -text
|
| 22 |
+
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 23 |
+
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 24 |
+
*.rar filter=lfs diff=lfs merge=lfs -text
|
| 25 |
+
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 26 |
+
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
| 27 |
+
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
| 28 |
+
*.tar filter=lfs diff=lfs merge=lfs -text
|
| 29 |
+
*.tflite filter=lfs diff=lfs merge=lfs -text
|
| 30 |
+
*.tgz filter=lfs diff=lfs merge=lfs -text
|
| 31 |
+
*.wasm filter=lfs diff=lfs merge=lfs -text
|
| 32 |
+
*.xz filter=lfs diff=lfs merge=lfs -text
|
| 33 |
+
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
+
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
+
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
requirements.txt
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
requests
|
| 2 |
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import requests, json, binascii, time, urllib3, base64, datetime, re, socket, threading, random, os, asyncio
|
| 2 |
+
from protobuf_decoder.protobuf_decoder import Parser
|
| 3 |
+
from Crypto.Cipher import AES
|
| 4 |
+
from Crypto.Util.Padding import pad, unpad
|
| 5 |
+
from datetime import datetime
|
| 6 |
+
from google.protobuf.timestamp_pb2 import Timestamp
|
| 7 |
+
|
| 8 |
+
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
|
| 9 |
+
|
| 10 |
+
Key, Iv = bytes([89, 103, 38, 116, 99, 37, 68, 69, 117, 104, 54, 37, 90, 99, 94, 56]), bytes([54, 111, 121, 90, 68, 114, 50, 50, 69, 51, 121, 99, 104, 106, 77, 37])
|
| 11 |
+
|
| 12 |
+
async def EnC_AEs(HeX):
|
| 13 |
+
cipher = AES.new(Key, AES.MODE_CBC, Iv)
|
| 14 |
+
return cipher.encrypt(pad(bytes.fromhex(HeX), AES.block_size)).hex()
|
| 15 |
+
|
| 16 |
+
async def DEc_AEs(HeX):
|
| 17 |
+
cipher = AES.new(Key, AES.MODE_CBC, Iv)
|
| 18 |
+
return unpad(cipher.decrypt(bytes.fromhex(HeX)), AES.block_size).hex()
|
| 19 |
+
|
| 20 |
+
async def EnC_PacKeT(HeX, K, V):
|
| 21 |
+
return AES.new(K, AES.MODE_CBC, V).encrypt(pad(bytes.fromhex(HeX), 16)).hex()
|
| 22 |
+
|
| 23 |
+
async def DEc_PacKeT(HeX, K, V):
|
| 24 |
+
return unpad(AES.new(K, AES.MODE_CBC, V).decrypt(bytes.fromhex(HeX)), 16).hex()
|
| 25 |
+
|
| 26 |
+
async def EnC_Uid(H, Tp):
|
| 27 |
+
e, H = [], int(H)
|
| 28 |
+
while H:
|
| 29 |
+
e.append((H & 0x7F) | (0x80 if H > 0x7F else 0))
|
| 30 |
+
H >>= 7
|
| 31 |
+
return bytes(e).hex() if Tp == 'Uid' else None
|
| 32 |
+
|
| 33 |
+
async def EnC_Vr(N):
|
| 34 |
+
if N < 0:
|
| 35 |
+
return ''
|
| 36 |
+
H = []
|
| 37 |
+
while True:
|
| 38 |
+
BesTo = N & 0x7F
|
| 39 |
+
N >>= 7
|
| 40 |
+
if N:
|
| 41 |
+
BesTo |= 0x80
|
| 42 |
+
H.append(BesTo)
|
| 43 |
+
if not N:
|
| 44 |
+
break
|
| 45 |
+
return bytes(H)
|
| 46 |
+
|
| 47 |
+
def DEc_Uid(H):
|
| 48 |
+
n = s = 0
|
| 49 |
+
for b in bytes.fromhex(H):
|
| 50 |
+
n |= (b & 0x7F) << s
|
| 51 |
+
if not b & 0x80:
|
| 52 |
+
break
|
| 53 |
+
s += 7
|
| 54 |
+
return n
|
| 55 |
+
|
| 56 |
+
async def CrEaTe_VarianT(field_number, value):
|
| 57 |
+
field_header = (field_number << 3) | 0
|
| 58 |
+
return await EnC_Vr(field_header) + await EnC_Vr(value)
|
| 59 |
+
|
| 60 |
+
async def CrEaTe_LenGTh(field_number, value):
|
| 61 |
+
field_header = (field_number << 3) | 2
|
| 62 |
+
encoded_value = value.encode() if isinstance(value, str) else value
|
| 63 |
+
return await EnC_Vr(field_header) + await EnC_Vr(len(encoded_value)) + encoded_value
|
| 64 |
+
|
| 65 |
+
async def CrEaTe_ProTo(fields):
|
| 66 |
+
packet = bytearray()
|
| 67 |
+
for field, value in fields.items():
|
| 68 |
+
if isinstance(value, dict):
|
| 69 |
+
nested_packet = await CrEaTe_ProTo(value)
|
| 70 |
+
packet.extend(await CrEaTe_LenGTh(field, nested_packet))
|
| 71 |
+
elif isinstance(value, int):
|
| 72 |
+
packet.extend(await CrEaTe_VarianT(field, value))
|
| 73 |
+
elif isinstance(value, str) or isinstance(value, bytes):
|
| 74 |
+
packet.extend(await CrEaTe_LenGTh(field, value))
|
| 75 |
+
return packet
|
| 76 |
+
|
| 77 |
+
async def DecodE_HeX(H):
|
| 78 |
+
R = hex(H)
|
| 79 |
+
F = str(R)[2:]
|
| 80 |
+
if len(F) == 1:
|
| 81 |
+
F = "0" + F
|
| 82 |
+
return F
|
| 83 |
+
else:
|
| 84 |
+
return F
|
| 85 |
+
|
| 86 |
+
async def Fix_PackEt(parsed_results):
|
| 87 |
+
result_dict = {}
|
| 88 |
+
for result in parsed_results:
|
| 89 |
+
field_data = {}
|
| 90 |
+
field_data['wire_type'] = result.wire_type
|
| 91 |
+
if result.wire_type == "varint":
|
| 92 |
+
field_data['data'] = result.data
|
| 93 |
+
if result.wire_type == "string":
|
| 94 |
+
field_data['data'] = result.data
|
| 95 |
+
if result.wire_type == "bytes":
|
| 96 |
+
field_data['data'] = result.data
|
| 97 |
+
elif result.wire_type == 'length_delimited':
|
| 98 |
+
field_data["data"] = await Fix_PackEt(result.data.results)
|
| 99 |
+
result_dict[result.field] = field_data
|
| 100 |
+
return result_dict
|
| 101 |
+
|
| 102 |
+
async def DeCode_PackEt(input_text):
|
| 103 |
+
try:
|
| 104 |
+
parsed_results = Parser().parse(input_text)
|
| 105 |
+
parsed_results_objects = parsed_results
|
| 106 |
+
parsed_results_dict = await Fix_PackEt(parsed_results_objects)
|
| 107 |
+
json_data = json.dumps(parsed_results_dict)
|
| 108 |
+
return json_data
|
| 109 |
+
except Exception as e:
|
| 110 |
+
print(f"error {e}")
|
| 111 |
+
return None
|
| 112 |
+
|
| 113 |
+
def xMsGFixinG(n):
|
| 114 |
+
return '🗿'.join(str(n)[i:i + 3] for i in range(0, len(str(n)), 3))
|
| 115 |
+
|
| 116 |
+
async def Ua():
|
| 117 |
+
versions = [
|
| 118 |
+
'4.0.18P6', '4.0.19P7', '4.0.20P1', '4.1.0P3', '4.1.5P2', '4.2.1P8',
|
| 119 |
+
'4.2.3P1', '5.0.1B2', '5.0.2P4', '5.1.0P1', '5.2.0B1', '5.2.5P3',
|
| 120 |
+
'5.3.0B1', '5.3.2P2', '5.4.0P1', '5.4.3B2', '5.5.0P1', '5.5.2P3'
|
| 121 |
+
]
|
| 122 |
+
models = [
|
| 123 |
+
'SM-A125F', 'SM-A225F', 'SM-A325M', 'SM-A515F', 'SM-A725F', 'SM-M215F', 'SM-M325FV',
|
| 124 |
+
'Redmi 9A', 'Redmi 9C', 'POCO M3', 'POCO M4 Pro', 'RMX2185', 'RMX3085',
|
| 125 |
+
'moto g(9) play', 'CPH2239', 'V2027', 'OnePlus Nord', 'ASUS_Z01QD',
|
| 126 |
+
]
|
| 127 |
+
android_versions = ['9', '10', '11', '12', '13', '14']
|
| 128 |
+
languages = ['en-US', 'es-MX', 'pt-BR', 'id-ID', 'ru-RU', 'hi-IN']
|
| 129 |
+
countries = ['USA', 'MEX', 'BRA', 'IDN', 'RUS', 'IND']
|
| 130 |
+
version = random.choice(versions)
|
| 131 |
+
model = random.choice(models)
|
| 132 |
+
android = random.choice(android_versions)
|
| 133 |
+
lang = random.choice(languages)
|
| 134 |
+
country = random.choice(countries)
|
| 135 |
+
return f"GarenaMSDK/{version}({model};Android {android};{lang};{country};)"
|
| 136 |
+
|
| 137 |
+
async def ArA_CoLor():
|
| 138 |
+
Tp = ["32CD32", "00BFFF", "00FA9A", "90EE90", "FF4500", "FF6347", "FF69B4", "FF8C00", "FF6347", "FFD700", "FFDAB9", "F0F0F0", "F0E68C", "D3D3D3", "A9A9A9", "D2691E", "CD853F", "BC8F8F", "6A5ACD", "483D8B", "4682B4", "9370DB", "C71585", "FF8C00", "FFA07A"]
|
| 139 |
+
return random.choice(Tp)
|
| 140 |
+
|
| 141 |
+
async def xBunnEr():
|
| 142 |
+
bN = [902000126, 902000154, 902000003, 902027018, 902027027, 902039014, 902040027, 902042011, 902048021, 902048018, 902000027, 902000078, 902000013, 902000093, 902000100, 902000117, 902000111, 902000151, 902000207, 902000203, 902027016, 902027018, 902033016, 902027018, 902027018, 902027018, 902027018, 902027018, 902027018]
|
| 143 |
+
return random.choice(bN)
|
| 144 |
+
|
| 145 |
+
async def xSEndMsg(Msg, Tp, Tp2, id, K, V):
|
| 146 |
+
feilds = {1: id, 2: Tp2, 3: Tp, 4: Msg, 5: 1735129800, 7: 2, 9: {1: "xBesTo - C4", 2: int(await xBunnEr()), 3: 901048018, 4: 330, 5: 909034009, 8: "xBesTo - C4", 10: 1, 11: 1, 13: {1: 2}, 14: {1: 12484827014, 2: 8, 3: "\u0010\u0015\b\n\u000b\u0013\f\u000f\u0011\u0004\u0007\u0002\u0003\r\u000e\u0012\u0001\u0005\u0006"}, 12: 0}, 10: "en", 13: {3: 1}}
|
| 147 |
+
Pk = (await CrEaTe_ProTo(feilds)).hex()
|
| 148 |
+
Pk = "080112" + await EnC_Uid(len(Pk) // 2, Tp='Uid') + Pk
|
| 149 |
+
return await GeneRaTePk(Pk, '1201', K, V)
|
| 150 |
+
|
| 151 |
+
async def xSEndMsgsQ(Msg, id, K, V):
|
| 152 |
+
fields = {1: id, 2: id, 4: Msg, 5: 1756580149, 7: 2, 8: 904990072, 9: {1: "xBe4!sTo - C4", 2: await xBunnEr(), 4: 330, 5: 827001005, 8: "xBe4!sTo - C4", 10: 1, 11: 1, 13: {1: 2}, 14: {1: 1158053040, 2: 8, 3: "\u0010\u0015\b\n\u000b\u0015\f\u000f\u0011\u0004\u0007\u0002\u0003\r\u000e\u0012\u0001\u0005\u0006"}}, 10: "en", 13: {2: 2, 3: 1}}
|
| 153 |
+
Pk = (await CrEaTe_ProTo(fields)).hex()
|
| 154 |
+
Pk = "080112" + await EnC_Uid(len(Pk) // 2, Tp='Uid') + Pk
|
| 155 |
+
return await GeneRaTePk(Pk, '1201', K, V)
|
| 156 |
+
|
| 157 |
+
async def SPamSq(Uid , K , V):
|
| 158 |
+
fields = {1: 33, 2: {1: int(Uid) , 2: 'ME', 3: 1, 4: 1, 7: 330, 8: 19459, 9: 100, 12: 1, 16: 1, 17: {2: 94, 6: 11, 8: '1.111.5', 9: 3, 10: 2}, 18: 201, 23: {2: 1, 3: 1}, 24: xBunnEr() , 26: {}, 28: {}}}
|
| 159 |
+
return GeneRaTePk(str(CrEaTe_ProTo(fields).hex()) , '0515' , K , V)
|
| 160 |
+
|
| 161 |
+
async def ChEck_Commande(id):
|
| 162 |
+
return "<" not in id and ">" not in id and "[" not in id and "]" not in id
|
| 163 |
+
|
| 164 |
+
async def AuthClan(CLan_Uid, AuTh, K, V):
|
| 165 |
+
fields = {1: 3, 2: {1: int(CLan_Uid), 2: 1, 4: str(AuTh)}}
|
| 166 |
+
return await GeneRaTePk((await CrEaTe_ProTo(fields)).hex(), '1201', K, V)
|
| 167 |
+
|
| 168 |
+
async def AutH_GlobAl(K, V):
|
| 169 |
+
fields = {
|
| 170 |
+
1: 3,
|
| 171 |
+
2: {
|
| 172 |
+
2: 5,
|
| 173 |
+
3: "en"
|
| 174 |
+
}
|
| 175 |
+
}
|
| 176 |
+
return await GeneRaTePk((await CrEaTe_ProTo(fields)).hex(), '1215', K, V)
|
| 177 |
+
|
| 178 |
+
async def LagSquad(K, V):
|
| 179 |
+
fields = {
|
| 180 |
+
1: 15,
|
| 181 |
+
2: {
|
| 182 |
+
1: 1124759936,
|
| 183 |
+
2: 1
|
| 184 |
+
}
|
| 185 |
+
}
|
| 186 |
+
return await GeneRaTePk((await CrEaTe_ProTo(fields)).hex(), '0515', K, V)
|
| 187 |
+
|
| 188 |
+
async def GeT_Status(PLayer_Uid, K, V):
|
| 189 |
+
PLayer_Uid = await EnC_Uid(PLayer_Uid, Tp='Uid')
|
| 190 |
+
if len(PLayer_Uid) == 8:
|
| 191 |
+
Pk = f'080112080a04{PLayer_Uid}1005'
|
| 192 |
+
elif len(PLayer_Uid) == 10:
|
| 193 |
+
Pk = f"080112090a05{PLayer_Uid}1005"
|
| 194 |
+
return await GeneRaTePk(Pk, '0f15', K, V)
|
| 195 |
+
|
| 196 |
+
async def SPam_Room(Uid, Rm, Nm, K, V):
|
| 197 |
+
fields = {1: 78, 2: {1: int(Rm), 2: f"[{await ArA_CoLor()}]{Nm}", 3: {2: 1, 3: 1}, 4: 330, 5: 1, 6: 201, 10: await xBunnEr(), 11: int(Uid), 12: 1}}
|
| 198 |
+
return await GeneRaTePk((await CrEaTe_ProTo(fields)).hex(), '0e15', K, V)
|
| 199 |
+
|
| 200 |
+
async def GenJoinSquadsPacket(code, K, V):
|
| 201 |
+
fields = {}
|
| 202 |
+
fields[1] = 4
|
| 203 |
+
fields[2] = {}
|
| 204 |
+
fields[2][4] = bytes.fromhex("01090a0b121920")
|
| 205 |
+
fields[2][5] = str(code)
|
| 206 |
+
fields[2][6] = 6
|
| 207 |
+
fields[2][8] = 1
|
| 208 |
+
fields[2][9] = {}
|
| 209 |
+
fields[2][9][2] = 800
|
| 210 |
+
fields[2][9][6] = 11
|
| 211 |
+
fields[2][9][8] = "1.111.1"
|
| 212 |
+
fields[2][9][9] = 5
|
| 213 |
+
fields[2][9][10] = 1
|
| 214 |
+
return await GeneRaTePk((await CrEaTe_ProTo(fields)).hex(), '0515', K, V)
|
| 215 |
+
|
| 216 |
+
async def GenJoinGlobaL(owner, code, K, V):
|
| 217 |
+
fields = {
|
| 218 |
+
1: 4,
|
| 219 |
+
2: {
|
| 220 |
+
1: owner,
|
| 221 |
+
6: 1,
|
| 222 |
+
8: 1,
|
| 223 |
+
13: "en",
|
| 224 |
+
15: code,
|
| 225 |
+
16: "OR",
|
| 226 |
+
}
|
| 227 |
+
}
|
| 228 |
+
return await GeneRaTePk((await CrEaTe_ProTo(fields)).hex(), '0515', K, V)
|
| 229 |
+
|
| 230 |
+
async def FS(K, V):
|
| 231 |
+
fields = {
|
| 232 |
+
1: 9,
|
| 233 |
+
2: {
|
| 234 |
+
1: 13256361202
|
| 235 |
+
}
|
| 236 |
+
}
|
| 237 |
+
return await GeneRaTePk((await CrEaTe_ProTo(fields)).hex(), '0515', K, V)
|
| 238 |
+
|
| 239 |
+
# ==================== [الدوال المعدلة للرقصات] ====================
|
| 240 |
+
|
| 241 |
+
async def Emote_k(TarGeT, idT, K, V, region):
|
| 242 |
+
"""الدالة الرئيسية المعدلة للرقصات - الإصدار المحسن"""
|
| 243 |
+
fields = {
|
| 244 |
+
1: 21,
|
| 245 |
+
2: {
|
| 246 |
+
1: 804266880,
|
| 247 |
+
2: 909000001,
|
| 248 |
+
5: {
|
| 249 |
+
1: int(TarGeT), # ✅ UID الهدف
|
| 250 |
+
3: int(idT), # ✅ كود الرقصة
|
| 251 |
+
}
|
| 252 |
+
}
|
| 253 |
+
}
|
| 254 |
+
|
| 255 |
+
if region.lower() == "ind":
|
| 256 |
+
packet = '0514'
|
| 257 |
+
elif region.lower() == "bd":
|
| 258 |
+
packet = "0519"
|
| 259 |
+
else:
|
| 260 |
+
packet = "0515"
|
| 261 |
+
|
| 262 |
+
print(f"🎭 DEBUG EMOTE_K: Target: {TarGeT}, Emote: {idT}, Region: {region}")
|
| 263 |
+
return await GeneRaTePk((await CrEaTe_ProTo(fields)).hex(), packet, K, V)
|
| 264 |
+
|
| 265 |
+
async def spamsq(TarGeT, idT, K, V, region):
|
| 266 |
+
"""دالة سبام للسيرفر - محسنة ومتوافقة مع باقي الكود"""
|
| 267 |
+
same_value = random.choice([4096, 16384, 8192])
|
| 268 |
+
|
| 269 |
+
fields = {
|
| 270 |
+
1: 33,
|
| 271 |
+
2: {
|
| 272 |
+
1: int(TarGeT), # ✅ استخدام TarGeT بدلاً من idplayer
|
| 273 |
+
2: "ME",
|
| 274 |
+
3: 1,
|
| 275 |
+
4: 1,
|
| 276 |
+
5: bytes([1, 7, 9, 10, 11, 18, 25, 26, 32]),
|
| 277 |
+
6: f"[C][B][FF0000] @AlliFF_BOT", # اسم البوت
|
| 278 |
+
7: 330,
|
| 279 |
+
8: 1000,
|
| 280 |
+
10: "ME",
|
| 281 |
+
11: bytes([49, 97, 99, 52, 98, 56, 48, 101, 99, 102, 48, 52, 55, 56,
|
| 282 |
+
97, 52, 52, 50, 48, 51, 98, 102, 56, 102, 97, 99, 54, 49, 50, 48, 102, 53]),
|
| 283 |
+
12: 1,
|
| 284 |
+
13: int(TarGeT), # ✅ نفس الهدف
|
| 285 |
+
14: {
|
| 286 |
+
1: 2203434355,
|
| 287 |
+
2: 8,
|
| 288 |
+
3: "\u0010\u0015\b\n\u000b\u0013\f\u000f\u0011\u0004\u0007\u0002\u0003\r\u000e\u0012\u0001\u0005\u0006"
|
| 289 |
+
},
|
| 290 |
+
16: 1,
|
| 291 |
+
17: 1,
|
| 292 |
+
18: 312,
|
| 293 |
+
19: 46,
|
| 294 |
+
23: bytes([16, 1, 24, 1]),
|
| 295 |
+
24: int(await xBunnEr()), # ✅ استخدام xBunnEr() الموجودة
|
| 296 |
+
26: "",
|
| 297 |
+
28: "",
|
| 298 |
+
31: {
|
| 299 |
+
1: 1,
|
| 300 |
+
2: same_value
|
| 301 |
+
},
|
| 302 |
+
32: same_value,
|
| 303 |
+
34: {
|
| 304 |
+
1: int(TarGeT), # ✅ نفس الهدف
|
| 305 |
+
2: 8,
|
| 306 |
+
3: bytes([15, 6, 21, 8, 10, 11, 19, 12, 17, 4, 14, 20, 7, 2, 1, 5, 16, 3, 13, 18])
|
| 307 |
+
}
|
| 308 |
+
},
|
| 309 |
+
10: "en",
|
| 310 |
+
13: {
|
| 311 |
+
2: 1,
|
| 312 |
+
3: 1
|
| 313 |
+
}
|
| 314 |
+
}
|
| 315 |
+
|
| 316 |
+
# تحديد نوع الباكيت حسب المنطقة
|
| 317 |
+
if region.lower() == "ind":
|
| 318 |
+
packet = '0514'
|
| 319 |
+
elif region.lower() == "bd":
|
| 320 |
+
packet = "0519"
|
| 321 |
+
else:
|
| 322 |
+
packet = "0515"
|
| 323 |
+
|
| 324 |
+
# طباعة معلومات التصحيح
|
| 325 |
+
print(f"📦 SPAMSQ: Target: {TarGeT}, Region: {region}, Packet: {packet}")
|
| 326 |
+
|
| 327 |
+
# توليد الباكيت وإرجاعه
|
| 328 |
+
return await GeneRaTePk((await CrEaTe_ProTo(fields)).hex(), packet, K, V)
|
| 329 |
+
|
| 330 |
+
|
| 331 |
+
def send_emote(self, target_id, emote_id):
|
| 332 |
+
"""
|
| 333 |
+
Creates and prepares the packet for sending an emote to a target player.
|
| 334 |
+
"""
|
| 335 |
+
|
| 336 |
+
|
| 337 |
+
|
| 338 |
+
async def SendEmote_v2(target_uid, emote_id, key, iv, region):
|
| 339 |
+
"""دالة بديلة للرقصات - إصدار مختلف"""
|
| 340 |
+
fields = {
|
| 341 |
+
1: 45,
|
| 342 |
+
2: {
|
| 343 |
+
1: target_uid,
|
| 344 |
+
2: emote_id,
|
| 345 |
+
3: 1,
|
| 346 |
+
4: int(time.time())
|
| 347 |
+
}
|
| 348 |
+
}
|
| 349 |
+
if region.lower() == "ind":
|
| 350 |
+
packet = '0514'
|
| 351 |
+
elif region.lower() == "bd":
|
| 352 |
+
packet = "0519"
|
| 353 |
+
else:
|
| 354 |
+
packet = "0515"
|
| 355 |
+
|
| 356 |
+
print(f"🎭 DEBUG SENDEMOTE_V2: Target: {target_uid}, Emote: {emote_id}")
|
| 357 |
+
return await GeneRaTePk((await CrEaTe_ProTo(fields)).hex(), packet, key, iv)
|
| 358 |
+
|
| 359 |
+
async def Emote_Squad(target_uid, emote_id, key, iv, region):
|
| 360 |
+
"""دالة للرقصات داخل السكواد - إصدار محسن"""
|
| 361 |
+
fields = {
|
| 362 |
+
1: 21,
|
| 363 |
+
2: {
|
| 364 |
+
1: target_uid,
|
| 365 |
+
2: emote_id,
|
| 366 |
+
3: 2, # نوع السكواد
|
| 367 |
+
4: 1,
|
| 368 |
+
5: {
|
| 369 |
+
1: target_uid,
|
| 370 |
+
2: emote_id,
|
| 371 |
+
3: 2,
|
| 372 |
+
4: int(time.time())
|
| 373 |
+
},
|
| 374 |
+
6: 1
|
| 375 |
+
}
|
| 376 |
+
}
|
| 377 |
+
if region.lower() == "ind":
|
| 378 |
+
packet = '0514'
|
| 379 |
+
elif region.lower() == "bd":
|
| 380 |
+
packet = "0519"
|
| 381 |
+
else:
|
| 382 |
+
packet = "0515"
|
| 383 |
+
|
| 384 |
+
print(f"🎭 DEBUG EMOTE_SQUAD: Target: {target_uid}, Emote: {emote_id}")
|
| 385 |
+
return await GeneRaTePk((await CrEaTe_ProTo(fields)).hex(), packet, key, iv)
|
| 386 |
+
|
| 387 |
+
# ==================== [نهاية دوال الرقصات] ====================
|
| 388 |
+
|
| 389 |
+
async def GeTSQDaTa(D):
|
| 390 |
+
uid = D['5']['data']['1']['data']
|
| 391 |
+
chat_code = D["5"]["data"]["14"]["data"]
|
| 392 |
+
squad_code = D["5"]["data"]["31"]["data"]
|
| 393 |
+
return uid, chat_code, squad_code
|
| 394 |
+
|
| 395 |
+
async def AutH_Chat(T, uid, code, K, V):
|
| 396 |
+
fields = {
|
| 397 |
+
1: T,
|
| 398 |
+
2: {
|
| 399 |
+
1: uid,
|
| 400 |
+
3: "en",
|
| 401 |
+
4: str(code)
|
| 402 |
+
}
|
| 403 |
+
}
|
| 404 |
+
return await GeneRaTePk((await CrEaTe_ProTo(fields)).hex(), '1215', K, V)
|
| 405 |
+
|
| 406 |
+
def MsqSq(Msg , id , K , V):
|
| 407 |
+
fields = {1: id , 2: id , 4: Msg , 5: 1756580149, 7: 2, 8: 901048018, 9: {1: "MeRoBoT", 2: xBunnEr(), 4: 330, 5: 827001005, 8: "MeRoBoT", 10: 1, 11: 1, 13: {1: 2}, 14: {1: 1158053040, 2: 8, 3: "\u0010\u0015\b\n\u000b\u0015\f\u000f\u0011\u0004\u0007\u0002\u0003\r\u000e\u0012\u0001\u0005\u0006"}}, 10: "en", 13: {2: 2, 3: 1}}
|
| 408 |
+
Pk = (CrEaTe_ProTo(fields)).hex()
|
| 409 |
+
Pk = "080112" + EnC_Uid(len(Pk) // 2, Tp='Uid') + Pk
|
| 410 |
+
return GeneRaTePk(Pk, '1215', K, V)
|
| 411 |
+
|
| 412 |
+
async def ghost_pakcet(player_id , nm , secret_code , key ,iv):
|
| 413 |
+
fields = {
|
| 414 |
+
1: 61,
|
| 415 |
+
2: {
|
| 416 |
+
1: int(player_id),
|
| 417 |
+
2: {
|
| 418 |
+
1: int(player_id),
|
| 419 |
+
2: 1159,
|
| 420 |
+
3: f"[b][c][{await ArA_CoLor()}]{nm}", # <-- أضف await هنا
|
| 421 |
+
5: 22,
|
| 422 |
+
6: 20,
|
| 423 |
+
7: 1,
|
| 424 |
+
8: {
|
| 425 |
+
2: 1,
|
| 426 |
+
3: 1,
|
| 427 |
+
},
|
| 428 |
+
9: 3,
|
| 429 |
+
},
|
| 430 |
+
3: secret_code,
|
| 431 |
+
}
|
| 432 |
+
}
|
| 433 |
+
# أصلح الاستدعاءات هنا
|
| 434 |
+
proto_bytes = await CrEaTe_ProTo(fields)
|
| 435 |
+
proto_hex = proto_bytes.hex()
|
| 436 |
+
return await GeneRaTePk(proto_hex, '0515', key, iv) # <-- أضف await هنا
|
| 437 |
+
|
| 438 |
+
async def GeneRaTePk(Pk, N, K, V):
|
| 439 |
+
PkEnc = await EnC_PacKeT(Pk, K, V)
|
| 440 |
+
_ = await DecodE_HeX(int(len(PkEnc) // 2))
|
| 441 |
+
if len(_) == 2:
|
| 442 |
+
HeadEr = N + "000000"
|
| 443 |
+
elif len(_) == 3:
|
| 444 |
+
HeadEr = N + "00000"
|
| 445 |
+
elif len(_) == 4:
|
| 446 |
+
HeadEr = N + "0000"
|
| 447 |
+
elif len(_) == 5:
|
| 448 |
+
HeadEr = N + "000"
|
| 449 |
+
else:
|
| 450 |
+
print('ErroR => GeneRatinG ThE PacKeT !!')
|
| 451 |
+
|
| 452 |
+
result_packet = bytes.fromhex(HeadEr + _ + PkEnc)
|
| 453 |
+
print(f"📦 DEBUG GENERATEPK: Type: {N}, Length: {len(result_packet)}")
|
| 454 |
+
return result_packet
|
| 455 |
+
|
| 456 |
+
async def OpEnSq(K, V, region):
|
| 457 |
+
fields = {1: 1, 2: {2: "\u0001", 3: 1, 4: 1, 5: "en", 9: 1, 11: 1, 13: 1, 14: {2: 5756, 6: 11, 8: "1.111.5", 9: 2, 10: 4}}}
|
| 458 |
+
if region.lower() == "ind":
|
| 459 |
+
packet = '0514'
|
| 460 |
+
elif region.lower() == "bd":
|
| 461 |
+
packet = "0519"
|
| 462 |
+
else:
|
| 463 |
+
packet = "0515"
|
| 464 |
+
return await GeneRaTePk((await CrEaTe_ProTo(fields)).hex(), packet, K, V)
|
| 465 |
+
|
| 466 |
+
async def cHSq(Nu, Uid, K, V, region):
|
| 467 |
+
fields = {1: 17, 2: {1: int(Uid), 2: 1, 3: int(Nu - 1), 4: 62, 5: "\u001a", 8: 5, 13: 329}}
|
| 468 |
+
if region.lower() == "ind":
|
| 469 |
+
packet = '0514'
|
| 470 |
+
elif region.lower() == "bd":
|
| 471 |
+
packet = "0519"
|
| 472 |
+
else:
|
| 473 |
+
packet = "0515"
|
| 474 |
+
return await GeneRaTePk((await CrEaTe_ProTo(fields)).hex(), packet, K, V)
|
| 475 |
+
|
| 476 |
+
async def SEnd_InV(Nu, Uid, K, V, region):
|
| 477 |
+
fields = {1: 2, 2: {1: int(Uid), 2: region, 4: int(Nu)}}
|
| 478 |
+
if region.lower() == "ind":
|
| 479 |
+
packet = '0514'
|
| 480 |
+
elif region.lower() == "bd":
|
| 481 |
+
packet = "0519"
|
| 482 |
+
else:
|
| 483 |
+
packet = "0515"
|
| 484 |
+
return await GeneRaTePk((await CrEaTe_ProTo(fields)).hex(), packet, K, V)
|
| 485 |
+
|
| 486 |
+
async def ExiT(idT, K, V):
|
| 487 |
+
fields = {
|
| 488 |
+
1: 7,
|
| 489 |
+
2: {
|
| 490 |
+
1: idT,
|
| 491 |
+
}
|
| 492 |
+
}
|
| 493 |
+
return await GeneRaTePk((await CrEaTe_ProTo(fields)).hex(), '0515', K, V)
|
| 494 |
+
|
| 495 |
+
|
| 496 |
+
async def ExitTeam(K, V):
|
| 497 |
+
"""دالة خروج من الفريق"""
|
| 498 |
+
fields = {
|
| 499 |
+
1: 7,
|
| 500 |
+
2: {
|
| 501 |
+
1: 0,
|
| 502 |
+
2: 1
|
| 503 |
+
}
|
| 504 |
+
}
|
| 505 |
+
return await GeneRaTePk((await CrEaTe_ProTo(fields)).hex(), '0515', K, V)
|
xGeTJwT.py
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import requests , time , binascii , json , urllib3 , random
|
| 2 |
+
from datetime import datetime
|
| 3 |
+
from Black import *
|
| 4 |
+
from multiprocessing.dummy import Pool as ThreadPool
|
| 5 |
+
|
| 6 |
+
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
|
| 7 |
+
|
| 8 |
+
def Ua():
|
| 9 |
+
TmP = "GarenaMSDK/4.0.13 ({}; {}; {};)"
|
| 10 |
+
return TmP.format(random.choice(["iPhone 13 Pro", "iPhone 14", "iPhone XR", "Galaxy S22", "Note 20", "OnePlus 9", "Mi 11"]) ,
|
| 11 |
+
random.choice(["iOS 17", "iOS 18", "Android 13", "Android 14"]) ,
|
| 12 |
+
random.choice(["en-SG", "en-US", "fr-FR", "id-ID", "th-TH", "vi-VN"]))
|
| 13 |
+
|
| 14 |
+
def xGeT(u, p):
|
| 15 |
+
"""الدالة المعدلة لاستخدام UID و PW مباشرة من السكريبت الرئيسي"""
|
| 16 |
+
print(f"جاري توليد التوكن لـ UID: {u}")
|
| 17 |
+
try:
|
| 18 |
+
r = requests.Session().post(
|
| 19 |
+
"https://100067.connect.garena.com/oauth/guest/token/grant",
|
| 20 |
+
headers={
|
| 21 |
+
"Host": "100067.connect.garena.com",
|
| 22 |
+
"User-Agent": Ua(),
|
| 23 |
+
"Content-Type": "application/x-www-form-urlencoded",
|
| 24 |
+
"Accept-Encoding": "gzip, deflate, br",
|
| 25 |
+
"Connection": "close"
|
| 26 |
+
},
|
| 27 |
+
data={
|
| 28 |
+
"uid": u,
|
| 29 |
+
"password": p,
|
| 30 |
+
"response_type": "token",
|
| 31 |
+
"client_type": "2",
|
| 32 |
+
"client_secret": "2ee44819e9b4598845141067b281621874d0d5d7af9d8f7e00c1e54715b7d1e3",
|
| 33 |
+
"client_id": "100067"
|
| 34 |
+
},
|
| 35 |
+
verify=False
|
| 36 |
+
)
|
| 37 |
+
|
| 38 |
+
if r.status_code == 200:
|
| 39 |
+
T = r.json()
|
| 40 |
+
print("تم الحصول على التوكن بنجاح من Garena")
|
| 41 |
+
a, o = T["access_token"], T["open_id"]
|
| 42 |
+
jwt_token = xJwT(a, o)
|
| 43 |
+
if jwt_token:
|
| 44 |
+
print("تم توليد JWT بنجاح")
|
| 45 |
+
return jwt_token
|
| 46 |
+
else:
|
| 47 |
+
print("فشل في توليد JWT")
|
| 48 |
+
return None
|
| 49 |
+
else:
|
| 50 |
+
print(f"خطأ في الاستجابة من Garena: {r.status_code}")
|
| 51 |
+
return None
|
| 52 |
+
except Exception as e:
|
| 53 |
+
print(f"حدث خطأ في xGeT: {str(e)}")
|
| 54 |
+
return None
|
| 55 |
+
|
| 56 |
+
def xJwT(a, o):
|
| 57 |
+
"""دالة توليد JWT باستخدام التوكن المباشر"""
|
| 58 |
+
try:
|
| 59 |
+
dT = bytes.fromhex('1a13323032352d31302d33312030353a31383a3235220966726565206669726528013a07312e3131382e344232416e64726f6964204f532039202f204150492d3238202850492f72656c2e636a772e32303232303531382e313134313333294a0848616e6468656c64520c4d544e2f537061636574656c5a045749464960800a68d00572033234307a2d7838362d3634205353453320535345342e3120535345342e32204156582041565832207c2032343030207c20348001e61e8a010f416472656e6f2028544d292036343092010d4f70656e474c20455320332e329a012b476f6f676c657c36323566373136662d393161372d343935622d396631362d303866653964336336353333a2010d3137362e32382e3133352e3233aa01026172b201203433303632343537393364653836646134323561353263616164663231656564ba010134c2010848616e6468656c64ca010d4f6e65506c7573204135303130ea014034653739616666653331343134393031353434656161626562633437303537333866653638336139326464346335656533646233333636326232653936363466f00101ca020c4d544e2f537061636574656cd2020457494649ca03203161633462383065636630343738613434323033626638666163363132306635e003b5ee02e803ff8502f003af13f803840780048c95028804b5ee0290048c95029804b5ee02b00404c80401d2043d2f646174612f6170702f636f6d2e6474732e667265656669726574682d66705843537068495636644b43376a4c2d574f7952413d3d2f6c69622f61726de00401ea045f65363261623933353464386662356662303831646233333861636233333439317c2f646174612f6170702f636f6d2e6474732e667265656669726574682d66705843537068495636644b43376a4c2d574f7952413d3d2f626173652e61706bf00406f804018a050233329a050a32303139313139303236a80503b205094f70656e474c455332b805ff01c00504e005c466ea05093372645f7061727479f80583e4068806019006019a060134a2060134b2062211541141595f58011f53594c59584056143a5f535a525c6b5c04096e595c3b000e61')
|
| 60 |
+
|
| 61 |
+
# تحديث البيانات الديناميكية
|
| 62 |
+
dT = dT.replace(b'2025-07-30 14:11:20', str(datetime.now())[:-7].encode())
|
| 63 |
+
dT = dT.replace('4e79affe31414901544eaabebc4705738fe683a92dd4c5ee3db33662b2e9664f', a.encode())
|
| 64 |
+
dT = dT.replace(b'4306245793de86da425a52caadf21eed', o.encode())
|
| 65 |
+
|
| 66 |
+
PyL = bytes.fromhex(EnC_AEs(dT.hex()))
|
| 67 |
+
r = requests.Session().post(
|
| 68 |
+
"https://loginbp.ggwhitehawk.com/MajorLogin",
|
| 69 |
+
headers={
|
| 70 |
+
"Expect": "100-continue",
|
| 71 |
+
"X-Unity-Version": "2018.4.11f1",
|
| 72 |
+
"X-GA": "v1 1",
|
| 73 |
+
"ReleaseVersion": "OB51",
|
| 74 |
+
"Authorization": "Bearer ",
|
| 75 |
+
"Host": "loginbp.ggwhitehawk.com"
|
| 76 |
+
},
|
| 77 |
+
data=PyL,
|
| 78 |
+
verify=False
|
| 79 |
+
)
|
| 80 |
+
|
| 81 |
+
if r.status_code == 200:
|
| 82 |
+
response_data = json.loads(DeCode_PackEt(binascii.hexlify(r.content).decode('utf-8')))
|
| 83 |
+
return response_data['8']['data']
|
| 84 |
+
else:
|
| 85 |
+
print(f"��طأ في MajorLogin: {r.status_code}")
|
| 86 |
+
return None
|
| 87 |
+
except Exception as e:
|
| 88 |
+
print(f"حدث خطأ في xJwT: {str(e)}")
|
| 89 |
+
return None
|
xHeaders.py
ADDED
|
@@ -0,0 +1,213 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import requests , os , psutil , sys , jwt , pickle , json , binascii , time , urllib3 , xKEys , base64 , datetime , re ,socket , threading
|
| 2 |
+
from protobuf_decoder.protobuf_decoder import Parser
|
| 3 |
+
from black9 import *
|
| 4 |
+
from datetime import datetime
|
| 5 |
+
from google.protobuf.timestamp_pb2 import Timestamp
|
| 6 |
+
from concurrent.futures import ThreadPoolExecutor
|
| 7 |
+
from threading import Thread
|
| 8 |
+
|
| 9 |
+
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
|
| 10 |
+
|
| 11 |
+
def ToK():
|
| 12 |
+
while True:
|
| 13 |
+
try:
|
| 14 |
+
r = requests.get('https://tokens-asfufvfshnfkhvbb.francecentral-01.azurewebsites.net/ReQuesT?&type=ToKens')
|
| 15 |
+
t = r.text
|
| 16 |
+
i = t.find("ToKens : [")
|
| 17 |
+
if i != -1:
|
| 18 |
+
j = t.find("]", i)
|
| 19 |
+
L = [x.strip(" '\"") for x in t[i+11:j].split(',') if x.strip()]
|
| 20 |
+
if L:
|
| 21 |
+
with open("token.txt", "w") as f:
|
| 22 |
+
f.write(random.choice(L))
|
| 23 |
+
except: pass
|
| 24 |
+
time.sleep(5 * 60 * 60)
|
| 25 |
+
|
| 26 |
+
Thread(target=ToK , daemon = True).start()
|
| 27 |
+
|
| 28 |
+
def GeTToK():
|
| 29 |
+
with open("token.txt") as f: return f.read().strip()
|
| 30 |
+
|
| 31 |
+
def Likes(id):
|
| 32 |
+
try:
|
| 33 |
+
text = requests.get(f"https://tokens-asfufvfshnfkhvbb.francecentral-01.azurewebsites.net/ReQuesT?id={id}&type=likes").text
|
| 34 |
+
get = lambda p: re.search(p, text)
|
| 35 |
+
name, lvl, exp, lb, la, lg = (get(r).group(1) if get(r) else None for r in
|
| 36 |
+
[r"PLayer NamE\s*:\s*(.+)", r"PLayer SerVer\s*:\s*(.+)", r"Exp\s*:\s*(\d+)",
|
| 37 |
+
r"LiKes BeFore\s*:\s*(\d+)", r"LiKes After\s*:\s*(\d+)", r"LiKes GiVen\s*:\s*(\d+)"])
|
| 38 |
+
return name , f"{lvl}" if lvl else None, int(lb) if lb else None, int(la) if la else None, int(lg) if lg else None
|
| 39 |
+
except: return None, None, None, None, None
|
| 40 |
+
|
| 41 |
+
def Requests_SPam(id):
|
| 42 |
+
Api = requests.get(f'https://tokens-asfufvfshnfkhvbb.francecentral-01.azurewebsites.net/ReQuesT?id={id}&type=spam')
|
| 43 |
+
if Api.status_code in [200, 201] and '[SuccessFuLy] -> SenDinG Spam ReQuesTs !' in Api.text: return True
|
| 44 |
+
else: return False
|
| 45 |
+
|
| 46 |
+
def GeT_Name(uid , Token):
|
| 47 |
+
time.sleep(1)
|
| 48 |
+
data = bytes.fromhex(EnC_AEs(f"08{EnC_Uid(uid , Tp = 'Uid')}1007"))
|
| 49 |
+
url = "https://clientbp.common.ggbluefox.com/GetPlayerPersonalShow"
|
| 50 |
+
headers = {
|
| 51 |
+
'X-Unity-Version': '2018.4.11f1',
|
| 52 |
+
'ReleaseVersion': 'OB51',
|
| 53 |
+
'Content-Type': 'application/x-www-form-urlencoded',
|
| 54 |
+
'X-GA': 'v1 1',
|
| 55 |
+
'Authorization': f'Bearer {Token}',
|
| 56 |
+
'Content-Length': '16',
|
| 57 |
+
'User-Agent': 'Dalvik/2.1.0 (Linux; U; Android 7.1.2; ASUS_Z01QD Build/QKQ1.190825.002)',
|
| 58 |
+
'Host': 'clientbp.ggblueshark.com',
|
| 59 |
+
'Connection': 'Keep-Alive',
|
| 60 |
+
'Accept-Encoding': 'gzip'
|
| 61 |
+
}
|
| 62 |
+
response = requests.post(url , headers=headers , data=data ,verify=False)
|
| 63 |
+
if response.status_code == 200 or 201:
|
| 64 |
+
packet = binascii.hexlify(response.content).decode('utf-8')
|
| 65 |
+
BesTo_data = json.loads(DeCode_PackEt(packet))
|
| 66 |
+
try:
|
| 67 |
+
a1 = BesTo_data["1"]["data"]["3"]["data"]
|
| 68 |
+
return a1
|
| 69 |
+
except: return ''
|
| 70 |
+
else: return ''
|
| 71 |
+
|
| 72 |
+
def GeT_PLayer_InFo(uid , Token):
|
| 73 |
+
data = bytes.fromhex(EnC_AEs(f"08{EnC_Uid(uid , Tp = 'Uid')}1007"))
|
| 74 |
+
url = "https://clientbp.common.ggbluefox.com/GetPlayerPersonalShow"
|
| 75 |
+
headers = {
|
| 76 |
+
'X-Unity-Version': '2018.4.11f1',
|
| 77 |
+
'ReleaseVersion': 'OB51',
|
| 78 |
+
'Content-Type': 'application/x-www-form-urlencoded',
|
| 79 |
+
'X-GA': 'v1 1',
|
| 80 |
+
'Authorization': f'Bearer {Token}',
|
| 81 |
+
'Content-Length': '16',
|
| 82 |
+
'User-Agent': 'Dalvik/2.1.0 (Linux; U; Android 7.1.2; ASUS_Z01QD Build/QKQ1.190825.002)',
|
| 83 |
+
'Host': 'clientbp.ggblueshark.com',
|
| 84 |
+
'Connection': 'Keep-Alive',
|
| 85 |
+
'Accept-Encoding': 'gzip'}
|
| 86 |
+
response = requests.post(url , headers=headers , data=data ,verify=False)
|
| 87 |
+
if response.status_code == 200 or 201:
|
| 88 |
+
packet = binascii.hexlify(response.content).decode('utf-8')
|
| 89 |
+
BesTo_data = json.loads(DeCode_PackEt(packet))
|
| 90 |
+
NoCLan = False
|
| 91 |
+
try:
|
| 92 |
+
a1 = str(BesTo_data["1"]["data"]["1"]["data"])
|
| 93 |
+
a2 = BesTo_data["1"]["data"]["21"]["data"]
|
| 94 |
+
a3 = BesTo_data["1"]["data"]["3"]["data"]
|
| 95 |
+
player_server = BesTo_data["1"]["data"]["5"]["data"]
|
| 96 |
+
player_bio = BesTo_data["9"]["data"]["9"]["data"]
|
| 97 |
+
player_level = BesTo_data["1"]["data"]["6"]["data"]
|
| 98 |
+
account_date = datetime.fromtimestamp(BesTo_data["1"]["data"]["44"]["data"]).strftime("%I:%M %p - %d/%m/%y")
|
| 99 |
+
last_login = datetime.fromtimestamp(BesTo_data["1"]["data"]["24"]["data"]).strftime("%I:%M %p - %d/%m/%y")
|
| 100 |
+
try:
|
| 101 |
+
clan_id = BesTo_data["6"]["data"]["1"]["data"]
|
| 102 |
+
clan_name = BesTo_data["6"]["data"]["2"]["data"]
|
| 103 |
+
clan_leader = BesTo_data["6"]["data"]["3"]["data"]
|
| 104 |
+
clan_level = BesTo_data["6"]["data"]["4"]["data"]
|
| 105 |
+
clan_members_num = BesTo_data["6"]["data"]["6"]["data"]
|
| 106 |
+
clan_leader_name = BesTo_data["7"]["data"]["3"]["data"]
|
| 107 |
+
except:
|
| 108 |
+
NoCLan = True
|
| 109 |
+
if NoCLan:
|
| 110 |
+
a = f'''
|
| 111 |
+
[FFFF00][1] - ProFile InFo :
|
| 112 |
+
[ffffff]
|
| 113 |
+
Name : {a3}
|
| 114 |
+
Uid : {xMsGFixinG(a1)}
|
| 115 |
+
Likes : {xMsGFixinG(a2)}
|
| 116 |
+
LeveL : {player_level}
|
| 117 |
+
Server : {player_server}
|
| 118 |
+
Bio : {player_bio}
|
| 119 |
+
Creating : {account_date}
|
| 120 |
+
LasT LoGin : {last_login}
|
| 121 |
+
[90EE90]Dev : Neuf-t Team\n'''
|
| 122 |
+
a = a.replace('[i]','')
|
| 123 |
+
return a
|
| 124 |
+
|
| 125 |
+
else:
|
| 126 |
+
a = f'''
|
| 127 |
+
[b][c][90EE90] [SuccessFully] - Get PLayer s'InFo !
|
| 128 |
+
[FFFF00][1] - ProFile InFo :
|
| 129 |
+
[ffffff]
|
| 130 |
+
Name : {a3}
|
| 131 |
+
Uid : {xMsGFixinG(a1)}
|
| 132 |
+
Likes : {xMsGFixinG(a2)}
|
| 133 |
+
LeveL : {player_level}
|
| 134 |
+
Server : {player_server}
|
| 135 |
+
Bio : {player_bio}
|
| 136 |
+
Creating : {account_date}
|
| 137 |
+
LasT LoGin : {last_login}
|
| 138 |
+
[b][c][FFFF00][2] - Guild InFo :
|
| 139 |
+
[ffffff]
|
| 140 |
+
Guild Name : {clan_name}
|
| 141 |
+
Guild Uid : {xMsGFixinG(clan_id)}
|
| 142 |
+
Guild LeveL : {clan_level}
|
| 143 |
+
Guild Members : {clan_members_num}
|
| 144 |
+
Leader s'Uid : {xMsGFixinG(clan_leader)}
|
| 145 |
+
Leader s'Name : {clan_leader_name}\n'''
|
| 146 |
+
a = a.replace('[i]','')
|
| 147 |
+
return a
|
| 148 |
+
|
| 149 |
+
except Exception as e:
|
| 150 |
+
return f'\n[b][c][FFD700]FaiLEd GeTinG PLayer InFo !\n'
|
| 151 |
+
else:
|
| 152 |
+
return f'\n[b][c][FFD700]FaiLEd GeTinG PLayer InFo !\n'
|
| 153 |
+
|
| 154 |
+
def DeLet_Uid(id , Tok):
|
| 155 |
+
print(f' Done FuckinG > {id} ')
|
| 156 |
+
url = 'https://clientbp.common.ggbluefox.com/RemoveFriend'
|
| 157 |
+
headers = {
|
| 158 |
+
'X-Unity-Version': '2018.4.11f1',
|
| 159 |
+
'ReleaseVersion': 'OB51',
|
| 160 |
+
'Content-Type': 'application/x-www-form-urlencoded',
|
| 161 |
+
'X-GA': 'v1 1',
|
| 162 |
+
'Authorization': f'Bearer {Tok}',
|
| 163 |
+
'Content-Length': '16',
|
| 164 |
+
'User-Agent': 'Dalvik/2.1.0 (Linux; U; Android 7.1.2; ASUS_Z01QD Build/QKQ1.190825.002)',
|
| 165 |
+
'Host': 'clientbp.ggblueshark.com',
|
| 166 |
+
'Connection': 'Keep-Alive',
|
| 167 |
+
'Accept-Encoding': 'gzip'}
|
| 168 |
+
data = bytes.fromhex(EnC_AEs(f"08a7c4839f1e10{EnC_Uid(id , Tp = 'Uid')}"))
|
| 169 |
+
ResPonse = requests.post(url , headers=headers , data=data , verify=False)
|
| 170 |
+
if ResPonse.status_code == 400 and 'BR_FRIEND_NOT_SAME_REGION' in ResPonse.text:
|
| 171 |
+
return f'[b][c]Id : {xMsGFixinG(id)} Not In Same Region !'
|
| 172 |
+
elif ResPonse.status_code == 200:
|
| 173 |
+
return f'[b][c]Good Response Done Delete Id : {xMsGFixinG(id)} !'
|
| 174 |
+
else:
|
| 175 |
+
return f'[b][c]Erorr !'
|
| 176 |
+
|
| 177 |
+
|
| 178 |
+
def ChEck_The_Uid(id):
|
| 179 |
+
try:
|
| 180 |
+
with open('uids.json', 'r') as f:
|
| 181 |
+
data = json.load(f)
|
| 182 |
+
user_data = data.get(str(id))
|
| 183 |
+
|
| 184 |
+
if not user_data:
|
| 185 |
+
return False
|
| 186 |
+
|
| 187 |
+
status = user_data.get('status')
|
| 188 |
+
expire = user_data.get('expire')
|
| 189 |
+
|
| 190 |
+
if not expire:
|
| 191 |
+
return (status, "No expire date")
|
| 192 |
+
|
| 193 |
+
|
| 194 |
+
now = datetime.now()
|
| 195 |
+
expire_date = datetime.fromtimestamp(expire)
|
| 196 |
+
remaining_time = expire_date - now
|
| 197 |
+
|
| 198 |
+
if remaining_time.total_seconds() <= 0:
|
| 199 |
+
return (status, "Expired")
|
| 200 |
+
|
| 201 |
+
|
| 202 |
+
days = remaining_time.days
|
| 203 |
+
seconds = remaining_time.seconds
|
| 204 |
+
hours = seconds // 3600
|
| 205 |
+
minutes = (seconds % 3600) // 60
|
| 206 |
+
seconds = seconds % 60
|
| 207 |
+
|
| 208 |
+
formatted_time = f"{days} Day - {hours} Hour - {minutes} Min - {seconds} Sec"
|
| 209 |
+
return (status, formatted_time)
|
| 210 |
+
|
| 211 |
+
except Exception as e:
|
| 212 |
+
print(f"Error reading JSON: {e}")
|
| 213 |
+
return False
|
xKEys.py
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# -*- coding: utf-8 -*-
|
| 2 |
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
| 3 |
+
# NO CHECKED-IN PROTOBUF GENCODE
|
| 4 |
+
# source: my_message.proto
|
| 5 |
+
# Protobuf Python Version: 5.27.2
|
| 6 |
+
"""Generated protocol buffer code."""
|
| 7 |
+
from google.protobuf import descriptor as _descriptor
|
| 8 |
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
| 9 |
+
from google.protobuf import runtime_version as _runtime_version
|
| 10 |
+
from google.protobuf import symbol_database as _symbol_database
|
| 11 |
+
from google.protobuf.internal import builder as _builder
|
| 12 |
+
_runtime_version.ValidateProtobufRuntimeVersion(
|
| 13 |
+
_runtime_version.Domain.PUBLIC,
|
| 14 |
+
5,
|
| 15 |
+
27,
|
| 16 |
+
2,
|
| 17 |
+
'',
|
| 18 |
+
'my_message.proto'
|
| 19 |
+
)
|
| 20 |
+
# @@protoc_insertion_point(imports)
|
| 21 |
+
|
| 22 |
+
_sym_db = _symbol_database.Default()
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
|
| 27 |
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x10my_message.proto\">\n\tMyMessage\x12\x0f\n\x07\x66ield21\x18\x15 \x01(\x03\x12\x0f\n\x07\x66ield22\x18\x16 \x01(\x0c\x12\x0f\n\x07\x66ield23\x18\x17 \x01(\x0c\x62\x06proto3')
|
| 28 |
+
|
| 29 |
+
_globals = globals()
|
| 30 |
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
| 31 |
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'my_message_pb2', _globals)
|
| 32 |
+
if not _descriptor._USE_C_DESCRIPTORS:
|
| 33 |
+
DESCRIPTOR._loaded_options = None
|
| 34 |
+
_globals['_MYMESSAGE']._serialized_start=20
|
| 35 |
+
_globals['_MYMESSAGE']._serialized_end=82
|
| 36 |
+
# @@protoc_insertion_point(module_scope)
|