*************WARNING*************** THIS IS JUST THE SOURCE CODE. IN ORDER TO WORK THE PROGRAM, YOU MUST DOWNLOAD MSE.ZIP FOR THE ENTIRE PROGRAM AND EXTRA FILES. *************WARNING*************** DECLARE SUB FileNames (Rfk$, Snd$, Rcd$) DECLARE SUB Tips (Rcd$) DECLARE SUB ResetH (File!, Rfk$, Snd$, Rcd$) DECLARE SUB SendDel (Rfk$, Snd$) DECLARE SUB InputC (x!, Pr$, q$, Pi$) DECLARE SUB SetPal (Col%, r%, G%, b%) DECLARE SUB Inst5 () DECLARE SUB SendEnc (Snd$) DECLARE SUB SendDec (Snd$) DECLARE SUB Inst4 () DECLARE SUB TgtStr (aR!, bR!, cR!, tY$) DECLARE SUB NoBreak () DECLARE SUB Check (RetVal, Rfk$) DECLARE SUB InputB (Pr$, Pw$, j$, Pswitch!, x!, Whc, Esc) DECLARE SUB Inst3 () DECLARE SUB inst2 () DECLARE SUB GetFile (Fil$) DECLARE SUB SelectKey (Cod$, Correct, Whc, Nok, Rfk$) DECLARE SUB Inst1 () DECLARE SUB RfkDec (Rfk$) DECLARE SUB RfkEnc (Rfk$) DECLARE SUB randsee1 (u1$, u2$, u3$, u4$) DECLARE SUB Create (Rfk$) DECLARE SUB Delete (Rfk$) DECLARE SUB inst () DECLARE SUB Import (Rfk$, Snd$) DECLARE SUB Export (Rfk$, Snd$) 'If your files arent in the directory of this file 'please add the directory below: ' The actuall locations are in the sub program FileNames FileNames Rfk$, Snd$, Rcd$ 'The program may malfunction if these variables are 'incorrect! NoBreak ' The source code wasn't origionally intended to be presented. ' It would just be an executable, but when I tried to make v1.1 ' an EXE file, it didn't work! Oh well, now you get a great program ' plus source code. write to: max@edmiston.org ' ' ' Space for brand new features ' ---------------------------------------------------------- ' Scroll bar for accuracy to where you are in lists ' Scroll bar added in Delete SUB ' Cut down on rfkenc/dec waste ' Added new EstimatedTime feature ' Added new RfkEnc/Dec feature and speed ' Added Multi-Functioning Password Prompt ' Added No Keys error handler ' Added LOF(1) Protection ' Colors Edited ' Added SendEnc, SendDec, SendErr, Inst4 ' Added ImportKeys ' Added ExportKeys ' Added SetPal SUB by ShellReef ' ReDone Create SUB ' Deleting Keys SendDel SUB ' Fixed SameKeys Problem ' Importing keys more than once problem fixed ' Exporting keys more than once problem fixed ' Change some encryption features between rfk and send ' Added ResetH SUB, resets corrupt data files ' Added Tips SUB aimed at giving small advice and guideance ' Problem with corrupt key files fixed ' Added solution to first rfkmse exploit: Time attack [rfk enc/dec] ' Added solution to second rfkmse exploit: Time attack [imp/exp] ' System Check: ' Select Key [ok] ' Delete [ok] ' Import [ok] ' Export [ok] ' More Error [File not found] routines formatted ' Fixed further extended local file nonneeded re-encryption ' ' ' ' Working on adding : ' ./Delete send.rfk keys ' Importing same keys problem ' ./Creating same keys problem ' ./Colors ' ./Reformatt Create SUB ' ' Added documentation ' ----------------------------------------------------------- '+ Starting to add sub procedures ' - Create ' - Delete ' - Now adding in the SelectKey and GetFile subs. ' - Adding Encryption sub routine ' - Adding Decryption sub routine ' - Added GetFile ' - Added SelectKey ' - Added more instructions ' - Adding a new Input system called InputB ' - Added Bps/ Estimated time ' - Putting SUB programs Encrypt and Decrypt into main ' program for error handling routines ' - Decrypt with secondary key added ' ' The problem right now is that adding keys to the encrypt/decrypt factor 'sometimes produces undesired effects. ' Problem is that it encrypts and decrypts fine with EITHER code or ' RndSt, but NOT BOTH! asc ' HAVE MAIN PROBLEM CLEARED UPŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽ¨ ' Randomize Section Randsee1 added back 3 ' Added graphical aid for file encryption/decryption 3 ' 3 ' ŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽŽ3 ' NOT FIXED!!!!!!!!!!!! ' ' Think the problem fixed, not sure, will work on it this afternoon. ' Have to go to school. ' Fixed ' Added more information on file encryption/ decryption ' ' ' ' 9978 TYPE Byte value AS STRING * 1 END TYPE CLS SCREEN 12 Tips Rcd$ COLOR 7 LOCATE 1 PRINT "RFK MSE - Maximum Security Encryption" FOR i = 20 TO 277 PSET (i, 25), 15 PSET (i, 163), 8 NEXT i FOR i = 25 TO 163 PSET (20, i), 15 PSET (277, i), 8 NEXT i inst COLOR 15 LOCATE 3, 5: PRINT "Create Key(s)" COLOR 8 LOCATE 4, 5: PRINT "Delete Key(s)" LOCATE 5, 5: PRINT "Encrypt File" LOCATE 6, 5: PRINT "Decrypt File" LOCATE 7, 5: PRINT "Import Key(s)" LOCATE 8, 5: PRINT "Export Key(s)" LOCATE , 5: PRINT "Delete send.dat key(s)" LOCATE , 5: PRINT "Exit" SetPal 1, &H46, &H6E, &H64 LOCATE 12, 5: COLOR 1 PRINT "Setup a key for file encryption/decryption." DIM Menu$(8) Menu$(1) = "Create Key(s)" Menu$(2) = "Delete Key(s)" Menu$(3) = "Encrypt File" Menu$(4) = "Decrypt File" Menu$(5) = "Import Key(s)" Menu$(6) = "Export Key(s)" Menu$(7) = "Delete send.dat key(s)" Menu$(8) = "Exit" DIM Tel$(8) Tel$(1) = "Setup a key for file encryption/decryption." Tel$(2) = "Delete an already made key." Tel$(3) = "Encrypt a file with your key's private password." Tel$(4) = "Decrypt a file with your key's public or private password." Tel$(5) = "Put selected key(s) in Send.dat so they can be given to friends." Tel$(6) = "Get key(s) from your Send.dat file and add them to your key list." Tel$(7) = "Delete key(s) from Send.dat, the key import/export file." Tel$(8) = "Leave this program." a = 1 DO i$ = INKEY$ IF i$ <> "" THEN IF i$ = CHR$(0) + "P" THEN a = a + 1 IF a > 8 THEN a = 1 END IF IF i$ = CHR$(27) THEN END IF i$ = CHR$(13) THEN IF a = 1 THEN Create (Rfk$) IF a = 2 THEN Delete (Rfk$) IF a = 3 THEN GOTO Encrypt IF a = 4 THEN GOTO Decrypt IF a = 5 THEN Import Rfk$, Snd$ IF a = 6 THEN Export Rfk$, Snd$ IF a = 7 THEN SendDel Rfk$, Snd$ IF a = 8 THEN END GOTO 9978 END IF IF i$ = CHR$(0) + "H" THEN a = a - 1 IF a < 1 THEN a = 8 END IF LOCATE 3 FOR i = 1 TO 8 IF i = a THEN COLOR 15 ELSE COLOR 8 END IF LOCATE , 5: PRINT Menu$(i) NEXT i SetPal 1, &H46, &H6E, &H64 LOCATE 12, 5: COLOR 1 LOCATE 12, 5 PRINT Tel$(a) + STRING$(65 - LEN(Tel$(a)), " ") END IF LOOP Ed: CLS IF ERR = 53 THEN COLOR 15 PRINT "File not found." COLOR 8 PRINT "If the file is in the current directory, just simply type it's name." PRINT "If it is not, however, please type the full path to the file." x = 4 Pr$ = "Enter the directory and file name:" q$ = "" InputC x, Pr$, q$, Pi$ Fil$ = q$ RESUME END IF IF ERR = 52 THEN COLOR 15 PRINT "Bad file name or number." COLOR 8 PRINT "If the file is in the current directory, just simply type it's name." PRINT "If it is not, however, please type the full path to the file." x = 4 Pr$ = "Enter the directory and file name:" q$ = "" InputC x, Pr$, q$, Pi$ Fil$ = q$ RESUME END IF IF ERR = 76 THEN COLOR 15 PRINT "Path not found." COLOR 8 PRINT "If the file is in the current directory, just simply type it's name." PRINT "If it is not, however, please type the full path to the file." x = 4 Pr$ = "Enter the directory and file name:" q$ = "" InputC x, Pr$, q$, Pi$ Fil$ = q$ RESUME END IF IF ERR = 75 THEN COLOR 15 PRINT "Path/File access error." COLOR 8 PRINT "If the file is in the current directory, just simply type it's name." PRINT "If it is not, however, please type the full path to the file." x = 4 Pr$ = "Enter the directory and file name:" q$ = "" InputC x, Pr$, q$, Pi$ Fil$ = q$ RESUME END IF IF ERR = 68 THEN COLOR 15 PRINT "Device Unavailable." COLOR 8 PRINT "If the file is in the current directory, just simply type it's name." PRINT "If it is not, however, please type the full path to the file." x = 4 Pr$ = "Enter the directory and file name:" q$ = "" InputC x, Pr$, q$, Pi$ Fil$ = q$ RESUME END IF IF ERR = 64 THEN COLOR 15 PRINT "Bad file name." COLOR 8 PRINT "If the file is in the current directory, just simply type it's name." PRINT "If it is not, however, please type the full path to the file." x = 4 Pr$ = "Enter the directory and file name:" q$ = "" InputC x, Pr$, q$, Pi$ Fil$ = q$ RESUME END IF END Encrypt: CLEAR 8923 FileNames Rfk$, Snd$, Rcd$ Whc = 1 SelectKey Cod$, Correct, Whc, Nok, Rfk$ IF Nok = 2 THEN GOTO 9978 IF Cod$ = "leave" THEN GOTO 9978 IF Correct = 0 THEN GOTO 8923 END IF IF LEN(Cod$) <> 40 THEN COLOR 15 PRINT "Your key is corrupt" COLOR 7 PRINT "Hit a key to continue.." SLEEP GOTO 8923 END IF GetFile Fil$ ' CLS SCREEN 12 COLOR 8: PRINT "Encrypting: "; COLOR 15 IF LEN(Fil$) > 35 THEN PRINT MID$(Fil$, 1, 35) + ".." ELSE PRINT Fil$ END IF '11,29 639,29 FOR i = 11 TO 639 PSET (i, 19), 7 NEXT i ' 'You have the actual file name and the code it needs to encrypt by. ' ' Code = 1 RandStandard = 0: RndSt = 0 DIM Id AS Byte TIMER ON TI = TIMER Bps = TIMER main = 1: weave = 1 OPEN Fil$ FOR BINARY AS #1 IF LOF(1) < 1 THEN COLOR 15 PRINT "Not enough data." COLOR 7 PRINT "Hit a key to continue.." DO: LOOP UNTIL INKEY$ <> "" GOTO 9978 END IF OPEN "o", #2, "temp1.na": CLOSE #2 OPEN "temp1.na" FOR BINARY AS #2 'Impliment random 4letter string called b$ and split it into u1$, u2$, u3$, and u4$ randsee1 u1$, u2$, u3$, u4$ FOR i = 1 TO 3 GET #1, i, Id.value ni$ = ni$ + Id.value NEXT i IF ni$ = "MSE" THEN CLS COLOR 15 PRINT "This file is already encrypted." COLOR 7 PRINT "Hit a key to continue.." CLOSE #1, 2 SLEEP GOTO 8923 END IF: ni$ = "" FOR i = 37 TO 42 PSET (79, i), 15 PSET (246, i), 8 NEXT i FOR i = 79 TO 246 PSET (i, 37), 15 PSET (i, 42), 8 NEXT i PSET (79, 42), 15 FOR Axs = 1 TO LOF(1) GET #1, Axs, Id.value F = ASC(Id.value) main = main + 1: IF main > 5 THEN main = 1 weave = weave + 1: IF weave > 2 THEN weave = 1 a = a + 1 b = b + 3 C = C + 6 d = d + 7 E = E + 9 RandStandard = RandStandard + 1: IF RandStandard > 3 THEN RandStandard = 0 IF RandStandard = 0 THEN RndSt = ASC(u1$) IF RandStandard = 1 THEN RndSt = ASC(u2$) IF RandStandard = 2 THEN RndSt = ASC(u3$) IF RandStandard = 3 THEN RndSt = ASC(u4$) LOCATE 3 COLOR 3 PRINT INT((Axs * 100) / LOF(1)); COLOR 7 PRINT "% " COLOR 7 PRINT "Byte on: "; COLOR 8 PRINT Axs; PRINT "of"; LOF(1); " " COLOR 7 PRINT "Seconds: "; COLOR 8 PRINT INT(TIMER - TI); " " ' COLOR 7 '''''''''''''''''''''''''''''''''''' PRINT "Bytes / second:"; COLOR 8 IF TIMER - TI <> 0 THEN Bps = Axs / (TIMER - TI) END IF Bps = INT(Bps) PRINT Bps; " " COLOR 7 PRINT "Estimated Time:"; COLOR 8 IF Bps <> 0 THEN Cxi = (LOF(1) - Axs) / Bps END IF Time = Cxi aR = INT((Time / 60) / 60) bR = INT(Time / 60) COLOR 8 Cfg = INT(100 * (Time / 60 - INT(Time / 60))) Cfg = INT((Cfg * 60) / 100) cR = Cfg TgtStr aR, bR, cR, tY$ PRINT tY$; " " ''''''''''''''''''''''''''''''''''''' N = INT((Axs / LOF(1)) * 166) FOR O = 38 TO 41 FOR i = 1 TO N PSET (i + 79, O), 3 NEXT i NEXT O '' IF a > 256 THEN a = 1 IF b > 257 THEN b = 1 IF C > 258 THEN C = 1 IF d > 259 THEN d = 1 IF E > 260 THEN E = 1 '====================================================== IF main = 1 THEN K = a IF main = 2 THEN K = b IF main = 3 THEN K = C IF main = 4 THEN K = d IF main = 5 THEN K = E '========Begginning of code============================ F = ASC(Id.value) FOR iu = 1 TO ASC(MID$(Cod$, Code, 1)) + RndSt F = F + 1 IF F > 255 THEN F = 0 NEXT iu h = (K + F) / 255 h1 = INT((K + F) / 255) IF h = h1 THEN 'number is dividend int F = 255 - h + 1 END IF IF h > h1 THEN 'this is what we need F = (K + F) - (h1 * 255) - h1 END IF IF F > 255 AND F <= 510 THEN F = ABS(F - 255) IF F > 255 AND F <= 510 THEN F = ABS(F - 255) IF F = -1 THEN F = 255 IF weave = 1 THEN F = 255 - F ELSE F = F END IF Id.value = CHR$(CINT(F)) '======== End of code ============================ '====================================================== PUT #2, Axs + 7, Id.value Code = Code + 1: IF Code > 40 THEN Code = 1 NEXT Id.value = "M" PUT #2, 1, Id.value Id.value = "S" PUT #2, 2, Id.value Id.value = "E" PUT #2, 3, Id.value Id.value = u1$ PUT #2, 4, Id.value Id.value = u2$ PUT #2, 5, Id.value Id.value = u3$ PUT #2, 6, Id.value Id.value = u4$ PUT #2, 7, Id.value CLS ntime = TIMER - TI Bps = TIMER - Bps TI = TIMER CLOSE #1, 2 KILL Fil$ NAME "temp1.na" AS Fil$ CLEAR FileNames Rfk$, Snd$, Rcd$ GOTO 9978 Decrypt: CLEAR 8924 FileNames Rfk$, Snd$, Rcd$ TI = TIMER Whc = 2 SelectKey Cod$, Correct, Whc, Nok, Rfk$ IF Nok = 2 THEN GOTO 9978 IF Cod$ = "leave" THEN GOTO 9978 IF Correct = 0 THEN GOTO 8924 END IF IF LEN(Cod$) <> 40 THEN COLOR 15 PRINT "Your key is corrupt" COLOR 7 PRINT "Hit a key to continue.." SLEEP GOTO 8924 END IF GetFile Fil$ ' CLS SCREEN 12 COLOR 8: PRINT "Decrypting: "; COLOR 15 IF LEN(Fil$) > 35 THEN PRINT MID$(Fil$, 1, 35) + ".." ELSE PRINT Fil$ END IF '11,29 639,29 FOR i = 11 TO 639 PSET (i, 19), 7 NEXT i ' 'You have the actual file name and the code it needs to encrypt by. ' ' '--------------------------------------------------------- '-------------------U iN---------------------------------- '--------------------------------------------------------- main = 1 weave = 1 a = 0 b = 0 C = 0 d = 0 E = 0 RandStandard = 0: RndSt = 0 Code = 1 OPEN Fil$ FOR BINARY AS #1 IF LOF(1) <= 7 THEN CLS COLOR 15 PRINT "Not enough data." COLOR 7 PRINT "Hit a key to continue.." DO: LOOP UNTIL INKEY$ <> "" GOTO 9978 END IF OPEN "o", #2, "temp2.na": CLOSE #2 OPEN "temp2.na" FOR BINARY AS #2 ni$ = "" FOR i = 1 TO 3 GET #1, i, Id.value ni$ = ni$ + Id.value NEXT i IF ni$ <> "MSE" THEN CLS COLOR 15 PRINT "This file is not encrypted." CLOSE #1, 2 SLEEP GOTO 8924 END IF ni$ = "" FOR i = 4 TO 7 GET #1, i, Id.value ni$ = ni$ + Id.value NEXT i u1$ = MID$(ni$, 1, 1) u2$ = MID$(ni$, 2, 1) u3$ = MID$(ni$, 3, 1) u4$ = MID$(ni$, 4, 1) ni$ = "" FOR i = 1 TO LOF(1) - 7 GET #1, i + 7, Id.value PUT #2, i, Id.value NEXT i FOR i = 37 TO 42 PSET (79, i), 15 PSET (246, i), 8 NEXT i FOR i = 79 TO 246 PSET (i, 37), 15 PSET (i, 42), 8 NEXT i PSET (79, 42), 15 FOR Axs = 1 TO LOF(2) GET #2, Axs, Id.value main = main + 1: IF main > 5 THEN main = 1 weave = weave + 1: IF weave > 2 THEN weave = 1 F = ASC(Id.value) IF weave = 1 THEN F = F + 1 ELSE F = 256 - F END IF a = a + 1 b = b + 3 C = C + 6 d = d + 7 E = E + 9 RandStandard = RandStandard + 1: IF RandStandard > 3 THEN RandStandard = 0 IF RandStandard = 0 THEN RndSt = ASC(u1$) IF RandStandard = 1 THEN RndSt = ASC(u2$) IF RandStandard = 2 THEN RndSt = ASC(u3$) IF RandStandard = 3 THEN RndSt = ASC(u4$) LOCATE 3 COLOR 3 PRINT INT((Axs * 100) / LOF(2)); COLOR 7 PRINT "% " COLOR 7 PRINT "Byte on: "; COLOR 8 PRINT Axs; PRINT "of"; LOF(2); " " COLOR 7 PRINT "Seconds: "; COLOR 8 PRINT INT(TIMER - TI); " " COLOR 7 '''''''''''''''''''''''''''''''''''' PRINT "Bytes / second:"; COLOR 8 IF TIMER - TI <> 0 THEN Bps = Axs / (TIMER - TI) END IF Bps = INT(Bps) PRINT Bps; " " COLOR 7 PRINT "Estimated Time:"; COLOR 8 IF Bps <> 0 THEN Cxi = (LOF(2) - Axs) / Bps END IF Time = Cxi aR = INT((Time / 60) / 60) bR = INT(Time / 60) Cfg = INT(100 * (Time / 60 - INT(Time / 60))) Cfg = INT((Cfg * 60) / 100) cR = Cfg TgtStr aR, bR, cR, tY$ PRINT tY$; " " ''''''''''''''''''''''''''''''''''''' N = INT((Axs / LOF(2)) * 166) FOR O = 38 TO 41 FOR i = 1 TO N PSET (i + 79, O), 3 NEXT i NEXT O IF a > 256 THEN a = 1 IF b > 257 THEN b = 1 IF C > 258 THEN C = 1 IF d > 259 THEN d = 1 IF E > 260 THEN E = 1 '====================================================== IF main = 1 THEN K = a IF main = 2 THEN K = b IF main = 3 THEN K = C IF main = 4 THEN K = d IF main = 5 THEN K = E '========Begginning of code============================ w = (K + F) / 255 w1 = INT((K + F) / 255) IF w = w1 THEN F = w END IF IF w > w1 THEN COLOR 3 F = 255 - ((F + K) - ((w1 * 255) + w1 + 1)) END IF IF F > 255 THEN F = F - 256 FOR iu = 1 TO ASC(MID$(Cod$, Code, 1)) + RndSt F = F - 1 IF F < 0 THEN F = 255 NEXT iu Id.value = CHR$(CINT(F)) PUT #2, Axs, Id.value '======== End of code ============================ '====================================================== Code = Code + 1: IF Code > 40 THEN Code = 1 NEXT CLOSE #1, 2 KILL Fil$ NAME "temp2.na" AS Fil$ CLS mtime = TIMER - TI COLOR 7 CLEAR FileNames Rfk$, Snd$, Rcd$ GOTO 9978 CheckErr: IF ERR = 62 THEN CLS COLOR 15 PRINT "rfk.dat is corrupt." COLOR 7 PRINT "Hit a key to continue.." SLEEP CLOSE #1, 2 OPEN "o", #1, Rfk$ CLOSE #1 RfkEnc (Rfk$) Create (Rfk$) GOTO 9978 END IF END RfkErr: IF ERR = 53 THEN File = 4 ResetH File, Rfk$, Snd$, Rcd$ CLS COLOR 15 PRINT "rfk.dat not found!" COLOR 8 PRINT "This error might have occurred because you are in a different" PRINT "directory than the rfk.dat file. It will be reset to defaults" PRINT "with no keys." COLOR 7 PRINT "Hit a key to end.." DO: LOOP UNTIL INKEY$ <> "" CLS END ELSE File = 2 ResetH File, Rfk$, Snd$, Rcd$ CLS COLOR 15 PRINT "Unknown error" COLOR 8 PRINT "Error code:"; ERR, ERL PRINT "Rfk.dat has reset to defaults." COLOR 7 PRINT "Hit a key to continue.." DO: LOOP UNTIL INKEY$ <> "" CLS COLOR 15 PRINT "Precautionary Measures" COLOR 8 PRINT "Because rfk.dat was corrupt, as a precaution, this program" PRINT "will end execution. The next time you run the program, every" PRINT "thing will be the same, but you will have lost any keys." COLOR 7 PRINT "Hit a key to continue.." DO: LOOP UNTIL INKEY$ <> "" END END IF END SendErr: IF ERR = 53 THEN File = 5 ResetH File, Rfk$, Snd$, Rcd$ CLS COLOR 15 PRINT "Send.dat not found!" COLOR 8 PRINT "This error might have occurred because you are in a different" PRINT "directory than the send.dat file. It will be reset to defaults" PRINT "with no keys." COLOR 7 PRINT "Hit a key to end.." DO: LOOP UNTIL INKEY$ <> "" CLS END ELSE File = 3 ResetH File, Rfk$, Snd$, Rcd$ CLS COLOR 15 PRINT "Unknown error" COLOR 8 PRINT "Error code:"; ERR, ERL PRINT "Rfk.dat has reset to defaults." COLOR 7 PRINT "Hit a key to continue.." DO: LOOP UNTIL INKEY$ <> "" CLS COLOR 15 PRINT "Precautionary Measures" COLOR 8 PRINT "Because rfk.dat was corrupt, as a precaution, this program" PRINT "will end execution. The next time you run the program, every" PRINT "thing will be the same, but you will have lost any keys." COLOR 7 PRINT "Hit a key to continue.." DO: LOOP UNTIL INKEY$ <> "" END END IF END RecErr: IF ERR = 53 THEN CLS COLOR 15 PRINT "record.dat not found!" COLOR 8 PRINT "This error might have occurred because you are in a different" PRINT "directory than the record.dat file. It will be reset to defaults." PRINT "" COLOR 7 OPEN "o", #1, Rcd$: XcId = 0: WRITE #1, XcId: CLOSE #1 PRINT "Hit a key to end.." DO: LOOP UNTIL INKEY$ <> "" CLS END ELSE CLS COLOR 15 PRINT "Unknown error" COLOR 8 PRINT "Error code:"; ERR, ERL PRINT "Record.dat has reset to defaults." CLOSE #1, 2 OPEN "o", #1, Rcd$: XcId = 0: WRITE #1, XcId: CLOSE #1 COLOR 7 PRINT "Hit a key to continue.." DO: LOOP UNTIL INKEY$ <> "" CLS COLOR 15 PRINT "Precautionary Measures" COLOR 8 PRINT "Because record.dat was corrupt, as a precaution, this program" PRINT "will end execution. The next time you run the program, every" PRINT "thing will be the same, but the file will have been reset." COLOR 7 PRINT "Hit a key to continue.." DO: LOOP UNTIL INKEY$ <> "" END END IF END NoBreak: RETURN SUB Check (RetVal, Rfk$) RfkDec Rfk$ ON ERROR GOTO CheckErr SCREEN 12 OPEN "i", #1, Rfk$ WHILE NOT EOF(1) INPUT #1, a$, b$, C$, d$ How = How + 1 WEND CLOSE #1 RfkEnc Rfk$ IF How = 0 THEN CLS COLOR 15 PRINT "You do not have any keys in your keyfile rfk.dat" COLOR 7 PRINT "You need keys to encrypt and decrypt files." PRINT "Hit a key to continue.." DO i$ = INKEY$ LOOP UNTIL i$ <> "" RetVal = 1 EXIT SUB END IF END SUB SUB Create (Rfk$) 7819 ON ERROR GOTO RfkErr NoBreak SCREEN 12 COLOR 3 LOCATE 1: PRINT "RFK MSE "; COLOR 7 PRINT "- Creating key pairs now.." RANDOMIZE TIMER FOR i = 1 TO 40 597 ch = INT(RND * 255) + 1 IF ch = 34 THEN GOTO 597 IF ch = 44 THEN GOTO 597 b$ = b$ + CHR$(ch) NEXT i CLS COLOR 3 LOCATE 1: PRINT "RFK MSE "; COLOR 7 PRINT "- Making keys" COLOR 8 PRINT "This information is very important for access to your new key." PRINT "Please fill it out correctly." x = 4 Pr$ = "Enter your first and last name:" Pi$ = "" InputC x, Pr$, q$, Pi$ IF Pi$ = "max" THEN EXIT SUB iO1$ = q$ x = 5 Pr$ = "Enter a private password:" Pi$ = "" InputC x, Pr$, q$, Pi$ IF Pi$ = "max" THEN EXIT SUB iO2$ = q$ x = 6 Pr$ = "Enter a public password:" Pi$ = "" InputC x, Pr$, q$, Pi$ IF Pi$ = "max" THEN EXIT SUB iO3$ = q$ Flag = 0 RfkDec Rfk$ OPEN "i", #1, Rfk$ WHILE NOT EOF(1) INPUT #1, r$, t$, y$, u$ IF LCASE$(t$) = LCASE$(iO1$) THEN Flag = Flag + 1 END IF WEND CLOSE #1 IF Flag <> 0 THEN CLS COLOR 15 PRINT "Key name already exists!" COLOR 7 PRINT "Hit a key to continue.." DO: LOOP UNTIL INKEY$ <> "" RfkEnc Rfk$ GOTO 7819 END IF OPEN "a", #1, Rfk$ WRITE #1, b$, iO1$, iO2$, iO3$ CLOSE #1 RfkEnc Rfk$ END SUB SUB Delete (Rfk$) RfkDec Rfk$ NoBreak 'This is the data manipulation CLS How = 0 OPEN "i", #1, Rfk$ WHILE NOT EOF(1) INPUT #1, a$, b$, C$, d$ How = How + 1 WEND CLOSE #1 IF How = 0 THEN CLS COLOR 15 PRINT "You have no keys!" COLOR 8 PRINT "To make a key, goto Create and hit , then fill out the " PRINT "appropriate information." COLOR 7 PRINT "Hit a key to continue.." DO: LOOP UNTIL INKEY$ <> "" RfkEnc Rfk$ EXIT SUB END IF DIM Names$(How + 1) DIM Code$(How) DIM Pwd$(How) DIM Pub$(How) DIM sel(How + 1) How = 0 OPEN "i", #1, Rfk$ WHILE NOT EOF(1) INPUT #1, a$, b$, C$, d$ How = How + 1 Code$(How) = a$ Names$(How) = b$ Pwd$(How) = C$ Pub$(How) = d$ sel(How) = 0 WEND Names$(How + 1) = "Done." sel(How + 1) = 2 How = How + 1 CLOSE #1 RfkEnc Rfk$ 'EODM ' '''''''''''''''''''''''''''''''''''''''''''''''''' ' CLS SCREEN 12 inst2 FOR iV = 5 TO 280 PSET (iV, 30), 7 PSET (iV, 160), 7 NEXT iV FOR iV = 30 TO 160 PSET (5, iV), 7 PSET (280, iV), 7 NEXT iV LOCATE 1: COLOR 7: PRINT "MSE - Maximum Security Encrypiton" LOCATE , 2 'PSET (5, 30), 11 'PSET (280, 30), 11 'PSET (5, 160), 11 'PSET (280, 160), 11 SetPal 1, &H46, &H6E, &H64 COLOR 1 LOCATE 12, 2 msg$ = "Hit the button to select this key." PRINT msg$ 'H /\ 'P \/ a = 1 baser = 1 ba = baser + 7 up = 1 cnt = 1 FOR i = 1 TO How LOCATE up + 2, 2 '-------------------------------- ' IF How <> 0 THEN of5 = INT((a * 5) / How) END IF of5 = of5 + 1 '*** This is the up arrow PSET (285, 35), 7 PSET (286, 35), 7 PSET (284, 36), 7 PSET (285, 36), 7 PSET (286, 36), 7 PSET (287, 36), 7 PSET (283, 37), 7 PSET (284, 37), 7 PSET (285, 37), 7 PSET (286, 37), 7 PSET (287, 37), 7 PSET (288, 37), 7 PSET (283, 38), 7 PSET (284, 38), 7 PSET (285, 38), 7 PSET (286, 38), 7 PSET (287, 38), 7 PSET (288, 38), 7 '*** This is the down arrow PSET (283, 140), 7 PSET (284, 140), 7 PSET (285, 140), 7 PSET (286, 140), 7 PSET (287, 140), 7 PSET (288, 140), 7 PSET (283, 141), 7 PSET (284, 141), 7 PSET (285, 141), 7 PSET (286, 141), 7 PSET (287, 141), 7 PSET (288, 141), 7 PSET (284, 142), 7 PSET (285, 142), 7 PSET (286, 142), 7 PSET (287, 142), 7 PSET (285, 143), 7 PSET (286, 143), 7 '***This is the graphic to show where in the list you are IF How >= 6 THEN FOR iV = 42 TO 56 PSET (284, iV), 11 PSET (285, iV), 11 PSET (286, iV), 11 PSET (287, iV), 11 NEXT FOR iV = 43 TO 56 PSET (285, iV), 3 PSET (286, iV), 3 PSET (287, iV), 3 NEXT END IF FOR iV = 283 TO 288 PSET (iV, 40), 7 PSET (iV, 138), 7 NEXT FOR iV = 40 TO 138 PSET (283, iV), 7 PSET (288, iV), 7 NEXT REDIM sBar(1000) GET (284, 42)-(287, 56), sBar ' '-------------------------------- IF i = a THEN COLOR 15 ELSE COLOR 8 END IF IF cnt >= baser AND cnt <= ba THEN IF LEN(Names$(i)) > 34 THEN Names$(i) = MID$(Names$(i), 1, 32) + ".." END IF PRINT Names$(i) up = up + 1 END IF cnt = cnt + 1 NEXT i COLOR 7 LOCATE 13, 1: PRINT a; "of"; How DO i$ = INKEY$ IF i$ <> "" THEN IF i$ = CHR$(13) THEN IF sel(a) = 0 THEN tme = 1 END IF IF sel(a) = 1 THEN tme = 0 END IF IF sel(a) = 2 THEN tme = 2 'SEND CONTROL TO NEXT LEVEL GOTO 6 CLS END IF sel(a) = tme END IF IF i$ = CHR$(27) THEN EXIT SUB IF i$ = CHR$(0) + "H" THEN a = a - 1 IF a < 1 THEN a = 1 IF a < baser THEN baser = baser - 1 ba = baser + 7 COLOR 7 LOCATE 13, 1: PRINT a; "of"; How END IF IF i$ = CHR$(0) + "P" THEN a = a + 1 IF a > How THEN a = How IF a > ba THEN baser = baser + 1 ba = baser + 7 COLOR 7 LOCATE 13, 1: PRINT a; "of"; How END IF IF How <> 0 THEN of5 = INT((a * 5) / How) END IF of5 = of5 + 1 'HP '42 '58 '74 '90 IF of5 = 1 THEN Plc = 42 IF of5 = 2 THEN Plc = 58 IF of5 = 3 THEN Plc = 74 IF of5 = 4 THEN Plc = 90 IF of5 = 5 THEN Plc = 106 IF of5 = 6 THEN Plc = 122 IF How >= 6 THEN IF (Xplc <> Plc) AND (Lx <> of5) THEN LINE (284, 42)-(287, 136), 0, BF PUT (284, Plc), sBar, PSET END IF END IF Lx = of5 Xplc = Plc up = 1 cnt = 1 FOR i = 1 TO How LOCATE up + 2, 2 IF cnt >= baser AND cnt <= ba THEN IF i = a THEN IF sel(i) = 0 THEN msg$ = "Hit the button to select this key. " END IF IF sel(i) = 1 THEN msg$ = "Hit the button to deselect this key. " END IF IF sel(i) = 2 THEN msg$ = "Hit the button to continue.. " END IF SetPal 1, &H46, &H6E, &H64 COLOR 1 LOCATE 12, 2: PRINT msg$ COLOR 15 END IF IF i <> a THEN IF sel(i) = 0 THEN COLOR 8 IF sel(i) = 1 THEN COLOR 7 IF sel(i) = 2 THEN COLOR 8 END IF LOCATE up + 2, 2 PRINT Names$(i) + STRING$(34 - LEN(Names$(i)), " ") up = up + 1 END IF cnt = cnt + 1 tot = tot + 1 NEXT i END IF LOOP 6 ' '''''''''''''''''''''''''''''''''''''''''''''''''' ' How = How - 1 Gan = 0 FOR ix = 1 TO How Gan = Gan + sel(ix) NEXT IF Gan = 0 THEN EXIT SUB RfkDec Rfk$ '''' '''' FIX NEW DAT BEFORE REENCRYPTION '''' OPEN "o", #1, Rfk$ FOR i = 1 TO How IF sel(i) <> 1 THEN WRITE #1, Code$(i), Names$(i), Pwd$(i), Pub$(i) END IF NEXT i CLOSE #1 '''' '''' RfkEnc Rfk$ END SUB SUB Export (Rfk$, Snd$) RfkDec Rfk$ NoBreak 'This is the data manipulation CLS How = 0 OPEN "i", #1, Rfk$ WHILE NOT EOF(1) INPUT #1, a$, b$, C$, d$ How = How + 1 WEND CLOSE #1 IF How = 0 THEN CLS COLOR 15 PRINT "You have no keys!" COLOR 8 PRINT "To Export a key, goto Export and hit , then select" PRINT "the keys you want to add, then hit 'Done.' to continue." COLOR 7 PRINT "Hit a key to continue.." DO: LOOP UNTIL INKEY$ <> "" RfkEnc Rfk$ EXIT SUB END IF DIM Names$(How + 1) DIM Code$(How) DIM Pwd$(How) DIM Pub$(How) DIM sel(How + 1) How = 0 OPEN "i", #1, Rfk$ WHILE NOT EOF(1) INPUT #1, a$, b$, C$, d$ How = How + 1 Code$(How) = a$ Names$(How) = b$ Pwd$(How) = C$ Pub$(How) = d$ sel(How) = 0 WEND Names$(How + 1) = "Done." sel(How + 1) = 2 How = How + 1 CLOSE #1 RfkEnc Rfk$ 'EODM ' '''''''''''''''''''''''''''''''''''''''''''''''''' ' CLS SCREEN 12 Inst5 FOR iV = 5 TO 280 PSET (iV, 30), 7 PSET (iV, 160), 7 NEXT iV FOR iV = 30 TO 160 PSET (5, iV), 7 PSET (280, iV), 7 NEXT iV LOCATE 1: COLOR 7: PRINT "MSE - Maximum Security Encrypiton" LOCATE , 2 'PSET (5, 30), 11 'PSET (280, 30), 11 'PSET (5, 160), 11 'PSET (280, 160), 11 SetPal 1, &H46, &H6E, &H64 COLOR 1 LOCATE 12, 2 msg$ = "Hit the button to select this key." PRINT msg$ 'H /\ 'P \/ a = 1 baser = 1 ba = baser + 7 up = 1 cnt = 1 FOR i = 1 TO How LOCATE up + 2, 2 '-------------------------------- ' IF How <> 0 THEN of5 = INT((a * 5) / How) END IF of5 = of5 + 1 '*** This is the up arrow PSET (285, 35), 7 PSET (286, 35), 7 PSET (284, 36), 7 PSET (285, 36), 7 PSET (286, 36), 7 PSET (287, 36), 7 PSET (283, 37), 7 PSET (284, 37), 7 PSET (285, 37), 7 PSET (286, 37), 7 PSET (287, 37), 7 PSET (288, 37), 7 PSET (283, 38), 7 PSET (284, 38), 7 PSET (285, 38), 7 PSET (286, 38), 7 PSET (287, 38), 7 PSET (288, 38), 7 '*** This is the down arrow PSET (283, 140), 7 PSET (284, 140), 7 PSET (285, 140), 7 PSET (286, 140), 7 PSET (287, 140), 7 PSET (288, 140), 7 PSET (283, 141), 7 PSET (284, 141), 7 PSET (285, 141), 7 PSET (286, 141), 7 PSET (287, 141), 7 PSET (288, 141), 7 PSET (284, 142), 7 PSET (285, 142), 7 PSET (286, 142), 7 PSET (287, 142), 7 PSET (285, 143), 7 PSET (286, 143), 7 '***This is the graphic to show where in the list you are IF How >= 6 THEN FOR iV = 42 TO 56 PSET (284, iV), 11 PSET (285, iV), 11 PSET (286, iV), 11 PSET (287, iV), 11 NEXT FOR iV = 43 TO 56 PSET (285, iV), 3 PSET (286, iV), 3 PSET (287, iV), 3 NEXT END IF FOR iV = 283 TO 288 PSET (iV, 40), 7 PSET (iV, 138), 7 NEXT FOR iV = 40 TO 138 PSET (283, iV), 7 PSET (288, iV), 7 NEXT REDIM sBar(1000) GET (284, 42)-(287, 56), sBar ' '-------------------------------- IF i = a THEN COLOR 15 ELSE COLOR 8 END IF IF cnt >= baser AND cnt <= ba THEN IF LEN(Names$(i)) > 34 THEN Names$(i) = MID$(Names$(i), 1, 32) + ".." END IF PRINT Names$(i) up = up + 1 END IF cnt = cnt + 1 NEXT i COLOR 7 LOCATE 13, 1: PRINT a; "of"; How DO i$ = INKEY$ IF i$ <> "" THEN IF i$ = CHR$(13) THEN IF sel(a) = 0 THEN tme = 1 END IF IF sel(a) = 1 THEN tme = 0 END IF IF sel(a) = 2 THEN tme = 2 'SEND CONTROL TO NEXT LEVEL GOTO 611 CLS END IF sel(a) = tme END IF IF i$ = CHR$(27) THEN EXIT SUB IF i$ = CHR$(0) + "H" THEN a = a - 1 IF a < 1 THEN a = 1 IF a < baser THEN baser = baser - 1 ba = baser + 7 COLOR 7 LOCATE 13, 1: PRINT a; "of"; How END IF IF i$ = CHR$(0) + "P" THEN a = a + 1 IF a > How THEN a = How IF a > ba THEN baser = baser + 1 ba = baser + 7 COLOR 7 LOCATE 13, 1: PRINT a; "of"; How END IF IF How <> 0 THEN of5 = INT((a * 5) / How) END IF of5 = of5 + 1 'HP '42 '58 '74 '90 IF of5 = 1 THEN Plc = 42 IF of5 = 2 THEN Plc = 58 IF of5 = 3 THEN Plc = 74 IF of5 = 4 THEN Plc = 90 IF of5 = 5 THEN Plc = 106 IF of5 = 6 THEN Plc = 122 IF How >= 6 THEN IF (Xplc <> Plc) AND (Lx <> of5) THEN LINE (284, 42)-(287, 136), 0, BF PUT (284, Plc), sBar, PSET END IF END IF Lx = of5 Xplc = Plc up = 1 cnt = 1 FOR i = 1 TO How LOCATE up + 2, 2 IF cnt >= baser AND cnt <= ba THEN IF i = a THEN IF sel(i) = 0 THEN msg$ = "Hit the button to select this key. " END IF IF sel(i) = 1 THEN msg$ = "Hit the button to deselect this key. " END IF IF sel(i) = 2 THEN msg$ = "Hit the button to continue.. " END IF SetPal 1, &H46, &H6E, &H64 COLOR 1 LOCATE 12, 2: PRINT msg$ COLOR 15 END IF IF i <> a THEN IF sel(i) = 0 THEN COLOR 8 IF sel(i) = 1 THEN COLOR 7 IF sel(i) = 2 THEN COLOR 8 END IF LOCATE up + 2, 2 PRINT Names$(i) + STRING$(34 - LEN(Names$(i)), " ") up = up + 1 END IF cnt = cnt + 1 tot = tot + 1 NEXT i END IF LOOP 611 ' '''''''''''''''''''''''''''''''''''''''''''''''''' ' '''' '''' FIX NEW DAT BEFORE REENCRYPTION '''' How = How - 1 Gan = 0 FOR ix = 1 TO How Gan = Gan + sel(ix) NEXT IF Gan = 0 THEN EXIT SUB SendDec Snd$ RfkDec Rfk$ nHow = 0 OPEN "i", #1, Snd$ WHILE NOT EOF(1) INPUT #1, a$, b$, C$, d$ nHow = nHow + 1 WEND CLOSE #1 REDIM tNames$(nHow) nHow = 0 OPEN "i", #1, Snd$ WHILE NOT EOF(1) INPUT #1, a$, b$, C$, d$ nHow = nHow + 1 tNames$(nHow) = LCASE$(b$) WEND CLOSE #1 OPEN "a", #1, Snd$ FOR i = 1 TO How IF sel(i) = 1 THEN DrX = 0 FOR Xc = 1 TO nHow IF tNames$(Xc) = LCASE$(Names$(i)) THEN DrX = DrX + 1 END IF NEXT IF DrX = 0 THEN WRITE #1, Code$(i), Names$(i), Pwd$(i), Pub$(i) END IF END IF NEXT i CLOSE #1 '''' '''' SendEnc Snd$ RfkEnc Rfk$ END SUB SUB FileNames (Rfk$, Snd$, Rcd$) Rfk$ = "rfk.dat" Snd$ = "send.dat" Rcd$ = "record.dat" END SUB SUB GetFile (Fil$) NoBreak ON ERROR GOTO Ed CLS COLOR 3 PRINT "RFK MSE " COLOR 8 PRINT "If the file is in the current directory, just simply type it's name." PRINT "If it is not, however, please type the full path to the file." COLOR 7 x = 4 Pr$ = "Enter the directory and file name:" InputC x, Pr$, q$, Pi$ Fil$ = q$ OPEN "i", #1, Fil$ CLOSE #1 END SUB SUB Import (Rfk$, Snd$) SendDec Snd$ NoBreak 'This is the data manipulation CLS How = 0 OPEN "i", #1, Snd$ WHILE NOT EOF(1) INPUT #1, a$, b$, C$, d$ How = How + 1 WEND CLOSE #1 IF How = 0 THEN CLS COLOR 15 PRINT "You have no keys to import!" COLOR 8 PRINT "To have keys to import, you must either export them " PRINT "or get a friends send.dat file and import his keys so" PRINT "you both can send encrypted messages back and fourth." COLOR 7 PRINT "Hit a key to continue.." DO: LOOP UNTIL INKEY$ <> "" SendEnc Snd$ EXIT SUB END IF DIM Names$(How + 1) DIM Code$(How) DIM Pwd$(How) DIM Pub$(How) DIM sel(How + 1) How = 0 OPEN "i", #1, Snd$ WHILE NOT EOF(1) INPUT #1, a$, b$, C$, d$ How = How + 1 Code$(How) = a$ Names$(How) = b$ Pwd$(How) = C$ Pub$(How) = d$ sel(How) = 0 WEND Names$(How + 1) = "Done." sel(How + 1) = 2 How = How + 1 CLOSE #1 SendEnc Snd$ 'EODM ' '''''''''''''''''''''''''''''''''''''''''''''''''' ' CLS SCREEN 12 Inst4 FOR iV = 5 TO 280 PSET (iV, 30), 7 PSET (iV, 160), 7 NEXT iV FOR iV = 30 TO 160 PSET (5, iV), 7 PSET (280, iV), 7 NEXT iV LOCATE 1: COLOR 7: PRINT "MSE - Maximum Security Encrypiton" LOCATE , 2 'PSET (5, 30), 11 'PSET (280, 30), 11 'PSET (5, 160), 11 'PSET (280, 160), 11 SetPal 1, &H46, &H6E, &H64 COLOR 1 LOCATE 12, 2 msg$ = "Hit the button to select this key." PRINT msg$ 'H /\ 'P \/ a = 1 baser = 1 ba = baser + 7 up = 1 cnt = 1 FOR i = 1 TO How LOCATE up + 2, 2 '-------------------------------- ' IF How <> 0 THEN of5 = INT((a * 5) / How) END IF of5 = of5 + 1 '*** This is the up arrow PSET (285, 35), 7 PSET (286, 35), 7 PSET (284, 36), 7 PSET (285, 36), 7 PSET (286, 36), 7 PSET (287, 36), 7 PSET (283, 37), 7 PSET (284, 37), 7 PSET (285, 37), 7 PSET (286, 37), 7 PSET (287, 37), 7 PSET (288, 37), 7 PSET (283, 38), 7 PSET (284, 38), 7 PSET (285, 38), 7 PSET (286, 38), 7 PSET (287, 38), 7 PSET (288, 38), 7 '*** This is the down arrow PSET (283, 140), 7 PSET (284, 140), 7 PSET (285, 140), 7 PSET (286, 140), 7 PSET (287, 140), 7 PSET (288, 140), 7 PSET (283, 141), 7 PSET (284, 141), 7 PSET (285, 141), 7 PSET (286, 141), 7 PSET (287, 141), 7 PSET (288, 141), 7 PSET (284, 142), 7 PSET (285, 142), 7 PSET (286, 142), 7 PSET (287, 142), 7 PSET (285, 143), 7 PSET (286, 143), 7 '***This is the graphic to show where in the list you are IF How >= 6 THEN FOR iV = 42 TO 56 PSET (284, iV), 11 PSET (285, iV), 11 PSET (286, iV), 11 PSET (287, iV), 11 NEXT FOR iV = 43 TO 56 PSET (285, iV), 3 PSET (286, iV), 3 PSET (287, iV), 3 NEXT END IF FOR iV = 283 TO 288 PSET (iV, 40), 7 PSET (iV, 138), 7 NEXT FOR iV = 40 TO 138 PSET (283, iV), 7 PSET (288, iV), 7 NEXT REDIM sBar(1000) GET (284, 42)-(287, 56), sBar ' '-------------------------------- IF i = a THEN COLOR 15 ELSE COLOR 8 END IF IF cnt >= baser AND cnt <= ba THEN IF LEN(Names$(i)) > 34 THEN Names$(i) = MID$(Names$(i), 1, 32) + ".." END IF PRINT Names$(i) up = up + 1 END IF cnt = cnt + 1 NEXT i COLOR 7 LOCATE 13, 1: PRINT a; "of"; How DO i$ = INKEY$ IF i$ <> "" THEN IF i$ = CHR$(13) THEN IF sel(a) = 0 THEN tme = 1 END IF IF sel(a) = 1 THEN tme = 0 END IF IF sel(a) = 2 THEN tme = 2 'SEND CONTROL TO NEXT LEVEL GOTO 6121 CLS END IF sel(a) = tme END IF IF i$ = CHR$(27) THEN EXIT SUB IF i$ = CHR$(0) + "H" THEN a = a - 1 IF a < 1 THEN a = 1 IF a < baser THEN baser = baser - 1 ba = baser + 7 COLOR 7 LOCATE 13, 1: PRINT a; "of"; How END IF IF i$ = CHR$(0) + "P" THEN a = a + 1 IF a > How THEN a = How IF a > ba THEN baser = baser + 1 ba = baser + 7 COLOR 7 LOCATE 13, 1: PRINT a; "of"; How END IF IF How <> 0 THEN of5 = INT((a * 5) / How) END IF of5 = of5 + 1 'HP '42 '58 '74 '90 IF of5 = 1 THEN Plc = 42 IF of5 = 2 THEN Plc = 58 IF of5 = 3 THEN Plc = 74 IF of5 = 4 THEN Plc = 90 IF of5 = 5 THEN Plc = 106 IF of5 = 6 THEN Plc = 122 IF How >= 6 THEN IF (Xplc <> Plc) AND (Lx <> of5) THEN LINE (284, 42)-(287, 136), 0, BF PUT (284, Plc), sBar, PSET END IF END IF Lx = of5 Xplc = Plc up = 1 cnt = 1 FOR i = 1 TO How LOCATE up + 2, 2 IF cnt >= baser AND cnt <= ba THEN IF i = a THEN IF sel(i) = 0 THEN msg$ = "Hit the button to select this key. " END IF IF sel(i) = 1 THEN msg$ = "Hit the button to deselect this key. " END IF IF sel(i) = 2 THEN msg$ = "Hit the button to continue.. " END IF SetPal 1, &H46, &H6E, &H64 COLOR 1 LOCATE 12, 2: PRINT msg$ COLOR 15 END IF IF i <> a THEN IF sel(i) = 0 THEN COLOR 8 IF sel(i) = 1 THEN COLOR 7 IF sel(i) = 2 THEN COLOR 8 END IF LOCATE up + 2, 2 PRINT Names$(i) + STRING$(34 - LEN(Names$(i)), " ") up = up + 1 END IF cnt = cnt + 1 tot = tot + 1 NEXT i END IF LOOP 6121 ' '''''''''''''''''''''''''''''''''''''''''''''''''' ' '''' '''' FIX NEW DAT BEFORE REENCRYPTION '''' How = How - 1 Gan = 0 FOR ix = 1 TO How Gan = Gan + sel(ix) NEXT IF Gan = 0 THEN EXIT SUB SendDec Snd$ RfkDec Rfk$ nHow = 0 OPEN "i", #1, Rfk$ WHILE NOT EOF(1) INPUT #1, a$, b$, C$, d$ nHow = nHow + 1 WEND CLOSE #1 REDIM tNames$(nHow) nHow = 0 OPEN "i", #1, Rfk$ WHILE NOT EOF(1) INPUT #1, a$, b$, C$, d$ nHow = nHow + 1 tNames$(nHow) = LCASE$(b$) WEND CLOSE #1 OPEN "a", #1, Rfk$ FOR i = 1 TO How IF sel(i) = 1 THEN DrX = 0 FOR Xc = 1 TO nHow IF tNames$(Xc) = LCASE$(Names$(i)) THEN DrX = DrX + 1 END IF NEXT IF DrX = 0 THEN WRITE #1, Code$(i), Names$(i), Pwd$(i), Pub$(i) END IF END IF NEXT i CLOSE #1 '''' '''' RfkEnc Rfk$ SendEnc Snd$ END SUB SUB InputB (Pr$, Pw$, j$, Pswitch, x, Whc, Esc) NoBreak SCREEN 12 M$ = "" i$ = "" kak = 0 Focus = 1 COLOR 7 LOCATE x, 1: PRINT Pr$ LOCATE x, 1 + LEN(Pr$) + LEN(M$): COLOR 15: PRINT " " LOCATE 23 COLOR 15 PRINT " Hide" COLOR 7 PRINT " Show" LINE (6, 352)-(40, 365), 3, B LOCATE 25: COLOR 8 PRINT "You are currently hiding your password from view. To change" PRINT "this option, scroll down to the selection of your choice and" PRINT "hit the button." DO IF Focus = 1 THEN kak = kak + 1 IF kak > 5000 THEN kak = 1 IF kak >= 0 AND kak <= 2500 THEN l$ = "_" END IF IF kak > 2500 AND kak <= 5000 THEN l$ = " " END IF LOCATE x, 1 + LEN(Pr$) + LEN(M$): COLOR 15: PRINT l$ i$ = INKEY$ IF (i$ <> "") OR (Bag = 1) THEN IF Bag = 1 THEN Bag = 0 i$ = CHR$(0) END IF IF (i$ = CHR$(0) + "H") OR (i$ = CHR$(0) + "P") THEN BaXg = 1 Focus = 2 END IF IF i$ <> CHR$(13) AND i$ <> CHR$(27) AND ASC(i$) <> 8 AND ASC(i$) <> 0 AND ASC(i$) < 126 THEN IF LEN(M$) < 79 - LEN(Pr$) THEN M$ = M$ + i$ END IF END IF IF i$ = CHR$(13) THEN LOCATE x, 1 + LEN(Pr$) + LEN(M$): COLOR 15: PRINT " " j$ = M$ EXIT SUB 'Send control to the next step because this segment is through. END IF IF i$ = CHR$(8) THEN IF LEN(M$) >= 1 THEN M$ = MID$(M$, 1, LEN(M$) - 1) END IF END IF LOCATE x, 1 + LEN(Pr$): PRINT STRING$(81 - (1 + LEN(Pr$)), " ") COLOR 8 IF Pswitch = 1 THEN LOCATE x, 1 + LEN(Pr$): PRINT STRING$(LEN(M$), "*"); " " END IF IF Pswitch = 0 THEN LOCATE x, 1 + LEN(Pr$): PRINT M$ END IF END IF END IF IF Focus = 2 THEN '---------- i1$ = INKEY$ IF BaXg = 1 THEN i1$ = i$ BaXg = 0 END IF IF i1$ <> "" THEN IF i1$ = CHR$(0) + "H" THEN a1 = a1 - 1 IF a1 < 0 THEN a1 = 0 END IF IF i1$ = CHR$(0) + "P" THEN a1 = a1 + 1 IF a1 > 1 THEN a1 = 1 END IF IF i1$ = CHR$(13) THEN Se1 = a1 IF Se1 = 0 THEN Pswitch = 1 IF Se1 = 1 THEN Pswitch = 0 Bag = 1 Focus = 1 END IF IF Se1 = 0 THEN LOCATE 23 COLOR 15 PRINT " Hide" COLOR 7 PRINT " Show" END IF IF Se1 = 1 THEN LOCATE 23 COLOR 7 PRINT " Hide" COLOR 15 PRINT " Show" END IF IF a1 = 0 THEN LINE (6, 352)-(40, 365), 3, B LINE (6, 368)-(40, 381), 0, B END IF IF a1 = 1 THEN LINE (6, 352)-(40, 365), 0, B LINE (6, 368)-(40, 381), 3, B LOCATE 25: COLOR 8 END IF IF Se1 = 0 THEN LOCATE 25: COLOR 8 PRINT "You are currently hiding your password from view. To change " PRINT "this option, scroll down to the selection of your choice and" PRINT "hit the button." ELSE LOCATE 25: COLOR 8 PRINT "You are currently showing your password. To change this " PRINT "option, scroll down to the selection of your choice and " PRINT "hit the button." END IF END IF END IF '---------- LOOP END SUB SUB InputC (x, Pr$, q$, Pi$) 456 NoBreak M$ = "" i$ = "" kak = 0 COLOR 7 LOCATE x, 1: PRINT Pr$ DO kak = kak + 1 IF kak > 5000 THEN kak = 1 IF kak >= 0 AND kak <= 2500 THEN l$ = "_" END IF IF kak > 2500 AND kak <= 5000 THEN l$ = " " END IF LOCATE x, 1 + LEN(Pr$) + LEN(M$): COLOR 15: PRINT l$ i$ = INKEY$ IF i$ <> "" THEN IF i$ <> CHR$(13) AND i$ <> CHR$(27) AND ASC(i$) <> 8 AND ASC(i$) <> 0 AND ASC(i$) < 126 THEN IF LEN(M$) < 79 - LEN(Pr$) THEN M$ = M$ + i$ END IF END IF IF i$ = CHR$(27) THEN Pi$ = "max" EXIT SUB END IF IF i$ = CHR$(13) THEN LOCATE x, 1 + LEN(Pr$) + LEN(M$): COLOR 15: PRINT " " j$ = M$ GOTO 882 'Send control to the next step because this segment is through. END IF IF i$ = CHR$(8) THEN IF LEN(M$) >= 1 THEN M$ = MID$(M$, 1, LEN(M$) - 1) END IF END IF LOCATE x, 1 + LEN(Pr$): PRINT STRING$(81 - (1 + LEN(Pr$)), " ") COLOR 8 IF Pswitch = 1 THEN LOCATE x, 1 + LEN(Pr$): PRINT STRING$(LEN(M$), "*"); " " END IF IF Pswitch = 0 THEN LOCATE x, 1 + LEN(Pr$): PRINT M$ END IF END IF LOOP 882 FOR IN = 1 TO LEN(j$) IF MID$(j$, IN, 1) <> CHR$(44) AND MID$(j$, IN, 1) <> CHR$(34) THEN v$ = v$ + MID$(j$, IN, 1) END IF NEXT IN q$ = v$ IF q$ = "" THEN GOTO 456 EXIT SUB END SUB SUB inst a = 11 b = 3 COLOR a LOCATE 2, 50: PRINT "Instructions" REDIM ch(2000) REDIM Text(2000) GET (393, 17)-(487, 27), Text LOCATE 2, 50: PRINT " " LOCATE 3, 50 COLOR 7 PRINT "Select your choice by scrolling" LOCATE 4, 50 COLOR 7 PRINT "using the up / down arrow keys" LOCATE 5, 50 COLOR 7 PRINT "and hit the button on" LOCATE 6, 50 COLOR 7 PRINT "your choice to continue.." GET (391, 33)-(638, 96), ch LOCATE 3, 50 COLOR 7 PRINT " " LOCATE 4, 50 COLOR 7 PRINT " " LOCATE 5, 50 COLOR 7 PRINT " " LOCATE 6, 50 COLOR 7 PRINT " " PUT (389, 33), ch 'PSET (385, 28), 3 'PSET (385, 100), 3 'PSET (624, 28), 12 FOR i = 385 TO 639 PSET (i, 28), b PSET (i, 100), b NEXT i FOR i = 28 TO 100 PSET (385, i), b PSET (639, i), b NEXT i PUT (393, 20), Text, PSET LOCATE 26, 60 COLOR 15 '*** Credits and such. More is in credits.txt PRINT "RFK MSE BETA 1.1" COLOR 7 LOCATE , 60 PRINT "By Max Edmiston" LOCATE , 60 PRINT "FREEWARE 2000" LOCATE 26, 1 COLOR 3 PRINT "Contact" COLOR 7 LOCATE , 1 PRINT " max@edmiston.org" COLOR 15 LOCATE 27, 20: PRINT "http://edmiston.org/max/qb " FOR Bx = 6 TO 136 PSET (Bx, 416), 8 PSET (Bx, 432), 8 NEXT FOR Bx = 416 TO 432 PSET (6, Bx), 8 PSET (136, Bx), 8 NEXT END SUB SUB inst2 a = 11 b = 3 COLOR a LOCATE 2, 50: PRINT "Instructions" REDIM ch(2000) REDIM Text(2000) GET (393, 17)-(487, 27), Text LOCATE 2, 50: PRINT " " LOCATE 3, 50 COLOR 7 PRINT "Scroll using the up/down arrow" LOCATE 4, 50 COLOR 7 PRINT "keys and select keys you want" LOCATE 5, 50 COLOR 7 PRINT "to delete by hitting ." LOCATE 6, 50 COLOR 7 PRINT "Hit 'Done.' to continue.." GET (391, 33)-(638, 96), ch LOCATE 3, 50 COLOR 7 PRINT " " LOCATE 4, 50 COLOR 7 PRINT " " LOCATE 5, 50 COLOR 7 PRINT " " LOCATE 6, 50 COLOR 7 PRINT " " PUT (389, 33), ch 'PSET (385, 28), 3 'PSET (385, 100), 3 'PSET (624, 28), 12 FOR i = 385 TO 639 PSET (i, 28), b PSET (i, 100), b NEXT i FOR i = 28 TO 100 PSET (385, i), b PSET (639, i), b NEXT i PUT (393, 20), Text, PSET END SUB SUB Inst3 a = 11 b = 3 COLOR a LOCATE 2, 50: PRINT "Instructions" REDIM ch(2000) REDIM Text(2000) GET (393, 17)-(487, 27), Text LOCATE 2, 50: PRINT " " LOCATE 3, 50 COLOR 7 PRINT "Select the key you wish to use" LOCATE 4, 50 COLOR 7 PRINT "and hit the button to " LOCATE 5, 50 COLOR 7 PRINT "continue.." LOCATE 6, 50 COLOR 7 PRINT "" GET (391, 33)-(638, 96), ch LOCATE 3, 50 COLOR 7 PRINT " " LOCATE 4, 50 COLOR 7 PRINT " " LOCATE 5, 50 COLOR 7 PRINT " " LOCATE 6, 50 COLOR 7 PRINT " " PUT (389, 33), ch 'PSET (385, 28), 3 'PSET (385, 100), 3 'PSET (624, 28), 12 FOR i = 385 TO 639 PSET (i, 28), b PSET (i, 100), b NEXT i FOR i = 28 TO 100 PSET (385, i), b PSET (639, i), b NEXT i PUT (393, 20), Text, PSET END SUB SUB Inst4 a = 11 b = 3 COLOR a LOCATE 2, 50: PRINT "Instructions" REDIM ch(2000) REDIM Text(2000) GET (393, 17)-(487, 27), Text LOCATE 2, 50: PRINT " " LOCATE 3, 50 COLOR 7 PRINT "Scroll using the up/down arrow" LOCATE 4, 50 COLOR 7 PRINT "keys and select keys you want" LOCATE 5, 50 COLOR 7 PRINT "to Import by hitting ." LOCATE 6, 50 COLOR 7 PRINT "Hit 'Done.' to continue.." GET (391, 33)-(638, 96), ch LOCATE 3, 50 COLOR 7 PRINT " " LOCATE 4, 50 COLOR 7 PRINT " " LOCATE 5, 50 COLOR 7 PRINT " " LOCATE 6, 50 COLOR 7 PRINT " " PUT (389, 33), ch 'PSET (385, 28), 3 'PSET (385, 100), 3 'PSET (624, 28), 12 FOR i = 385 TO 639 PSET (i, 28), b PSET (i, 100), b NEXT i FOR i = 28 TO 100 PSET (385, i), b PSET (639, i), b NEXT i PUT (393, 20), Text, PSET END SUB SUB Inst5 a = 11 b = 3 COLOR a LOCATE 2, 50: PRINT "Instructions" REDIM ch(2000) REDIM Text(2000) GET (393, 17)-(487, 27), Text LOCATE 2, 50: PRINT " " LOCATE 3, 50 COLOR 7 PRINT "Scroll using the up/down arrow" LOCATE 4, 50 COLOR 7 PRINT "keys and select keys you want" LOCATE 5, 50 COLOR 7 PRINT "to Export by hitting ." LOCATE 6, 50 COLOR 7 PRINT "Hit 'Done.' to continue.." GET (391, 33)-(638, 96), ch LOCATE 3, 50 COLOR 7 PRINT " " LOCATE 4, 50 COLOR 7 PRINT " " LOCATE 5, 50 COLOR 7 PRINT " " LOCATE 6, 50 COLOR 7 PRINT " " PUT (389, 33), ch 'PSET (385, 28), 3 'PSET (385, 100), 3 'PSET (624, 28), 12 FOR i = 385 TO 639 PSET (i, 28), b PSET (i, 100), b NEXT i FOR i = 28 TO 100 PSET (385, i), b PSET (639, i), b NEXT i PUT (393, 20), Text, PSET END SUB SUB NoBreak KEY 15, CHR$(4 + 128 + 32 + 64) + CHR$(70) KEY 16, CHR$(4 + 128) + CHR$(70): KEY 17, CHR$(4 + 128 + 32) + CHR$(70): KEY 18, CHR$(4 + 128 + 64) + CHR$(70): KEY 19, CHR$(4) + CHR$(70) KEY 22, CHR$(4 + 64) + CHR$(70) KEY 23, CHR$(4 + 32) + CHR$(46) KEY 24, CHR$(4 + 64) + CHR$(46) KEY 25, CHR$(4 + 32 + 64) + CHR$(46): ON KEY(15) GOSUB NoBreak: KEY(15) ON ON KEY(16) GOSUB NoBreak: KEY(16) ON ON KEY(17) GOSUB NoBreak: KEY(17) ON ON KEY(18) GOSUB NoBreak: KEY(18) ON ON KEY(21) GOSUB NoBreak: KEY(21) ON ON KEY(22) GOSUB NoBreak: KEY(22) ON ON KEY(23) GOSUB NoBreak: KEY(23) ON ON KEY(24) GOSUB NoBreak: KEY(24) ON ON KEY(25) GOSUB NoBreak: KEY(25) ON DEF SEG = 0 POKE &H417, PEEK(&H417) AND 251 END SUB SUB randsee1 (u1$, u2$, u3$, u4$) NoBreak RANDOMIZE TIMER a = INT(RND * 255) + 1 u1$ = CHR$(a) a = INT(RND * 255) + 1 u2$ = CHR$(a) a = INT(RND * 255) + 1 u3$ = CHR$(a) a = INT(RND * 255) + 1 u4$ = CHR$(a) END SUB SUB ResetH (File, Rfk$, Snd$, Rcd$) DIM Id AS Byte CLOSE #1, 2 IF File = 2 THEN FileNames Rfk$, Snd$, Rcd$ OPEN "o", #1, Rfk$ CLOSE #1 OPEN Rfk$ FOR BINARY AS #1 Id.value = "M" PUT #1, 1, Id.value Id.value = "S" PUT #1, 2, Id.value Id.value = "E" PUT #1, 3, Id.value Id.value = "1" PUT #1, 4, Id.value Id.value = "1" PUT #1, 5, Id.value Id.value = "1" PUT #1, 6, Id.value Id.value = "1" PUT #1, 7, Id.value CLOSE #1 OPEN "o", #1, Rcd$ cB = 2 WRITE #1, cB CLOSE #1 END IF IF File = 3 THEN OPEN "o", #1, Snd$ CLOSE #1 OPEN Snd$ FOR BINARY AS #1 Id.value = "M" PUT #1, 1, Id.value Id.value = "S" PUT #1, 2, Id.value Id.value = "E" PUT #1, 3, Id.value Id.value = "1" PUT #1, 4, Id.value Id.value = "1" PUT #1, 5, Id.value Id.value = "1" PUT #1, 6, Id.value Id.value = "1" PUT #1, 7, Id.value CLOSE #1 OPEN "o", #1, Rcd$ cB = 3 WRITE #1, cB CLOSE #1 END IF IF File = 4 THEN OPEN "o", #1, Snd$ CLOSE #1 OPEN Snd$ FOR BINARY AS #1 Id.value = "M" PUT #1, 1, Id.value Id.value = "S" PUT #1, 2, Id.value Id.value = "E" PUT #1, 3, Id.value Id.value = "1" PUT #1, 4, Id.value Id.value = "1" PUT #1, 5, Id.value Id.value = "1" PUT #1, 6, Id.value Id.value = "1" PUT #1, 7, Id.value CLOSE #1 OPEN "o", #1, Rcd$ cB = 4 WRITE #1, cB CLOSE #1 END IF IF File = 5 THEN OPEN "o", #1, Snd$ CLOSE #1 OPEN Snd$ FOR BINARY AS #1 Id.value = "M" PUT #1, 1, Id.value Id.value = "S" PUT #1, 2, Id.value Id.value = "E" PUT #1, 3, Id.value Id.value = "1" PUT #1, 4, Id.value Id.value = "1" PUT #1, 5, Id.value Id.value = "1" PUT #1, 6, Id.value Id.value = "1" PUT #1, 7, Id.value CLOSE #1 OPEN "o", #1, Rcd$ cB = 5 WRITE #1, cB CLOSE #1 END IF END SUB SUB RfkDec (Rfk$) ON ERROR GOTO RfkErr NoBreak ' + Added safety "lock" feature so keys can't be compromised. ' ' ' ' ' CLS CLOSE #1, 2 OPEN "i", #1, Rfk$ CLOSE #1 DIM Id AS Byte '--------------------------------------------------------- '-------------------U iN---------------------------------- '--------------------------------------------------------- main = 1 weave = 1 a = 0 b = 0 C = 0 d = 0 E = 0 RandStandard = 0: RndSt = 0 OPEN Rfk$ FOR BINARY AS #1 OPEN "o", #2, "temp2.na": CLOSE #2 OPEN "temp2.na" FOR BINARY AS #2 ni$ = "" FOR i = 1 TO 3 GET #1, i, Id.value ni$ = ni$ + Id.value NEXT i IF ni$ <> "MSE" THEN CLS PRINT "This file is not encrypted." END END IF ni$ = "" FOR i = 4 TO 7 GET #1, i, Id.value ni$ = ni$ + Id.value NEXT i u1$ = MID$(ni$, 1, 1) u2$ = MID$(ni$, 2, 1) u3$ = MID$(ni$, 3, 1) u4$ = MID$(ni$, 4, 1) ni$ = "" FOR i = 1 TO LOF(1) - 7 GET #1, i + 7, Id.value PUT #2, i, Id.value NEXT i '''''''''''''''''''''' ' Xc = -7 xF = 23 SCREEN 12 LOCATE 1: COLOR 15: PRINT "Editing rfk.dat" PRINT FOR iQ = 11 TO 639 PSET (iQ, 19), 7 NEXT iQ '*** This is the box incircling the percentage FOR aX = 6 TO 98 PSET (aX - Xc, 57 - xF), 7 PSET (aX - Xc, 67 - xF), 7 NEXT FOR aX = 57 TO 67 PSET (6 - Xc, aX - xF), 7 PSET (98 - Xc, aX - xF), 7 NEXT '*** This is the percentage guages FOR Dx = 8 TO 15 FOR Fx = 59 TO 65 PSET (Dx - Xc, Fx - xF), 10 NEXT NEXT FOR Dx = 9 TO 15 FOR Fx = 60 TO 65 PSET (Dx - Xc, Fx - xF), 2 NEXT NEXT DIM PiX(1000) GET (8 - Xc, 59 - xF)-(15 - Xc, 65 - xF), PiX LOCATE 3, 20 COLOR 8 PRINT "Editing the rfk.dat data file. " LOCATE , 20 PRINT "Please wait while this process" LOCATE , 20 PRINT "is being completed." ' '''''''''''''''''''''' FOR Axs = 1 TO LOF(2) nT = INT((Axs * 9) / LOF(1)) IF XnT <> nT THEN PUT ((8 + (9 * nT)) - Xc, 59 - xF), PiX, PSET END IF XnT = nT GET #2, Axs, Id.value main = main + 1: IF main > 5 THEN main = 1 weave = weave + 1: IF weave > 2 THEN weave = 1 F = ASC(Id.value) IF weave = 1 THEN F = F + 1 ELSE F = 256 - F END IF a = a + 5 b = b + 1 C = C + 4 d = d + 9 E = E + 3 RandStandard = RandStandard + 1: IF RandStandard > 3 THEN RandStandard = 0 IF RandStandard = 0 THEN RndSt = ASC(u1$) IF RandStandard = 1 THEN RndSt = ASC(u2$) IF RandStandard = 2 THEN RndSt = ASC(u3$) IF RandStandard = 3 THEN RndSt = ASC(u4$) IF a > 125 THEN a = 1 IF b > 57 THEN b = 1 IF C > 98 THEN C = 1 IF d > 29 THEN d = 1 IF E > 60 THEN E = 1 '====================================================== IF main = 1 THEN K = a + INT(RndSt / 2) IF main = 2 THEN K = b + INT(RndSt / 2) IF main = 3 THEN K = C + INT(RndSt / 2) IF main = 4 THEN K = d + INT(RndSt / 2) IF main = 5 THEN K = E + INT(RndSt / 2) '========Begginning of code============================ w = (K + F) / 255 w1 = INT((K + F) / 255) IF w = w1 THEN F = w END IF IF w > w1 THEN COLOR 3 F = 255 - ((F + K) - ((w1 * 255) + w1 + 1)) END IF IF F > 255 THEN F = F - 256 Id.value = CHR$(FIX(F)) PUT #2, Axs, Id.value '======== End of code ============================ '====================================================== NEXT CLOSE #1, 2 KILL Rfk$ NAME "temp2.na" AS Rfk$ END SUB SUB RfkEnc (Rfk$) NoBreak ON ERROR GOTO RfkErr DIM Id AS Byte RandStandard = 0: RndSt = 0 TIMER ON TI = TIMER Bps = TIMER CLS : main = 1: weave = 1 CLOSE #1, 2 OPEN Rfk$ FOR BINARY AS #1 OPEN "o", #2, "temp1.na": CLOSE #2 OPEN "temp1.na" FOR BINARY AS #2 'Impliment random 4letter string called b$ and split it into u1$, u2$, u3$, and u4$ randsee1 u1$, u2$, u3$, u4$ FOR i = 1 TO 3 GET #1, i, Id.value ni$ = ni$ + Id.value NEXT i IF ni$ = "MSE" THEN CLS PRINT "This file is already encrypted." END END IF: ni$ = "" ''''''''''''''''''''''' ' Xc = -7 xF = 23 SCREEN 12 LOCATE 1: COLOR 15: PRINT "Editing rfk.dat" PRINT FOR iQ = 11 TO 639 PSET (iQ, 19), 7 NEXT iQ '*** This is the box incircling the percentage FOR aX = 6 TO 98 PSET (aX - Xc, 57 - xF), 7 PSET (aX - Xc, 67 - xF), 7 NEXT FOR aX = 57 TO 67 PSET (6 - Xc, aX - xF), 7 PSET (98 - Xc, aX - xF), 7 NEXT '*** This is the percentage guages FOR Dx = 8 TO 15 FOR Fx = 59 TO 65 PSET (Dx - Xc, Fx - xF), 10 NEXT NEXT FOR Dx = 9 TO 15 FOR Fx = 60 TO 65 PSET (Dx - Xc, Fx - xF), 2 NEXT NEXT DIM PiX(1000) GET (8 - Xc, 59 - xF)-(15 - Xc, 65 - xF), PiX LOCATE 3, 20 COLOR 8 PRINT "Editing the rfk.dat data file. " LOCATE , 20 PRINT "Please wait while this process" LOCATE , 20 PRINT "is being completed." ' ''''''''''''''''''''''' FOR Axs = 1 TO LOF(1) nT = INT((Axs * 9) / LOF(1)) IF XnT <> nT THEN PUT ((8 + (9 * nT)) - Xc, 59 - xF), PiX, PSET END IF XnT = nT GET #1, Axs, Id.value F = ASC(Id.value) main = main + 1: IF main > 5 THEN main = 1 weave = weave + 1: IF weave > 2 THEN weave = 1 a = a + 5 b = b + 1 C = C + 4 d = d + 9 E = E + 3 RandStandard = RandStandard + 1: IF RandStandard > 3 THEN RandStandard = 0 IF RandStandard = 0 THEN RndSt = ASC(u1$) IF RandStandard = 1 THEN RndSt = ASC(u2$) IF RandStandard = 2 THEN RndSt = ASC(u3$) IF RandStandard = 3 THEN RndSt = ASC(u4$) IF a > 125 THEN a = 1 IF b > 57 THEN b = 1 IF C > 98 THEN C = 1 IF d > 29 THEN d = 1 IF E > 60 THEN E = 1 '====================================================== IF main = 1 THEN K = a + INT(RndSt / 2) IF main = 2 THEN K = b + INT(RndSt / 2) IF main = 3 THEN K = C + INT(RndSt / 2) IF main = 4 THEN K = d + INT(RndSt / 2) IF main = 5 THEN K = E + INT(RndSt / 2) '========Begginning of code============================ F = ASC(Id.value) h = (K + F) / 255 h1 = INT((K + F) / 255) IF h = h1 THEN 'number is dividend int F = 255 - h + 1 END IF IF h > h1 THEN 'this is what we need F = (K + F) - (h1 * 255) - h1 END IF IF F > 255 AND F <= 510 THEN F = ABS(F - 255) IF weave = 1 THEN F = 255 - F ELSE F = F END IF IF F > 255 AND F <= 510 THEN F = ABS(F - 255) IF F = -1 THEN F = 255 Id.value = CHR$(FIX(F)) '======== End of code ============================ '====================================================== PUT #2, Axs + 7, Id.value NEXT Id.value = "M" PUT #2, 1, Id.value Id.value = "S" PUT #2, 2, Id.value Id.value = "E" PUT #2, 3, Id.value Id.value = u1$ PUT #2, 4, Id.value Id.value = u2$ PUT #2, 5, Id.value Id.value = u3$ PUT #2, 6, Id.value Id.value = u4$ PUT #2, 7, Id.value CLS ntime = TIMER - TI Bps = TIMER - Bps TI = TIMER CLOSE #1, 2 KILL Rfk$ NAME "temp1.na" AS Rfk$ END SUB SUB SelectKey (Cod$, Correct, Whc, Nok, Rfk$) 94 RfkDec Rfk$ 'This is the data manipulation CLS How = 0 CLOSE #1, 2 OPEN "i", #1, Rfk$ WHILE NOT EOF(1) INPUT #1, a$, b$, C$, d$ How = How + 1 WEND CLOSE #1 IF How = 0 THEN CLS COLOR 15 PRINT "You have no keys!" COLOR 8 PRINT "To make a key, goto Create and hit , then fill out the " PRINT "appropriate information." COLOR 7 PRINT "Hit a key to continue.." DO: LOOP UNTIL INKEY$ <> "" Nok = 2 RfkEnc Rfk$ EXIT SUB END IF DIM Names$(How) DIM Code$(How) DIM Pwd$(How) DIM Pub$(How) How = 0 OPEN "i", #1, Rfk$ WHILE NOT EOF(1) INPUT #1, a$, b$, C$, d$ How = How + 1 Code$(How) = a$ Names$(How) = b$ Pwd$(How) = C$ Pub$(How) = d$ WEND CLOSE #1 RfkEnc Rfk$ 'EODM ' '''''''''''''''''''''''''''''''''''''''''''''''''' ' CLS SCREEN 12 ''''''''''''''''''''''''''''''''''''''''''''''''' of5 = INT((a * 5) / How) of5 = of5 + 1 '*** This is the up arrow PSET (285, 35), 7 PSET (286, 35), 7 PSET (284, 36), 7 PSET (285, 36), 7 PSET (286, 36), 7 PSET (287, 36), 7 PSET (283, 37), 7 PSET (284, 37), 7 PSET (285, 37), 7 PSET (286, 37), 7 PSET (287, 37), 7 PSET (288, 37), 7 PSET (283, 38), 7 PSET (284, 38), 7 PSET (285, 38), 7 PSET (286, 38), 7 PSET (287, 38), 7 PSET (288, 38), 7 '*** This is the down arrow PSET (283, 140), 7 PSET (284, 140), 7 PSET (285, 140), 7 PSET (286, 140), 7 PSET (287, 140), 7 PSET (288, 140), 7 PSET (283, 141), 7 PSET (284, 141), 7 PSET (285, 141), 7 PSET (286, 141), 7 PSET (287, 141), 7 PSET (288, 141), 7 PSET (284, 142), 7 PSET (285, 142), 7 PSET (286, 142), 7 PSET (287, 142), 7 PSET (285, 143), 7 PSET (286, 143), 7 '***This is the graphic to show where in the list you are IF How >= 6 THEN FOR i = 42 TO 56 PSET (284, i), 11 PSET (285, i), 11 PSET (286, i), 11 PSET (287, i), 11 NEXT FOR i = 43 TO 56 PSET (285, i), 3 PSET (286, i), 3 PSET (287, i), 3 NEXT END IF FOR i = 283 TO 288 PSET (i, 40), 7 PSET (i, 138), 7 NEXT FOR i = 40 TO 138 PSET (283, i), 7 PSET (288, i), 7 NEXT REDIM sBar(1000) GET (284, 42)-(287, 56), sBar '''''''''''''''''''''''''''''''''''''''''''''''''' Inst3 FOR i = 5 TO 280 PSET (i, 30), 7 PSET (i, 160), 7 NEXT i FOR i = 30 TO 160 PSET (5, i), 7 PSET (280, i), 7 NEXT i LOCATE 1: COLOR 7: PRINT "MSE - Maximum Security Encrypiton" LOCATE , 2 'PSET (5, 30), 11 'PSET (280, 30), 11 'PSET (5, 160), 11 'PSET (280, 160), 11 'H /\ 'P \/ a = 1 baser = 1 ba = baser + 7 up = 1 cnt = 1 FOR i = 1 TO How LOCATE up + 2, 2 IF i = a THEN COLOR 15 ELSE COLOR 8 END IF IF cnt >= baser AND cnt <= ba THEN IF LEN(Names$(i)) > 34 THEN Names$(i) = MID$(Names$(i), 1, 32) + ".." END IF PRINT Names$(i) up = up + 1 END IF cnt = cnt + 1 NEXT i COLOR 7 LOCATE 13, 1: PRINT a; "of"; How DO i$ = INKEY$ IF i$ <> "" THEN IF i$ = CHR$(13) THEN LOCATE 12 COLOR 7 Pr$ = "Enter Password:" Pw$ = Pwd$(a) Pswitch = 1 x = 12 y = 1 Esc = 0 InputB Pr$, Pw$, j$, Pswitch, x, Wch, Esc IF Esc = 9 THEN GOTO 94 IF Whc = 1 THEN IF j$ = Pwd$(a) THEN Cod$ = Code$(a) Correct = 1 EXIT SUB ELSE PRINT "Incorrect Username/Password Combination." SLEEP Correct = 0 EXIT SUB 'Encrypt and leave END IF END IF IF Whc = 2 THEN IF j$ = Pwd$(a) OR j$ = Pub$(a) THEN Cod$ = Code$(a) Correct = 1 EXIT SUB ELSE CLOSE #1, 2 PRINT "Incorrect Username/Password Combination." SLEEP Correct = 0 EXIT SUB 'Encrypt and leave END IF END IF END IF IF i$ = CHR$(27) THEN Cod$ = "leave" EXIT SUB END IF IF i$ = CHR$(0) + "H" THEN a = a - 1 IF a < 1 THEN a = 1 IF a < baser THEN baser = baser - 1 ba = baser + 7 COLOR 7 LOCATE 13, 1: PRINT a; "of"; How END IF IF i$ = CHR$(0) + "P" THEN a = a + 1 IF a > How THEN a = How IF a > ba THEN baser = baser + 1 ba = baser + 7 COLOR 7 LOCATE 13, 1: PRINT a; "of"; How END IF of5 = INT((a * 5) / How) of5 = of5 + 1 IF of5 = 1 THEN Plc = 42 IF of5 = 2 THEN Plc = 58 IF of5 = 3 THEN Plc = 74 IF of5 = 4 THEN Plc = 90 IF of5 = 5 THEN Plc = 106 IF of5 = 6 THEN Plc = 122 IF How >= 6 THEN IF (Xplc <> Plc) AND (Lx <> of5) THEN LINE (284, 42)-(287, 136), 0, BF PUT (284, Plc), sBar, PSET END IF END IF Lx = of5 Xplc = Plc up = 1 cnt = 1 FOR i = 1 TO How LOCATE up + 2, 2 IF cnt >= baser AND cnt <= ba THEN IF i = a THEN COLOR 15 ELSE COLOR 8 END IF LOCATE up + 2, 2 PRINT Names$(i) + STRING$(34 - LEN(Names$(i)), " ") up = up + 1 END IF cnt = cnt + 1 tot = tot + 1 NEXT i END IF LOOP END SUB SUB SendDec (Snd$) ON ERROR GOTO SendErr NoBreak ' + Added safety "lock" feature so keys can't be compromised. ' ' ' ' ' CLS CLOSE #1, 2 OPEN "i", #1, Snd$ CLOSE #1 DIM Id AS Byte '--------------------------------------------------------- '-------------------U iN---------------------------------- '--------------------------------------------------------- main = 1 weave = 1 a = 0 b = 0 C = 0 d = 0 E = 0 RandStandard = 0: RndSt = 0 OPEN Snd$ FOR BINARY AS #1 OPEN "o", #2, "temp2.na": CLOSE #2 OPEN "temp2.na" FOR BINARY AS #2 ni$ = "" FOR i = 1 TO 3 GET #1, i, Id.value ni$ = ni$ + Id.value NEXT i IF ni$ <> "MSE" THEN CLS PRINT "This file is not encrypted." END END IF ni$ = "" FOR i = 4 TO 7 GET #1, i, Id.value ni$ = ni$ + Id.value NEXT i u1$ = MID$(ni$, 1, 1) u2$ = MID$(ni$, 2, 1) u3$ = MID$(ni$, 3, 1) u4$ = MID$(ni$, 4, 1) ni$ = "" FOR i = 1 TO LOF(1) - 7 GET #1, i + 7, Id.value PUT #2, i, Id.value NEXT i '''''''''''''''''''''' ' Xc = -7 xF = 23 SCREEN 12 LOCATE 1: COLOR 15: PRINT "Editing Send.dat" PRINT FOR iQ = 11 TO 639 PSET (iQ, 19), 7 NEXT iQ '*** This is the box incircling the percentage FOR aX = 6 TO 98 PSET (aX - Xc, 57 - xF), 7 PSET (aX - Xc, 67 - xF), 7 NEXT FOR aX = 57 TO 67 PSET (6 - Xc, aX - xF), 7 PSET (98 - Xc, aX - xF), 7 NEXT '*** This is the percentage guages FOR Dx = 8 TO 15 FOR Fx = 59 TO 65 PSET (Dx - Xc, Fx - xF), 12 NEXT NEXT FOR Dx = 9 TO 15 FOR Fx = 60 TO 65 PSET (Dx - Xc, Fx - xF), 4 NEXT NEXT DIM PiX(1000) GET (8 - Xc, 59 - xF)-(15 - Xc, 65 - xF), PiX LOCATE 3, 20 COLOR 8 PRINT "Editing the Send.dat data file. " LOCATE , 20 PRINT "Please wait while this process" LOCATE , 20 PRINT "is being completed." ' '''''''''''''''''''''' FOR Axs = 1 TO LOF(2) nT = INT((Axs * 9) / LOF(1)) IF XnT <> nT THEN PUT ((8 + (9 * nT)) - Xc, 59 - xF), PiX, PSET END IF XnT = nT GET #2, Axs, Id.value main = main + 1: IF main > 5 THEN main = 1 weave = weave + 1: IF weave > 2 THEN weave = 1 F = ASC(Id.value) IF weave = 1 THEN F = F + 1 ELSE F = 256 - F END IF a = a + 6 b = b + 10 C = C + 13 d = d + 2 E = E + 7 RandStandard = RandStandard + 1: IF RandStandard > 3 THEN RandStandard = 0 IF RandStandard = 0 THEN RndSt = ASC(u1$) IF RandStandard = 1 THEN RndSt = ASC(u2$) IF RandStandard = 2 THEN RndSt = ASC(u3$) IF RandStandard = 3 THEN RndSt = ASC(u4$) IF a > 100 THEN a = 1 IF b > 47 THEN b = 1 IF C > 69 THEN C = 1 IF d > 250 THEN d = 1 IF E > 216 THEN E = 1 '====================================================== IF main = 1 THEN K = a + INT(RndSt / 2) IF main = 2 THEN K = b + INT(RndSt / 2) IF main = 3 THEN K = C + INT(RndSt / 2) IF main = 4 THEN K = d + INT(RndSt / 2) IF main = 5 THEN K = E + INT(RndSt / 2) '========Begginning of code============================ w = (K + F) / 255 w1 = INT((K + F) / 255) IF w = w1 THEN F = w END IF IF w > w1 THEN COLOR 3 F = 255 - ((F + K) - ((w1 * 255) + w1 + 1)) END IF IF F > 255 THEN F = F - 256 Id.value = CHR$(FIX(F)) PUT #2, Axs, Id.value '======== End of code ============================ '====================================================== NEXT CLOSE #1, 2 KILL Snd$ NAME "temp2.na" AS Snd$ END SUB SUB SendDel (Rfk$, Snd$) SendDec Snd$ NoBreak 'This is the data manipulation CLS How = 0 OPEN "i", #1, Snd$ WHILE NOT EOF(1) INPUT #1, a$, b$, C$, d$ How = How + 1 WEND CLOSE #1 IF How = 0 THEN CLS COLOR 15 PRINT "You have no keys!" COLOR 8 PRINT "To add keys to send.dat, goto Import and hit , then" PRINT "select the keys you want to add, then hit 'Done.' to continue." COLOR 7 PRINT "Hit a key to continue.." DO: LOOP UNTIL INKEY$ <> "" SendEnc Snd$ EXIT SUB END IF DIM Names$(How + 1) DIM Code$(How) DIM Pwd$(How) DIM Pub$(How) DIM sel(How + 1) How = 0 OPEN "i", #1, Snd$ WHILE NOT EOF(1) INPUT #1, a$, b$, C$, d$ How = How + 1 Code$(How) = a$ Names$(How) = b$ Pwd$(How) = C$ Pub$(How) = d$ sel(How) = 0 WEND Names$(How + 1) = "Done." sel(How + 1) = 2 How = How + 1 CLOSE #1 SendEnc Snd$ 'EODM ' '''''''''''''''''''''''''''''''''''''''''''''''''' ' CLS SCREEN 12 inst2 FOR iV = 5 TO 280 PSET (iV, 30), 7 PSET (iV, 160), 7 NEXT iV FOR iV = 30 TO 160 PSET (5, iV), 7 PSET (280, iV), 7 NEXT iV LOCATE 1: COLOR 7: PRINT "MSE - Maximum Security Encrypiton" LOCATE , 2 'PSET (5, 30), 11 'PSET (280, 30), 11 'PSET (5, 160), 11 'PSET (280, 160), 11 SetPal 1, &H46, &H6E, &H64 COLOR 1 LOCATE 12, 2 msg$ = "Hit the button to select this key." PRINT msg$ 'H /\ 'P \/ a = 1 baser = 1 ba = baser + 7 up = 1 cnt = 1 FOR i = 1 TO How LOCATE up + 2, 2 '-------------------------------- ' IF How <> 0 THEN of5 = INT((a * 5) / How) END IF of5 = of5 + 1 '*** This is the up arrow PSET (285, 35), 7 PSET (286, 35), 7 PSET (284, 36), 7 PSET (285, 36), 7 PSET (286, 36), 7 PSET (287, 36), 7 PSET (283, 37), 7 PSET (284, 37), 7 PSET (285, 37), 7 PSET (286, 37), 7 PSET (287, 37), 7 PSET (288, 37), 7 PSET (283, 38), 7 PSET (284, 38), 7 PSET (285, 38), 7 PSET (286, 38), 7 PSET (287, 38), 7 PSET (288, 38), 7 '*** This is the down arrow PSET (283, 140), 7 PSET (284, 140), 7 PSET (285, 140), 7 PSET (286, 140), 7 PSET (287, 140), 7 PSET (288, 140), 7 PSET (283, 141), 7 PSET (284, 141), 7 PSET (285, 141), 7 PSET (286, 141), 7 PSET (287, 141), 7 PSET (288, 141), 7 PSET (284, 142), 7 PSET (285, 142), 7 PSET (286, 142), 7 PSET (287, 142), 7 PSET (285, 143), 7 PSET (286, 143), 7 '***This is the graphic to show where in the list you are IF How >= 6 THEN FOR iV = 42 TO 56 PSET (284, iV), 11 PSET (285, iV), 11 PSET (286, iV), 11 PSET (287, iV), 11 NEXT FOR iV = 43 TO 56 PSET (285, iV), 3 PSET (286, iV), 3 PSET (287, iV), 3 NEXT END IF FOR iV = 283 TO 288 PSET (iV, 40), 7 PSET (iV, 138), 7 NEXT FOR iV = 40 TO 138 PSET (283, iV), 7 PSET (288, iV), 7 NEXT REDIM sBar(1000) GET (284, 42)-(287, 56), sBar ' '-------------------------------- IF i = a THEN COLOR 15 ELSE COLOR 8 END IF IF cnt >= baser AND cnt <= ba THEN IF LEN(Names$(i)) > 34 THEN Names$(i) = MID$(Names$(i), 1, 32) + ".." END IF PRINT Names$(i) up = up + 1 END IF cnt = cnt + 1 NEXT i COLOR 7 LOCATE 13, 1: PRINT a; "of"; How DO i$ = INKEY$ IF i$ <> "" THEN IF i$ = CHR$(13) THEN IF sel(a) = 0 THEN tme = 1 END IF IF sel(a) = 1 THEN tme = 0 END IF IF sel(a) = 2 THEN tme = 2 'SEND CONTROL TO NEXT LEVEL GOTO 617 CLS END IF sel(a) = tme END IF IF i$ = CHR$(27) THEN EXIT SUB IF i$ = CHR$(0) + "H" THEN a = a - 1 IF a < 1 THEN a = 1 IF a < baser THEN baser = baser - 1 ba = baser + 7 COLOR 7 LOCATE 13, 1: PRINT a; "of"; How END IF IF i$ = CHR$(0) + "P" THEN a = a + 1 IF a > How THEN a = How IF a > ba THEN baser = baser + 1 ba = baser + 7 COLOR 7 LOCATE 13, 1: PRINT a; "of"; How END IF IF How <> 0 THEN of5 = INT((a * 5) / How) END IF of5 = of5 + 1 'HP '42 '58 '74 '90 IF of5 = 1 THEN Plc = 42 IF of5 = 2 THEN Plc = 58 IF of5 = 3 THEN Plc = 74 IF of5 = 4 THEN Plc = 90 IF of5 = 5 THEN Plc = 106 IF of5 = 6 THEN Plc = 122 IF How >= 6 THEN IF (Xplc <> Plc) AND (Lx <> of5) THEN LINE (284, 42)-(287, 136), 0, BF PUT (284, Plc), sBar, PSET END IF END IF Lx = of5 Xplc = Plc up = 1 cnt = 1 FOR i = 1 TO How LOCATE up + 2, 2 IF cnt >= baser AND cnt <= ba THEN IF i = a THEN IF sel(i) = 0 THEN msg$ = "Hit the button to select this key. " END IF IF sel(i) = 1 THEN msg$ = "Hit the button to deselect this key. " END IF IF sel(i) = 2 THEN msg$ = "Hit the button to continue.. " END IF SetPal 1, &H46, &H6E, &H64 COLOR 1 LOCATE 12, 2: PRINT msg$ COLOR 15 END IF IF i <> a THEN IF sel(i) = 0 THEN COLOR 8 IF sel(i) = 1 THEN COLOR 7 IF sel(i) = 2 THEN COLOR 8 END IF LOCATE up + 2, 2 PRINT Names$(i) + STRING$(34 - LEN(Names$(i)), " ") up = up + 1 END IF cnt = cnt + 1 tot = tot + 1 NEXT i END IF LOOP 617 ' '''''''''''''''''''''''''''''''''''''''''''''''''' ' '''' '''' FIX NEW DAT BEFORE REENCRYPTION '''' How = How - 1 Gan = 0 FOR ix = 1 TO How Gan = Gan + sel(ix) NEXT IF Gan = 0 THEN EXIT SUB SendDec Snd$ OPEN "o", #1, Snd$ FOR i = 1 TO How IF sel(i) <> 1 THEN WRITE #1, Code$(i), Names$(i), Pwd$(i), Pub$(i) END IF NEXT i CLOSE #1 '''' '''' SendEnc Snd$ END SUB SUB SendEnc (Snd$) NoBreak ON ERROR GOTO SendErr DIM Id AS Byte RandStandard = 0: RndSt = 0 TIMER ON TI = TIMER Bps = TIMER CLS : main = 1: weave = 1 CLOSE #1, 2 OPEN Snd$ FOR BINARY AS #1 OPEN "o", #2, "temp1.na": CLOSE #2 OPEN "temp1.na" FOR BINARY AS #2 'Impliment random 4letter string called b$ and split it into u1$, u2$, u3$, and u4$ randsee1 u1$, u2$, u3$, u4$ FOR i = 1 TO 3 GET #1, i, Id.value ni$ = ni$ + Id.value NEXT i IF ni$ = "MSE" THEN CLS PRINT "This file is already encrypted." END END IF: ni$ = "" ''''''''''''''''''''''' ' Xc = -7 xF = 23 SCREEN 12 LOCATE 1: COLOR 15: PRINT "Editing Send.dat" PRINT FOR iQ = 11 TO 639 PSET (iQ, 19), 7 NEXT iQ '*** This is the box incircling the percentage FOR aX = 6 TO 98 PSET (aX - Xc, 57 - xF), 7 PSET (aX - Xc, 67 - xF), 7 NEXT FOR aX = 57 TO 67 PSET (6 - Xc, aX - xF), 7 PSET (98 - Xc, aX - xF), 7 NEXT '*** This is the percentage guages FOR Dx = 8 TO 15 FOR Fx = 59 TO 65 PSET (Dx - Xc, Fx - xF), 12 NEXT NEXT FOR Dx = 9 TO 15 FOR Fx = 60 TO 65 PSET (Dx - Xc, Fx - xF), 4 NEXT NEXT DIM PiX(1000) GET (8 - Xc, 59 - xF)-(15 - Xc, 65 - xF), PiX LOCATE 3, 20 COLOR 8 PRINT "Editing the Send.dat data file. " LOCATE , 20 PRINT "Please wait while this process" LOCATE , 20 PRINT "is being completed." ' ''''''''''''''''''''''' FOR Axs = 1 TO LOF(1) nT = INT((Axs * 9) / LOF(1)) IF XnT <> nT THEN PUT ((8 + (9 * nT)) - Xc, 59 - xF), PiX, PSET END IF XnT = nT GET #1, Axs, Id.value F = ASC(Id.value) main = main + 1: IF main > 5 THEN main = 1 weave = weave + 1: IF weave > 2 THEN weave = 1 a = a + 6 b = b + 10 C = C + 13 d = d + 2 E = E + 7 RandStandard = RandStandard + 1: IF RandStandard > 3 THEN RandStandard = 0 IF RandStandard = 0 THEN RndSt = ASC(u1$) IF RandStandard = 1 THEN RndSt = ASC(u2$) IF RandStandard = 2 THEN RndSt = ASC(u3$) IF RandStandard = 3 THEN RndSt = ASC(u4$) IF a > 100 THEN a = 1 IF b > 47 THEN b = 1 IF C > 69 THEN C = 1 IF d > 250 THEN d = 1 IF E > 216 THEN E = 1 '====================================================== IF main = 1 THEN K = a + INT(RndSt / 2) IF main = 2 THEN K = b + INT(RndSt / 2) IF main = 3 THEN K = C + INT(RndSt / 2) IF main = 4 THEN K = d + INT(RndSt / 2) IF main = 5 THEN K = E + INT(RndSt / 2) '========Begginning of code============================ F = ASC(Id.value) h = (K + F) / 255 h1 = INT((K + F) / 255) IF h = h1 THEN 'number is dividend int F = 255 - h + 1 END IF IF h > h1 THEN 'this is what we need F = (K + F) - (h1 * 255) - h1 END IF IF F > 255 AND F <= 510 THEN F = ABS(F - 255) IF weave = 1 THEN F = 255 - F ELSE F = F END IF IF F > 255 AND F <= 510 THEN F = ABS(F - 255) IF F = -1 THEN F = 255 Id.value = CHR$(FIX(F)) '======== End of code ============================ '====================================================== PUT #2, Axs + 7, Id.value NEXT Id.value = "M" PUT #2, 1, Id.value Id.value = "S" PUT #2, 2, Id.value Id.value = "E" PUT #2, 3, Id.value Id.value = u1$ PUT #2, 4, Id.value Id.value = u2$ PUT #2, 5, Id.value Id.value = u3$ PUT #2, 6, Id.value Id.value = u4$ PUT #2, 7, Id.value CLS ntime = TIMER - TI Bps = TIMER - Bps TI = TIMER CLOSE #1, 2 KILL Snd$ NAME "temp1.na" AS Snd$ END SUB SUB SetPal (Col%, r%, G%, b%) OUT &H3C8, Col% OUT &H3C9, r% OUT &H3C9, b% OUT &H3C9, G% END SUB SUB TgtStr (aR, bR, cR, tY$) a$ = "" IF aR < 10 THEN a$ = a$ + "0" + STR$(aR) ELSE a$ = a$ + STR$(aR) END IF a$ = a$ + ":" IF bR < 10 THEN a$ = a$ + "0" + STR$(bR) ELSE a$ = a$ + STR$(bR) END IF a$ = a$ + ":" IF cR < 10 THEN a$ = a$ + "0" + STR$(cR) ELSE a$ = a$ + STR$(cR) END IF 'Tighten loose ends tY$ = "" FOR i = 1 TO LEN(a$) IF MID$(a$, i, 1) <> " " THEN tY$ = tY$ + MID$(a$, i, 1) END IF NEXT i tY$ = " " + tY$ END SUB SUB Tips (Rcd$) '*** Tip of the day, if there is one *** ON ERROR GOTO RecErr FileNames Rfk$, Snd$, Rcd$ OPEN "i", #1, Rcd$ INPUT #1, cB CLOSE #1 Tip = cB IF Tip = 1 THEN LOCATE 14, 15 COLOR 15 PRINT "Welcome" LOCATE 15, 16 COLOR 7 PRINT "Hello new user! To get started, you should first" LOCATE , 16 PRINT "create a key. Once you have done this you can export" LOCATE , 16 PRINT "your keys to friends, import thier keys, encrypt and" LOCATE , 16 PRINT "decrypt files." FOR Kx = 113 TO 538 PSET (Kx, 220), 8 PSET (Kx, 293), 8 NEXT FOR Kx = 220 TO 293 PSET (113, Kx), 8 PSET (538, Kx), 8 NEXT END IF IF Tip = 2 THEN LOCATE 14, 15 COLOR 15 PRINT "Information" LOCATE 15, 16 COLOR 7 PRINT "The last time you were here, rfk.dat had problems" LOCATE , 16 PRINT "with bad data. It has been cleaned and reset to" LOCATE , 16 PRINT "defaults, meaning any keys you had in it are gone." LOCATE , 16 PRINT "" FOR Kx = 113 TO 538 PSET (Kx, 220), 8 PSET (Kx, 275), 8 NEXT FOR Kx = 220 TO 275 PSET (113, Kx), 8 PSET (538, Kx), 8 NEXT END IF IF Tip = 3 THEN LOCATE 14, 15 COLOR 15 PRINT "Information" LOCATE 15, 16 COLOR 7 PRINT "The last time you were here, send.dat had problems" LOCATE , 16 PRINT "with bad data. It has been cleaned and reset to" LOCATE , 16 PRINT "defaults, meaning any keys you had in it are gone." LOCATE , 16 PRINT "" FOR Kx = 113 TO 538 PSET (Kx, 220), 8 PSET (Kx, 275), 8 NEXT FOR Kx = 220 TO 275 PSET (113, Kx), 8 PSET (538, Kx), 8 NEXT END IF IF Tip = 4 THEN LOCATE 14, 15 COLOR 15 PRINT "Information" LOCATE 15, 16 COLOR 7 PRINT "The last time you were here, rfk.dat was not found." LOCATE , 16 PRINT "The program created a new rfk.dat with no keys in" LOCATE , 16 PRINT "it. If rfk.dat was in another directory, copy the" LOCATE , 16 PRINT "file back to the directory this program is in." FOR Kx = 113 TO 538 PSET (Kx, 220), 8 PSET (Kx, 293), 8 NEXT FOR Kx = 220 TO 293 PSET (113, Kx), 8 PSET (538, Kx), 8 NEXT END IF IF Tip = 5 THEN LOCATE 14, 15 COLOR 15 PRINT "Information" LOCATE 15, 16 COLOR 7 PRINT "The last time you were here, send.dat was not found." LOCATE , 16 PRINT "The program created a new send.dat with no keys in" LOCATE , 16 PRINT "it. If send.dat was in another directory, copy the" LOCATE , 16 PRINT "file back to the directory this program is in." FOR Kx = 113 TO 538 PSET (Kx, 220), 8 PSET (Kx, 293), 8 NEXT FOR Kx = 220 TO 293 PSET (113, Kx), 8 PSET (538, Kx), 8 NEXT END IF OPEN "o", #1, Rcd$ cB = 0 WRITE #1, cB CLOSE #1 END SUB