home *** CD-ROM | disk | FTP | other *** search
/ Various Unprotection Examples / unprotect.zip / unprotect / UNBASIC / BASIC.NTE next >
Text File  |  1988-10-20  |  4KB  |  106 lines

  1. How to use pepores to unprotect basic files:
  2.  
  3. You have to realize that how basic protects programs is
  4. by marking them with a byte that has hex value FE, as
  5. opposed to value FF for regular files (and FD hex for 
  6. bload files).  For files marked with the FE byte, basica
  7. (or GW-basic) then scrambles the file.
  8.  
  9. All of the "unprotect" programs work by first loading 
  10. the basic file into basica/GW-basic.  Once the file
  11. is loaded, it is unscrambled.  They then change the
  12. special byte from FE to FF, so that basica sees the
  13. program as a regular program.  Then the the basica 
  14. file is saved to disk in its unscrambled form.
  15.  
  16. There are two reasons why this unprotect scheme can
  17. fail:  First, in successive versions of basica/GW-basic
  18. precautions were added to keep the user (i.e., you) 
  19. from changing that "protection byte" from within 
  20. basica.  Second, the location of the "protection
  21. byte" is changed in some versions of basica.  This
  22. last may be a feature unique to AT&T computers, 
  23. because that's all I've tested.  At any rate, I
  24. found out some time ago that the old methods of
  25. unprotecting basica files won't work with the
  26. PC6300 & it's GW-basic.
  27.  
  28. So now I'm going to tell you how to use the enclosed
  29. program, pepores.com to unprotect your GW-basic files.
  30. I've used this method with 100% success on the AT&T
  31. 6300 with DOS 3.1, and believe it will work on any
  32. other IBM compatible.
  33.  
  34. 1) First run the program pepores by type "pepores" at
  35. DOS command line (note that this is not a basic 
  36. program).  "pepores" is now memory resident until
  37. you reboot your machine.  This is the program we
  38. will use to by-pass all of GW-basic's protection
  39. schemes.
  40.  
  41. 2) Second, make a simple basic file (say, "10 print 
  42. "x" and 20 end"), and save it in two versions: 
  43. protected and unprotected.  We are going to compare
  44. these files using prepores to find the "protect byte".
  45.  
  46. 3) Take the protected file you just made and load it 
  47. into basic.  Now tap the alt key three times quickly;
  48. prepores should pop up on your screen.  Press the F5
  49. function key (sets the segment viewed to DS).
  50.  
  51. 4) Press the F1 function key and enter FE <return>.
  52. The program will search for FE in memory.  Write
  53. the location down (this is the pair of numbers in
  54. the top left corner of the screen: 6f5d:0599, for
  55. example).
  56.  
  57. 5) Continue pressing F1 and then <return> to repeat
  58. searching for FE, and writing down the addresses.
  59. Do this until the second number of the address (the
  60. 0599 in the example above) is greater than 1000.  
  61.  
  62. 6) At this point, press escape to leave pepores,
  63. then type "new" to empty out basic, and finally
  64. load in the unprotected test program.
  65.  
  66. 7) Hit alt three times to bring back pepores.  Then
  67. repeat step 4) and 5) above, only now searching for
  68. FF instead of FE.  What you are now looking for
  69. is a location where this time (the unprotected
  70. case) you have the value FF, but the same location
  71. (the addresses you wrote down) in the protected case 
  72. was value FE.  This address should be in the 0400 to
  73. 0700 range.  Write it down and circle it.
  74.  
  75. 8) O.k., one last time....  Press escape to get out
  76. of pepores, then type "new" to clear basic.  Now load
  77. any protected program that you want to unprotect.  
  78.  
  79. 9) Again hit alt three times to bring up pepores, then
  80. hit F5.  Now you must use the left/right cursor keys 
  81. to move the little arrow in the top left corner of
  82. the screen.  You must type in the hex address that
  83. you previously circled.
  84.  
  85. 10) You should now be at the location of the "protect
  86. byte", which should be value FE (if all was done 
  87. correctly).  Now press the function key F9 (insert hex)
  88. and type FF <return>.  The protection byte is changed
  89. from FE to FF.
  90.  
  91. 11) Finally, you can use escape to return to basic, then
  92. save the file (unprotected).  And that's it.
  93.  
  94. Let me now apologize for the complexity of this solution.
  95. I have you do it this way because this method is 
  96. completely flexible; I don't have to worry about any
  97. peculiarities with your system.  For example, the 
  98. location of the "protection byte" on my 6300 was 0599, but
  99. in other places I have seen people talk about 0464 and 
  100. several othe addresses.  Using my approach, you will learn
  101. the correct address for *you*.  Think of it this way:
  102. you're doing some real hacking! (On a very small scale.)
  103.  
  104. Good luck!
  105. Ben Bednarz, 1988
  106.