Make executable file at runtime

Okay, so I was wondering how one could create a program that creates a second program (for example, how most compression programs can create self-extracting self excutables, but this is not what I need).

Say I have 2 programs. Each of them contains a class. One program that I would use to modify and populate a class with data. The second file will be a program that also has a class, but is empty, and the only purpose is to access this data in a certain way. I don’t know, I think if a particular class was serialized and then “entered” into the second file. But how can this be done? I found modifications to files that were already compiled, although I could never make changes that did not cause errors.

This is just a thought. I don’t know what the decision would be, something that crossed my mind.

I would prefer some information in c or C ++ that is cross-platform. The only other language that I would accept is C #.

and

I am not looking for a 3rd party library or things like Boost. If something in the right direction can be everything I need.

++ also

I do not want to use the compiler.

Jalf really read what i wrote

That is what I would like to know how to do. I think this is pretty obvious from what I asked above. I did not say anything about compiling files or writing scripts.

QUOTE "I found modifying files that have already been compiled"

Please read and understand the question before posting.

thank.

+3
source share
7 answers

. -, , , . , .

, , . , , . Windows , " " ( exe , , ).

, zip diff. , X- , , , . , , () .

, , : http://en.wikipedia.org/wiki/Portable_Executable

Windows , Linux. - , . - , . #, , , Windows ( .net) Linux ( Mono).

+5

, ( ) ?

?

+3

, , C, ++, Java #, "" , , PHP, Perl ECMAscript, , . .

EXE , , , DLL, . , , .

, , : ? , , eval(), , . , , GOTO. , , 99% .

, :)

+3

, , this . , , .

- ADD -

, , 1- exe . , . , . - !

+1

, , ,

CodeDom.

0

, Lua Python, ? .

wikipedia:

- , , , . , , . , .

0

, , .

Basically, you write code somewhere in memory, as if it were simple data, and you name it. This is usually a bad idea, but it's pretty fun.

0
source

Source: https://habr.com/ru/post/1732864/


All Articles