home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.msdos.programmer
- Path: sparky!uunet!sun-barr!cs.utexas.edu!torn!news.ccs.queensu.ca!dmurdoch
- From: dmurdoch@QueensU.CA (Duncan Murdoch)
- Subject: Re: changes to exe (binary) file
- Message-ID: <Bs7nEp.JLt@knot.ccs.queensu.ca>
- Sender: news@knot.ccs.queensu.ca (Netnews control)
- Organization: Queen's University, Kingston, Canada
- References: <1992Jul29.125540.7401@hou.amoco.com> <1992Jul30.152020.8261@menudo.uh.edu>
- Date: Thu, 30 Jul 1992 16:35:13 GMT
- Lines: 32
-
- In article <1992Jul30.152020.8261@menudo.uh.edu> cosc16to@menudo.uh.edu (Andy Hakim) writes:
- >In article <1992Jul29.125540.7401@hou.amoco.com> jim@n5ial.chi.il.us writes:
- >>
- >>I've seen lots of programs (usually shareware types) that allow you to
- >>make configuration changes, insert registration info, etc., directly into
- >>the compiled exe file.
-
- >To figure out the offset: (DEFAULT_OFFSET in example) compile the
- >program, then use a program such as LIST to scan for a sequence of
- >matching bytes ( 100 118 138 ) The HEX DUMP mode of LIST is handy.
- >Next, go back to your source file, and update the correct offset.
- >An alternative way to figure out the offset is to use info from .map files.
-
- Those are both quite dangerous. Plenty of people use PKLITE or LZEXE or
- another .EXE compressor to modify .EXE files; if you blindly go reading
- and writing at a specific location, you'll mess up badly. A better
- solution is to append the data to the .EXE file; the unbuggy compressors will
- think it's an overlay, and leave it alone, or refuse to work. You
- should also be sure to put a signature in the record, so you can double
- check that whatever calculation you end up with is correct.
-
- If you want to be really nice to your users, you'll give them the option
- of reading the config info from a config file, too. That way it's easy
- to maintain multiple different configurations.
-
- A nice way to do this (both ways) is using a Turbo Vision resource file,
- if you're using Borland's Pascal or C++. It's very easy to use a config
- file if present or your .EXE if not, and all the signature checking is
- built in.
-
- Duncan Murdoch
- dmurdoch@mast.queensu.ca
-