home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- Path: sparky!uunet!mcsun!sunic!kth.se!dront.nada.kth.se!d88-jwa
- From: d88-jwa@dront.nada.kth.se (Jon W{tte)
- Subject: Re: how to put indelible serial# in resource fork of app?
- In-Reply-To: peter@cujo.curtin.edu.au's message of Thu, 23 Jul 1992 02:51:21 GMT
- Message-ID: <D88-JWA.92Jul23100813@dront.nada.kth.se>
- Followup-To: comp.sys.mac.programmer
- Originator: d88-jwa@dront.nada.kth.se
- Sender: usenet@kth.se (Usenet)
- Nntp-Posting-Host: dront.nada.kth.se
- Organization: Royal Institute of Technology, Stockholm, Sweden
- References: <Jul.20.17.18.21.1992.16265@gandalf.rutgers.edu>
- <1992Jul20.232738.21376@hobbes.kzoo.edu>
- <peter-230792103333@134.7.50.3>
- Date: Thu, 23 Jul 1992 09:08:13 GMT
- Lines: 41
-
- .50.3> peter@cujo.curtin.edu.au (Peter N Lewis) writes:
-
- ObProgramming: One way to make life difficult for crackers is to use the
- serial number to encryp a code resource - store the user's name, and the
- users serial number in the data fork, display it in the startup dialog, and
- use it to decrypt vital code resources. Then, checksum the code and if its
- not right, put up an alert - that way, even if the branch is removed the
- program will just crash (serves those nasty crackers right :-). Of course,
-
- Yes. However, BE SURE TO FLUSH THE CACHE after you've decrypted
- the CODE resource. something like
- if ( TrapAvailable ( _HwPriv ) ) {
-
- FlushDataCache ( ) ;
- FlushInstructionCache ( ) ;
- }
-
- the virus detectors will probably blow their tops if you go around hacking
- with Code Resources. Aside from which people will quite probably want to
- run a single copy of the app off a locked file server... And for heavens
-
- No ! the cool thing is, you do this as a patch to GetResource and
- LoadResource, so it's only changed when loaded into memory, not
- on disk. Or you could load, move high, and lock the CODE resource
- and never let go of it; still only affects memory, not disk.
-
- sake turn macsbug name generation off before you compile it! I have seen
- several commercial apps with names turned on in their code checking code,
- pretty impressive guys :-)
-
- I see MacsBug symbols as a user service ! More than once have I had
- spontaneous crashes, and only the debugger names helped me figure
- out what was going on. Not to mention a dedicated user can provide
- excellent feedback for Tech Support if the names still are in there,
- like, fixing their bugs :-)
-
- --
- Jon W{tte, Svartmangatan 18, S-111 29 Stockholm, Sweden
-
- ### You have the Easy Access virus. This virus may cause strange sounds.
- ### You have the 24-bit virus. This virus eats system memory like CRAZY.
-