Life
前往频道在 Telegram
👥 https://telegra.ph/Disclaimer-11-25-17 This Channel is not intended to violate any condition of use. Copyright Disclaimer Under Section 107 of Copyright Act 1976, allowance is made for "fair use" for purposes such as criticism, comment, news reporting,
显示更多702
订阅者
-124 小时
-107 天
-1730 天
帖子存档
702
from Crypto.Cipher import AES
from Crypto.Util.Padding import pad
import json
def encode_varint(n):
out = []
while True:
b = n & 0x7F
n >>= 7
if n:
b |= 0x80
out.append(b)
if not n:
break
return bytes(out)
def build_packet(data):
packet = bytearray()
for k, v in data.items():
field = int(k)
if isinstance(v, dict):
nested = build_packet(v)
packet.append((field << 3) | 2)
packet.extend(encode_varint(len(nested)))
packet.extend(nested)
elif isinstance(v, str):
val = v.encode()
packet.append((field << 3) | 2)
packet.extend(encode_varint(len(val)))
packet.extend(val)
elif isinstance(v, int):
packet.append((field << 3) | 0)
packet.extend(encode_varint(v))
return bytes(packet)
def encrypt(packet):
key = bytes([89,103,38,116,99,37,68,69,117,104,54,37,90,99,94,56])
iv = bytes([54,111,121,90,68,114,50,50,69,51,121,99,104,106,77,37])
cipher = AES.new(key, AES.MODE_CBC, iv)
return cipher.encrypt(pad(packet, AES.block_size))
json_input = input("Nhập JSON: ")
try:
data = json.loads(json_input)
packet = build_packet(data)
encrypted = encrypt(packet)
print("PACKET :", packet.hex().upper())
print("ENCRYPTED:", encrypted.hex().upper())
except Exception as e: pass`
Json => payload_hex702
GetPlayerPersonalShow lỗi => GetPlayerBriefInfo
https://clientbp.ggblueshark/GetPlayerBriefInfo
{"1": 595637205, "2": 1}