Re: How Wood Ewe...?
- Posted by Scott Murray <FaIkon1313 at AOL.COM> Apr 28, 1999
- 534 views
From: cklester >What I'm trying to do is track how many times the executable is used... and >by incrementing or decrementing a value within the code itself, I can act on >what I find... see? This is how Eye wood dew it. (untested): In the source, create a string...for example constant Trickstring = "This is my trick string...." The string doesn't need to be used for anything, just to be there. When you need to set data, have the program open it's exe file and scan for the string. sequence filedata atom trickloc filedata = getf( "me.exe", 'b' ) --getf reads an entire file as a sequence of bytes trickloc = match( "This is my trick string..", filedata ) trickloc = trickloc + length( "This is my trick string.." ) Now open the file, seek to trickloc ( the location of the last two periods (or however many bytes you need) ), and write the new data there, then save it. Just so long as the data always uses the same number of bytes and doesn't overrun the length of the string. Shrouding with concealment of strings would probably rule out that method. I think you also might be able to just append a few bytes to the end of the EXE and use them without disrupting it's operation.