BASICA | GWBASIC protected files 
Author Message
 BASICA | GWBASIC protected files

Help -

I have inherited a legacy application written years ago in BASICA.
Unfortunately the sleezebag consultant who wrote it protected the files
and deleted the source (contrary to his contract) and dissappeared with
the money before anybody noticed.

So I need to know if any-one remembers how to (or better still has the
algorithm coded up) to convert a BASICA &| GWBASIC basic file that has
been saved in protected mode back into a useable & listable source file.


Thanks in advance.

cheers

Gary Stanny



Fri, 28 Feb 1997 21:26:47 GMT  
 BASICA | GWBASIC protected files

Quote:


>Subject: BASICA | GWBASIC protected files
>Date: 12 Sep 1994 13:26:47 GMT

[Del]

This question comes up every now and then, so please respond in this newsgroup
(also).

Greetings,

 ----------------------------------------
| I don't believe in a no-win scenario.  |
|               - Admiral James T. Kirk  |
 ----------------------------------------



Wed, 05 Mar 1997 19:32:46 GMT  
 BASICA | GWBASIC protected files
Here are three ways to unprotect such files, gleaned from a couple of years
of net postings.

Unprotecting "protected" BASIC and GWBASIC files:

1.   Conversion utility:

Available by anonymous ftp from oak.oakland.edu (and other SimTel repository
mirror sites):

SimTel/msdos/basic/unprba11.zip

==============================================================================

2.  The "Special Unprotect File" approach:

Article 56445 of comp.sys.ibm.pc:

Newsgroups: comp.sys.ibm.pc
Subject: Need help with encrypted GW-BASIC files...
Date: 30 May 90 17:55:04 GMT

Quote:
>Is there a utility which will unprotect the ",p" saved code?

Easy!  Use DEBUG to make a two-byte file:

1.  Cut out the lines below, save them to a file named MAGIC.RAW
2.  Use these lines as input to DEBUG, thus:

C:> DEBUG < magic.raw

(This procedure automatically creates MAGIC.BAS).

------------------------- CUT HERE --------------------------------------
e 0100
ff 1a
r cx
2
n magic.bas
w
q
------------------------- END --------------------------------------------

This will create a file with a length of 2, the contents 0FFH 01AH.  The
file can be created from GWBASIC also, but some versions don't handle the
length properly.  It MUST be two bytes.

Now load the program in question.  Then load MAGIC right on top of it.

     LOAD"PROGRAM"
     ok
     LOAD"MAGIC"
     ok

The program should now be unprotected.

-What's happening-
BASIC stores a byte in the first position of its program files to identify
the file type.  For normal programs this byte is 0FFH.  For BSAVEd files I
think it's 0FDH.  For protected files the byte is 0FEH.  Protected files are
also stored in a different format, so just changing the byte with a file
editor doesn't work.

When you load the file, BASIC translates it into a meaningful format, but
retains that 0FEH byte as a flag to prevent you from listing it.  When you
load MAGIC, you change that first byte, but nothing else.  Now when you
LIST, BASIC checks the type byte and sees that it's OK to list the program.

As always, keep a copy of the original in a safe place until you _know_ the
new stuff works right.


DISCLAIMER: He's lying.

(MAGIC.RAW by Al Stangenberger, Forestry, U.C. Berkeley Sept. 1994)
=============================================================================

3.  Modify the GWBASIC interpreter (careful!)

Article 1341 of comp.lang.basic.misc:
Newsgroups: comp.lang.basic.misc

Subject: Re: GW Basic format, Please Help!!!

Organization: The National Capital FreeNet
Date: Mon, 1 Aug 1994 02:30:37 GMT


Quote:

>>      I have an old Basic file (probably GW Basic), which is not
>>in its Text file source code, it in some kind of binary format.
>>      Does anyone know how to convert this file into a EXE format?
>>or a Text file format?  What Compiler is needed or what do I have to do?

>Simply read it into GWBASIC using the LOAD command, then
>SAVE "filename",A
>               ^^
>Note the ,A there.  This saves the program in text format which can be
>read by other programs, editors etc.

>On the other hand, the program may originally have been saved in "protected"
>mode (i.e. ,P was used as the option rather than ,A) in which case things
>are more difficult to undo, but programs are available which do the job
>for those legally entitled to do so.  (Protected programs are usually
>saved that way to preserve somebody's copyright interest, as you no doubt
>realise :)

>Cheers,  Ian S.

The following was posted on another bbs quite some time ago but sill might
be useful for unlocking a GW-BASIC program which has been saved in
protected mode.  I have not tested this so I would suggest making copies
of anything you are working on before attemting this fix.

Packet: BITMAIL
Date: 20-12-93 (01:40)             Number: 121
From: Mark Butler                  Refer#: 72
  To: John Carriere                 Recvd: NO
Subj: Unprotect Basica? Help         Conf: (1) Quik_Bas
---------------------------------------------------------------------------
Once upon a time John Carriere uttered this querie to All:

 JC> How the Heck do I unprotect a BASICA File???? HELP!!!!!

 I just patched my copy of GWBASIC.EXE v3.23 (the one that came with DOS
 v4.01) so that it would always list "protected" files. You can patch it
 like this...

        Using a hex-editor such as Norton's 'DiskEdit' find
        this string ---------->  C3 9C A0 AA 05 0A C0 75 02
        And change it to------>  C3 9C B0 00 90 0A C0 75 02
                                       ^^ ^^ ^^
                                         \|/
        These three are the changes-------'

 Now your copy of GWBASIC.EXE will list so-called "protected" basfiles.
 Once it will list them you just need to save the file in ascii like so..

        SAVE "MYFILE",A

--

Ottawa, Ontario, CANADA      FidoNet:  1:163/215
Voice: (613)731-2120

--
Al Stangenberger                      Univ. of California at Berkeley

BITNET: FORAGS AT UCBNATUR            145 Mulford Hall # 3114
(510) 642-4424  FAX: (510) 643-5438   Berkeley, CA  94720-3114                  



Thu, 06 Mar 1997 01:29:01 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. gwbasic, basica - copyright question

2. Basica/Gwbasic to QB4.5

3. Problem converting from basica to gwbasic

4. Volunteer to convert my BASICA/GWBASIC into ascii

5. BASICA/GWBASIC

6. I WILL MAKE YOU BASICA(GWBASIC)/QBASIC a EXE

7. I WILL MAKE YOUR BASICA(GWBASIC)/QBASIC a EXE

8. GWBASIC (1/1) - gwbasic.zip [2/2]

9. GWBASIC (1/1) - gwbasic.zip [1/2]

10. Binary Files in BASICA - Can It be done?

11. Binary Files in BASICA - Thanks!!!

12. Realizer refused to load my BASICA file

 

 
Powered by phpBB® Forum Software