Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
357 views
in Technique[技术] by (71.8m points)

windows - Merge two exe files via python


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

The simplest way (which isn't simple at all) would be to first write a program in a compile-able language like c or c++. This program would open itself and look for a delimiter of when the next program begins.

Example:

[exe header][code]{delimiter}[program2]

From there you can read that code and write it into a new exe file (if the second program is a exe) or multiple other ways. Then run the second program. Python could be used to pack the second program onto the first one but...

This is almost exclusively used for malicious programs as the "unpacking" program can be made to not be detected by anti-viruses and the malicious program can be encrypted. Due to this, this is as far as I will go and I won't be giving any examples.

If you have any specific questions about code your working on like errors or unexpected results I am sure many people would be up to helping you. Please let me know if you have any questions!


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...