import os
import random

def modify_exe(file_path):
    random_null_bytes = os.urandom(random.randint(1, 1024))
    with open(file_path, 'ab') as exe_file:
        exe_file.write(random_null_bytes)

    print(f"Modified {file_path}, SHA256 signature has changed with {len(random_null_bytes)} null bytes appended.")


if __name__ == '__main__':
    exe_path = 'RunAsTI.exe'

    if not os.path.isfile(exe_path):
        print("The specified file does not exist.")
    else:
        modify_exe(exe_path)
