Article View: alt.msdos.programmer
Article #1194Re: Writing to a file??
From: Alexander J Russell
Date: Sun, 10 Mar 1996 17:30
Date: Sun, 10 Mar 1996 17:30
20 lines
1467 bytes
1467 bytes
In article <4huop2$fif@sam.inforamp.net>, omega@inforamp.net says... > >Hey, everyone! > >I was wondering if there is any way to write data to an EXE file (or COM, >preferably EXE) and still have the file work. You know, like for copy >protection and all. I AM NOT WRITING A VIRUS, for all you concerned people. So >if you do know how, or if there is a FAQ, a program, or other type of >resource, please tell me. TIA (Thanx In Advance) :) > >- omega@inforamp.net Just append the data to the end of the EXE. Dos reads the EXE header to figure out where to load stuff. Appending to the end will do no harm. You can then find where your data starts, by 1] decoding the EE header or baking the last 4 bytes of data you append the length (in a long int) of the original EXE. -- The AnArChIsT! Anarchy! Not Chaos! aka Alex Russell alexad3@iceonline.com
Technical Details
Message-ID:
<Do2BAD.Gn1@iceonline.com>Path:
arc1-ca.pugleaf.net!news.iceonline.com!NewsposterReferences:
<4huop2$fif@sam.inforamp.net>Show Full Headers
Complete Article Headers
Newsgroups: alt.msdos.programmer,comp.lang.c,comp.os.msdos.programmer,comp.programming Path: arc1-ca.pugleaf.net!news.iceonline.com!Newsposter From: alexad3@icebox.iconline.com (Alexander J Russell) Subject: Re: Writing to a file?? Content-Type: Text/Plain; charset=US-ASCII X-Newsreader: WinVN 0.99.7 Reply-To: alexad3@icebox.iceonlie.com Sender: Newsposter@iceonline.com (Newsposter) Nntp-Posting-Host: ns.iceonline.com Organization: ICE Online Internet news Message-ID: <Do2BAD.Gn1@iceonline.com> References: <4huop2$fif@sam.inforamp.net> Mime-Version: 1.0 Date: Sun, 10 Mar 1996 17:30:13 GMT