Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.pascal.borland    |    Borland Pascal was actually pretty neat    |    2,978 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 1,842 of 2,978    |
|    Dr Engelbert Buxbaum to Raymond Holtzfingeru    |
|    Re: Writing a value to a executable file    |
|    20 Jul 05 18:38:01    |
      From: engelbert_buxbaum@hotmail.com              Raymond Holtzfingeru wrote:              > Hello,       > I am trying to write a program that will open an executable file and       > write a value to it to act as a counter to see how many times the       > file has been run. After the file has run a set amount of times, I       > want to make the file inoperable. What would be the safest way to       > determine where to write that value? Maybe seek to the end of the       > file and then step back a few bytes, something like seek(filename,       > filesize(filename) -4)? Is there a better/safer way to do that?              Hm, usually such schemes are a waste of time. But technically it is       certainly feasible for a program to write a value into its own exe-file.       This has been used by the zerberus-unit to write a check-sum of the       program into its code on first run. On all following runs, that check       sum would be compared with the current value, any change indicating a       virus-infection. Probably no longer as important since classical viruses       are no longer as rife as they were 10 years ago (macro-viruses and worms       are now more significant). See A. Schäpers, c't 7/92, page 146-152 for       the code.              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca