Lets say a have program.exe , i will create a python script that will
- read program.exe in binary mode and save it in variable data
- open mypytonprog.py in binary append mode
- append data to mypythonprog.py (?)
before this, mypythonprog.py would be prepared as:
program_data='''
after it, mypythonprog.py would continue as:
'''
programs continues....
(i want somehow to put that program code into a program_data variable)
This, does not work,of course, but can it be done in some way ? What i want basicly is: mypythonfile.py to be able to create an exe file with binary data stored inside it.
I suppouse i have to encode that data to a shellcode to by able to put it inside mypythonfile.py,
right ?