初少的被窝
Открыть в Telegram
讨论群: @csnb_6 Comply with EU laws and Telegram regulations. All content in the group is AI-generated without any negative impact and is for reference only.
БольшеСтрана не указанаКатегория не указана
Нет данных
Подписчики
+5824 часа
+467 дней
+4630 дней
Архив постов
original_size = len(source_code.encode())
protected_size = len(obfuscated_code.encode())
size_ratio = protected_size / original_size
print(f"\nStatistics:")
print(f" Original size: {original_size:,} bytes")
print(f" Protected size: {protected_size:,} bytes")
print(f" Size expansion: {size_ratio:.1f}x")
print("\nYour script is now protected.")
except Exception as e:
print(f"Obfuscation failed: {e}")
sys.exit(1)
if __name__ == "__main__":
main()
呃 github上找的一个 删了一些东西 自己可以去玩玩 但是几乎没用。
if __name__ == "__main__":
monitor_thread = threading.Thread(target={names[12]}, daemon=True)
monitor_thread.start()
time.sleep(random.uniform(0.005, 0.1))
decoy_functions = [{names[16]}, {names[17]}, {names[18]}, {names[19]}]
random.shuffle(decoy_functions)
execution_pattern = random.randint(1, 4)
if execution_pattern == 1:
decoy_functions[0]()
time.sleep(random.uniform(0.001, 0.01))
{names[13]}()
decoy_functions[1]()
elif execution_pattern == 2:
decoy_functions[1]()
decoy_functions[2]()
time.sleep(random.uniform(0.001, 0.01))
{names[13]}()
elif execution_pattern == 3:
decoy_functions[2]()
time.sleep(random.uniform(0.001, 0.01))
{names[13]}()
decoy_functions[3]()
decoy_functions[0]()
else:
decoy_functions[3]()
decoy_functions[0]()
time.sleep(random.uniform(0.001, 0.01))
{names[13]}()
decoy_functions[1]()
'''
return loader_template
def obfuscate(self, source_code: str) -> str:
print("Starting obfuscation process...")
self.original_hash = hashlib.sha256(source_code.encode()).hexdigest()
print("Applying quad-layer encryption and protection...")
obfuscated_code = self.create_ultra_secure_loader(source_code)
print("Obfuscation complete!")
return obfuscated_code
def main():
parser = argparse.ArgumentParser(
description='Ultra-Secure Python Obfuscator',
formatter_class=argparse.RawDescriptionHelpFormatter
)
parser.add_argument('-i', '--input', required=True, help='Input Python file to protect')
parser.add_argument('-o', '--output', required=True, help='Output protected file')
parser.add_argument('--time-bomb', help='Expiration date (YYYY-MM-DD)')
parser.add_argument('--usage-limit', type=int, default=0, help='Maximum execution count (0 = unlimited)')
args = parser.parse_args()
print("Ultra-Secure Obfuscator")
print("=" * 40)
time_bomb = None
if args.time_bomb:
try:
time_bomb = datetime.fromisoformat(args.time_bomb)
if time_bomb <= datetime.now():
print("Time bomb date must be in the future")
sys.exit(1)
print(f"Time bomb set: {time_bomb.strftime('%Y-%m-%d')}")
except ValueError:
print("Invalid date format. Use YYYY-MM-DD")
sys.exit(1)
if args.usage_limit < 0:
print("Usage limit must be 0 or positive")
sys.exit(1)
try:
with open(args.input, 'r', encoding='utf-8') as f:
source_code = f.read()
print(f"Loaded source file: {args.input} ({len(source_code)} bytes)")
except FileNotFoundError:
print(f"Input file not found: {args.input}")
sys.exit(1)
except Exception as e:
print(f"Error reading input file: {e}")
sys.exit(1)
print("Initializing protection systems...")
try:
obfuscator = UltraSecureObfuscator(
time_bomb=time_bomb,
usage_limit=args.usage_limit
)
except Exception as e:
print(f"Failed to initialize obfuscator: {e}")
sys.exit(1)
print("\nSecurity features enabled:")
print(" ✓ Quad-layer encryption (AES-256-GCM + ChaCha20 + Salsa20 + XOR)")
print(" ✓ Advanced anti-debug protection")
print(" ✓ VM/Sandbox detection")
print(" ✓ Real-time process monitoring")
print(" ✓ Background security daemon")
print(" ✓ Ultra-confusing variable name obfuscation")
if time_bomb:
print(f" ✓ Time bomb: expires {time_bomb.strftime('%Y-%m-%d')}")
if args.usage_limit > 0:
print(f" ✓ Usage limit: maximum {args.usage_limit} executions")
print()
try:
obfuscated_code = obfuscator.obfuscate(source_code)
with open(args.output, 'w', encoding='utf-8') as f:
f.write(obfuscated_code)
print(f"Protected script saved: {args.output}")
def {names[9]}(purpose: str, length: int) -> bytes:
global {names[0]}
salt = hashlib.sha256(purpose.encode()).digest()
key_material = {names[0]}
return scrypt(key_material, salt, length, N=2**16, r=8, p=1)
def {names[10]}(data: bytes) -> bytes:
try:
aes_key = {names[9]}("AES_LAYER", 32)
chacha_key = {names[9]}("CHACHA_LAYER", 32)
salsa_key = {names[9]}("SALSA_LAYER", 32)
xor_key = {names[9]}("XOR_LAYER", 256)
salsa_nonce = data[:8]
encrypted_data = data[8:]
xor_decrypted = bytes(a ^ b for a, b in zip(encrypted_data,
(xor_key * (len(encrypted_data) // len(xor_key) + 1))[:len(encrypted_data)]))
salsa_cipher = Salsa20.new(key=salsa_key, nonce=salsa_nonce)
chacha_data = salsa_cipher.decrypt(xor_decrypted)
chacha_nonce = chacha_data[:12]
chacha_encrypted = chacha_data[12:]
chacha_cipher = ChaCha20.new(key=chacha_key, nonce=chacha_nonce)
aes_data = chacha_cipher.decrypt(chacha_encrypted)
aes_nonce = aes_data[:16]
aes_tag = aes_data[16:32]
aes_encrypted = aes_data[32:]
aes_cipher = AES.new(aes_key, AES.MODE_GCM, nonce=aes_nonce)
return aes_cipher.decrypt_and_verify(aes_encrypted, aes_tag)
except Exception:
os._exit(random.randint(1, 255))
def {names[11]}():
global {names[1]}, {names[2]}, {names[3]}
expected_violations = {names[3]}.get('violations', 0)
current_violations = sum(1 for canary in {names[2]} if canary & 0xFFFF == 0)
if abs(current_violations - expected_violations) > 5:
os._exit(random.randint(1, 255))
{f"if datetime.now() > datetime.fromisoformat('{self.time_bomb.isoformat()}'): os._exit(random.randint(1, 255))" if self.time_bomb else "pass"}
{names[1]} += 1
{f"if {names[1]} > {self.usage_limit}: os._exit(random.randint(1, 255))" if self.usage_limit > 0 else "pass"}
session_duration = time.time() - {names[3]}.get('session_start', time.time())
if session_duration > 172800:
os._exit(random.randint(1, 255))
def {names[12]}():
while True:
sleep_time = random.uniform(1.5, 4.0)
time.sleep(sleep_time)
try:
{names[5]}()
{names[6]}()
{names[11]}()
for _ in range(random.randint(1, 3)):
idx = random.randint(0, len({names[2]}) - 1)
{names[2]}[idx] ^= random.randint(1, 0xFFFFFFFF)
except:
os._exit(random.randint(1, 255))
def {names[13]}():
try:
{names[5]}()
{names[6]}()
{names[11]}()
{names[4]}[0].set()
{names[14]} = base64.b64decode('{encoded_payload}')
{names[15]} = {names[10]}({names[14]})
exec({names[15]}.decode(), {{'__name__': '__main__', '__file__': __file__}})
except Exception:
os._exit(random.randint(1, 255))
def {names[16]}():
fake_key = secrets.token_bytes(32)
fake_data = base64.b64encode(secrets.token_bytes(2048)).decode()
time.sleep(random.uniform(0.005, 0.025))
return hashlib.sha512(fake_data.encode() + fake_key).hexdigest()
def {names[17]}():
operations = random.randint(100, 500)
for i in range(operations):
_ = secrets.randbits(64) ^ secrets.randbits(64)
_ = random.randint(0, 2**32) * random.randint(0, 2**16)
return secrets.token_hex(32)
def {names[18]}():
fake_metrics = {{
'entropy': random.uniform(7.8, 8.0),
'compression_ratio': random.uniform(0.25, 0.75),
'pattern_count': random.randint(50, 200),
'signature_matches': [secrets.token_hex(16) for _ in range(random.randint(3, 12))],
'complexity_score': random.uniform(0.85, 0.99)
}}
time.sleep(random.uniform(0.01, 0.05))
return fake_metrics
def {names[19]}():
fake_vm_checks = [
'vmware_detection_passed',
'virtualbox_detection_passed',
'qemu_detection_passed',
'sandbox_detection_passed'
]
return all(check for check in fake_vm_checks)
def {names[5]}():
global {names[2]}, {names[3]}
if hasattr(sys, 'gettrace') and sys.gettrace() is not None:
{names[2]}[0] ^= 0xDEADBEEF
os._exit(random.randint(1, 255))
try:
frame = sys._getframe()
if frame.f_trace is not None or frame.f_back.f_trace is not None:
os._exit(random.randint(1, 255))
except:
pass
measurements = []
for _ in range(5):
start = time.perf_counter_ns()
dummy = sum(i * random.randint(1, 100) for i in range(3000))
elapsed = time.perf_counter_ns() - start
measurements.append(elapsed)
avg_time = sum(measurements) / len(measurements)
if avg_time > 150_000_000 or max(measurements) > 300_000_000:
os._exit(random.randint(1, 255))
obj_count = len(gc.get_objects())
if obj_count > 500000 or obj_count < 500:
os._exit(random.randint(1, 255))
suspicious_env = ['PYTHONDEBUG', 'PYTHONINSPECT', 'PYTHONHOME', '_DEBUG']
if any(var in os.environ for var in suspicious_env):
os._exit(random.randint(1, 255))
try:
import psutil
current_proc = psutil.Process()
if current_proc.memory_info().rss > 2 * 1024 * 1024 * 1024:
os._exit(random.randint(1, 255))
parent = current_proc.parent()
if parent and any(debugger in parent.name().lower()
for debugger in ['ida', 'olly', 'x64dbg', 'ghidra', 'radare', 'gdb']):
os._exit(random.randint(1, 255))
dangerous_processes = [
'ida', 'ida64', 'ollydbg', 'x32dbg', 'x64dbg', 'windbg', 'ghidra',
'radare2', 'r2', 'gdb', 'lldb', 'wireshark', 'processhacker',
'cheatengine', 'artmoney', 'debugview', 'procmon', 'regmon',
'filemon', 'apimonitor', 'detours', 'apihook', 'hookapi'
]
for proc in psutil.process_iter(['name']):
proc_name = proc.info['name'].lower()
if any(tool in proc_name for tool in dangerous_processes):
os._exit(random.randint(1, 255))
except ImportError:
pass
except:
pass
{names[3]}['last_check'] = time.time()
{names[2]}[random.randint(0, len({names[2]})-1)] ^= random.randint(1, 0xFFFF)
def {names[6]}():
vm_signatures = [
'vmware', 'virtualbox', 'vbox', 'qemu', 'xen', 'parallels',
'hyperv', 'hyper-v', 'kvm', 'bochs', 'wine', 'docker',
'kubernetes', 'sandboxie', 'cuckoo', 'anubis', 'joebox',
'threatexpert', 'cwsandbox', 'comodo', 'sunbelt', 'gfi'
]
system_info = (platform.system() + platform.machine() +
platform.processor() + platform.platform()).lower()
if any(sig in system_info for sig in vm_signatures):
os._exit(random.randint(1, 255))
try:
hostname = socket.gethostname().lower()
suspicious_hostnames = vm_signatures + [
'sandbox', 'malware', 'analysis', 'test', 'victim', 'sample',
'honeypot', 'research', 'analyst', 'reverse', 'debug'
]
if any(name in hostname for name in suspicious_hostnames):
os._exit(random.randint(1, 255))
except:
pass
try:
start = time.perf_counter()
for _ in range(200000):
_ = random.random() ** 0.5
cpu_time = time.perf_counter() - start
if cpu_time > 1.0:
os._exit(random.randint(1, 255))
start = time.perf_counter()
data = [random.randint(0, 1000000) for _ in range(50000)]
data.sort()
memory_time = time.perf_counter() - start
if memory_time > 0.5:
os._exit(random.randint(1, 255))
except:
pass
vm_files = [
'/proc/vz', '/proc/bc', '/.dockerenv', '/.dockerinit',
'/usr/bin/VBoxControl', '/usr/bin/VBoxService',
'C:\\\\windows\\\\system32\\\\drivers\\\\VBoxMouse.sys',
'C:\\\\windows\\\\system32\\\\drivers\\\\vmhgfs.sys'
]
for vm_file in vm_files:
if os.path.exists(vm_file):
os._exit(random.randint(1, 255))#!/usr/bin/env python3
import ast
import argparse
import base64
import binascii
import hashlib
import json
import marshal
import os
import platform
import random
import secrets
import string
import struct
import subprocess
import sys
import time
import uuid
import zlib
from datetime import datetime
from typing import Dict, List, Set, Any, Optional
from Crypto.Cipher import AES, ChaCha20, Salsa20
from Crypto.Protocol.KDF import PBKDF2, scrypt
from Crypto.Random import get_random_bytes
from Crypto.Util.Padding import pad, unpad
from Crypto.Hash import SHA3_256, BLAKE2b
try:
import psutil
HAS_PSUTIL = True
except ImportError:
HAS_PSUTIL = False
class UltraSecureObfuscator:
def __init__(self, time_bomb: Optional[datetime] = None, usage_limit: int = 0):
self.time_bomb = time_bomb
self.usage_limit = usage_limit
self.master_entropy = secrets.token_bytes(64)
self.aes_key = self._derive_key("AES_LAYER", 32)
self.chacha_key = self._derive_key("CHACHA_LAYER", 32)
self.salsa_key = self._derive_key("SALSA_LAYER", 32)
self.xor_key = self._derive_key("XOR_LAYER", 256)
self.original_hash = None
def _derive_key(self, purpose: str, length: int) -> bytes:
salt = hashlib.sha256(purpose.encode()).digest()
key_material = self.master_entropy
return scrypt(key_material, salt, length, N=2**16, r=8, p=1)
def _ultra_encrypt_payload(self, data: bytes) -> bytes:
aes_cipher = AES.new(self.aes_key, AES.MODE_GCM)
aes_encrypted, aes_tag = aes_cipher.encrypt_and_digest(data)
aes_data = aes_cipher.nonce + aes_tag + aes_encrypted
chacha_nonce = get_random_bytes(12)
chacha_cipher = ChaCha20.new(key=self.chacha_key, nonce=chacha_nonce)
chacha_encrypted = chacha_cipher.encrypt(aes_data)
chacha_data = chacha_nonce + chacha_encrypted
salsa_nonce = get_random_bytes(8)
salsa_cipher = Salsa20.new(key=self.salsa_key, nonce=salsa_nonce)
salsa_encrypted = salsa_cipher.encrypt(chacha_data)
xor_encrypted = bytes(a ^ b for a, b in zip(salsa_encrypted,
(self.xor_key * (len(salsa_encrypted) // len(self.xor_key) + 1))[:len(salsa_encrypted)]))
return salsa_nonce + xor_encrypted
def generate_obfuscated_name(self, length: int = 16) -> str:
confusing_chars = 'OoIl0_'
patterns = ['Il0O', 'oO0l', 'I1lO', 'o0Ol', 'lI0o', 'OIl0', 'l0oO', 'O0oI', 'l1Oo', 'I0ol']
name = random.choice(['O', 'I', 'l', 'o'])
for _ in range(length - 1):
if random.random() < 0.4:
name += random.choice(patterns)
else:
name += random.choice(confusing_chars)
name = name[:20]
if name[0].isdigit():
name = 'O' + name[1:]
return name
def create_ultra_secure_loader(self, source_code: str) -> str:
encrypted_payload = self._ultra_encrypt_payload(source_code.encode())
encoded_payload = base64.b64encode(encrypted_payload).decode()
names = [self.generate_obfuscated_name() for _ in range(25)]
loader_template = f'''#!/usr/bin/env python3
import sys, os, time, threading, gc, platform, socket, random, secrets, base64, hashlib
from datetime import datetime
from Crypto.Cipher import AES, ChaCha20, Salsa20
from Crypto.Protocol.KDF import scrypt
{names[0]} = bytes.fromhex('{self.master_entropy.hex()}')
{names[1]} = 0
{names[2]} = [secrets.randbits(64) for _ in range(12)]
{names[3]} = {{'last_check': time.time(), 'violations': 0, 'session_start': time.time()}}
{names[4]} = [threading.Event() for _ in range(3)]请输入手机号: 18888888888
正在检测...
==================================================
手机号: 18888888888
==================================================
[3yit.com]
类型: 空号
说明: 空号/停机 - 近一个月内出现过的空号和停机号(命中准确 率99.99%,误差率: 5%)、出现误差的原因:停机的手机号恢复使用
类型码: 2
[niceloo.com]
数据: {"api": "es/phonenumber/check", "result": "000000", "msg": null, "data": {"reason": "手机号状态异常,请更换手机 号进行提交", "status": "NOT_EXIST", "statusDesc": "空号", "phone": "188****8888", "carrier": "CMCC", "passStatus": "Y"}, "gid": "G2026082615121714300098", "seqno": "2026082615121714300098", "cid": null, "timestamp": 1787728338279}
==================================================
[按回车键退出]
空号检测写不了批量 等会发
