mirror of
https://github.com/chmod760/CopyReadProcessMemory
synced 2026-06-06 15:24:30 +00:00
19 lines
509 B
Python
19 lines
509 B
Python
#!/usr/bin/python3
|
|
import sys
|
|
|
|
# chmod760
|
|
key=[ 0x63, 0x68, 0x6D ,0x6F, 0x64, 0x37, 0x36, 0x30]
|
|
|
|
file_b = bytearray(open(sys.argv[1], 'rb').read())
|
|
size = len(file_b)
|
|
xord_byte_array = bytearray(size)
|
|
|
|
print("unsigned char shellcode[] =\"", end="")
|
|
for i in range(size):
|
|
#print("%s:%s", [file_b[i], key[i % len(key)]])
|
|
xord_byte_array[i] = file_b[i] ^ key[i % len(key)]
|
|
b = xord_byte_array[i]
|
|
print(f"\\x{b:02X}", end="")
|
|
print("\";", end="")
|
|
open(sys.argv[1] + "_xored", "wb").write(xord_byte_array)
|