From: Damian Yerrick Newsgroups: comp.os.msdos.djgpp Subject: Re: Some dodgy FILE hackery Organization: Pin Eight Software http://pineight.8m.com/ Message-ID: References: <8amfqu$ue5$1 AT newsg2 DOT svr DOT pol DOT co DOT uk> X-Newsreader: Forte Agent 1.7/32.534 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 35 X-Trace: /bNDCy8JK2girt57ZgRM5rDJgjlN4aoTbfHdfHHATCxeC5N+EcQx3O952qUZB4hiiaGXmmyLcwZd!uYCZ311J85bx/UEPpC/4WA4+kXyuR99lxsTvDDe4H3xTHIeTS10jN+HZkCmwrNQDXHfvF+C7+giK!Ps5ZXXU= X-Complaints-To: abuse AT gte DOT net X-Abuse-Info: Please be sure to forward a copy of ALL headers X-Abuse-Info: Otherwise we will be unable to process your complaint properly NNTP-Posting-Date: Thu, 16 Mar 2000 04:16:45 GMT Distribution: world Date: Thu, 16 Mar 2000 04:16:45 GMT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com On Tue, 14 Mar 2000 22:48:21 -0000, "Ben Davis" wrote: >I use DJGPP and Allegro. Most of my files (eg. levels) are saved >using the packfile functions of Allegro. I need to encrypt some >of these files without making them bigger. Why? >I have to do the encryption manually; the built-in password function >isn't secure enough. I know; it's xor. >I want to intercept all the low-level file inputs/outputs (where DOS >takes over from Allegro) so that I can modify the bytes at this stage. >But I don't want to modify the Allegro source. Why not? Allegro for DJGPP is static linked. >The packfile functions of Allegro ultimately use read() and write(), and the >DOS file handle is stored in the PACKFILE structure so I can access it >readily. The Allegro source code is stored in /.../allegro/src so you can access it readily. -- Damian Yerrick http://yerricde.tripod.com/ Comment on story ideas: http://home1.gte.net/frodo/quickjot.html AOL is sucks! Find out why: http://anti-aol.org/faqs/aas/ View full sig: http://www.rose-hulman.edu/~yerricde/sig.html This is McAfee VirusScan. Add these two lines to your .sig to prevent the spread of .sig viruses. http://www.mcafee.com/