Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Sponge99

Appending to exe's and com's

This topic is 6921 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Can I open an EXE file with "fopen("s.exe","a")" and then append to the end of it? When I do, will it screw up the program? Yeah, I could learn on my own, but I like complaining to ya'll better.

Share this post


Link to post
Share on other sites
Advertisement
appending to the end of an EXE won''t screw up the program, no. the original file size is stored in the header, and the program, if it works to begin with, should terminate before reaching whatever you have to append.


--
Float like a butterfly, bite like a crocodile.

Share this post


Link to post
Share on other sites
Absolutely, you can. I''m pretty sure this is how a slide show program that provides you with an exe after you put in jpg, bmp, gif, mp3, etc. I also think this is what a self extracting file does.

The best use of this that I''ve seen. In college, a long long long time ago, the VAX system administrator got mad at a fellow buddy hacker who had messed up his DEC-10 system (Mark really shouldn''t have been helping Brad if he was going to get mad when Brad finally succeeded). His retalitation was to modify the C compiler on the new VAX system so that when you compiled a program it appended some data to the executable. When you typed out the executable to the display, after watching a bunch of garbage go by, you would see three lines on the last page of garbage that said ''Brad X is a bozo!''. Now if that ain''t funny you are not a real computer geek.

Mike Roberts
aka milo
mlbobs@telocity.com

Share this post


Link to post
Share on other sites
Hehe, thanks for the help, and that''s a good story. How''d he modify the compiler? Was the source available? Or could he mistyriously read binary?



Yeah, I could learn on my own, but I like complaining to ya'll better.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!