import socket import ssl import struct import time import sys from importlib import util as importlib_util from os import path # =================================================================================== # my_rdp.py - Pustaka Inti untuk RDP Fingerprinting & NTLM Info # Versi 3.0 - Didesain ulang untuk keandalan maksimum # =================================================================================== # --- Konstanta Protokol --- PROTOCOL_RDP = 0 PROTOCOL_SSL = 1 PROTOCOL_HYBRID = 2 # Target utama kita untuk CredSSP/NTLM PROTOCOL_HYBRID_EX = 8 TYPE_RDP_NEG_REQ = 1 TYPE_RDP_NEG_RSP = 2 TYPE_RDP_NEG_FAILURE = 3 # --- Peta Versi OS dari NTLM --- OsVersion = { "6.0.6002": "Windows Server 2008 SP2", "6.1.7601": "Windows 7 SP1 / Server 2008 R2 SP1", "6.2.9200": "Windows 8 / Server 2012", "6.3.9600": "Windows 8.1 / Server 2012 R2", "10.0.14393": "Windows 10, v1607 / Server 2016", "10.0.17763": "Windows 10, v1809 / Server 2019", "10.0.19041": "Windows 10, v2004", "10.0.19042": "Windows 10, v20H2", "10.0.19043": "Windows 10, v21H1", "10.0.19044": "Windows 10, v21H2", "10.0.19045": "Windows 10, v22H2", "10.0.20348": "Windows Server 2022", "10.0.22621": "Windows 11, v22H2", "10.0.22631": "Windows 11, v23H2", "10.0.25110": "Windows 10/11 Insider Preview" # Menambahkan versi dari contoh Anda } def NewReq(protocol, cookie="mhl-team"): """Membangun paket RDP Negotiation Request.""" cookie_bytes = f"Cookie: mstshash={cookie}\r\n".encode() rdpNegReq = struct.pack('BBH', 3, 0, len(x224Crq) + len(data)) return tpktHeader + x224Crq + data def ParseRdpResp(data): """Mem-parsing header respons RDP yang paling dasar.""" if len(data) < 19: return None, None, None, "Response packet too short" rdp_neg_data = data[11:19] if len(rdp_neg_data) < 8: return None, None, None, "RDP Neg data too short" resp_type, _, _, result = struct.unpack(' 1 else None