Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!bionet!ames!ncar!boulder!pikes!udenva!isis!nbires!maa From: maa@nbires.nbi.com (Mark Armbrust) Newsgroups: comp.sys.ibm.pc Subject: Re: Unprotecting BASIC programs Summary: via a bug in GWBASIC Message-ID: <365@nbires.nbi.com> Date: 17 Mar 89 04:48:12 GMT References: <3251@ihuxv.ATT.COM> Reply-To: maa@nbires.UUCP (Mark Armbrust) Organization: NBI Inc, Boulder CO Lines: 46 In article <3251@ihuxv.ATT.COM> riley@ihuxv.ATT.COM (d. riley) writes: >Could the person (or anyone who may have such information) who sent Matt >Pressly (mattp@oakhill) the unprotect for GWBASIC programs using degug either >post that procedure here or at least email it to me (att!ihuxv!riley) also? > > Thanks in advance. Think that was me, so... There is a feature (bug) of the GWBASIC interpreter that causes it to work a bit strangely when it reads a null program (as opposed to an empty file). This null program is the two-byte sequence FF, 1A. Create this file with the debugger and call it U.BAS: >debug -e 100 ff 1a -n u.bas -r cx CX 0000 :2 -w -q > Now start basic and load the protected program and then load U.BAS. The protected program should now be unprotected: LOAD "prot-prg LIST Illegal function call LOAD "u LIST 10 rem I used to be protected 20 rem but now I am not (As a side note, it you make a file containing FE 1A, it will act as a protector!) There is an algorithmic way to do this, and I have source to a .ASM program to do it. If there is enough interest, I'll post it. Enjoy, Mark maa@nbires.nbi.com maa@nbires.UUCP