Files
monoxgas-sRDI/Python/ConvertToShellcode.py
T
Nick Landers eb0382a347 Seperated python into library and script
Added powershell implementation
Updated ReadMe
2017-07-29 15:54:51 -06:00

13 lines
410 B
Python

from ShellcodeRDI import *
if len(sys.argv) != 2:
print('Usage: RDIShellcodePyConverter.py [DLL File]')
sys.exit()
print('Creating Shellcode: {}'.format(sys.argv[1].replace('.dll', '.bin')))
dll = open(sys.argv[1], 'rb').read()
if len(dll) > 0: convertedDLL = ConvertToShellcode(dll, HashFunctionName("SayHello"))
with open(sys.argv[1].replace('.dll', '.bin'), 'wb') as f:
f.write(convertedDLL)