From: James MacDonald Newsgroups: comp.os.msdos.djgpp Subject: Copy protection and self-modifying EXE's in DJGPP? Date: Sat, 14 Jun 1997 20:59:06 +0100 Organization: Trills and Technologies Distribution: world Message-ID: NNTP-Posting-Host: netbook.demon.co.uk MIME-Version: 1.0 Lines: 40 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Copy protection (key-disk) -------------------------- I have a disk formatter that can format lots of weird formats (like 1.72Mb, 984Kb on a 720Kb diskette, and any number between). I can create my own as well, so if I wanted key disks I'd use floppies formatted to 1500Kb for them. I would then place a file, KEYID.DSK, on the key disk, containing registration information etc., and then save it. In the C program, I would load KEYID.DSK and read it into memory. Then (here's the magic part) measure the size of the key disk - it should equal 1500Kb less the KEYID.DSK file. If so, the key disk is valid, if not, the key disk is faulty. Is this possible, and how easy/difficult is this to get around? Any other methods of copy protection? The reason for a 1500Kb format is to defeat disk-image copiers - if you get a 1.68Mb or 1.5Mb image and write it to 1.44Mb floppies, it fails (try this with your MS DMF format disks). If the tracks and sectors are kept secret, this would make quite a good protection method. Obviously some would be able to get around this protection, BUT the normal end user wouldn't by simply copying the disk. TRUE or !TRUE? Self-modifying EXE ------------------ Is this possible? Some programs can do it. I'd like to be able to patch a registration name and serial number into a program. How can this be done with DJGPP? -- Revised anti-spam in use : remove X to reply - 'Xnetbook' becomes 'netbook' Anti-spam thermonuclear warheads cheap at only $300!