1000 '***** DELMEXPW.BAS - Delete passwords from MEX .PHN files ***** 1010 DEFINT A-Z: PRINT: PRINT "DELMEXPW.BAS, version 1.01 by Bill Norris": PRINT 1020 PRINT "This program will make a copy of a MEX '.PHN' file which" 1030 PRINT "has all password comments removed. Comments coming before" 1040 PRINT "the string '/pwd' remain intact. Characters including" 1050 PRINT "'/pwd' and extending to the baud rate (if any) are deleted." 1060 PRINT: INPUT "Enter input filename: ", FILI$ 1070 ON ERROR GOTO 1080: OPEN "i",#1,FILI$: ON ERROR GOTO 0: GOTO 1110 1080 RESUME 1090 1090 CLOSE: PRINT "***** ERROR ***** (file not found): goto 1010 1100 ' 1110 INPUT "Enter output filename: ", FILO$: OPEN "o", #2, FILO$ 1120 IF EOF(1) THEN PRINT: PRINT "***** End of file *****": CLOSE: GOTO 1060 1130 LINE INPUT #1,X$: IF X$ = "" THEN PRINT #2, "": GOTO 1120 1140 X = INSTR(X$,"/") 1150 IF X = 0 THEN PRINT #2, X$: PRINT X$: GOTO 1120 1160 ' 1170 PW$ = MID$(X$,X+1,3): PWD$ = "" 1180 FOR I = 1 TO 3 1190 P$ = MID$(PW$,I,1): P = ASC(P$) 1200 IF P$ >= "a" AND P$ <= "z" THEN P = P - 32 1210 PWD$ = PWD$ + CHR$(P) 1220 NEXT I 1230 ' 1240 IF PWD$ <> "PWD" THEN X = 0: GOTO 1150 1250 Y = INSTR(X$,"Baud"): Y$ = LEFT$(X$,X+3) 1260 IF Y = 0 THEN X = 0: SWAP X$, Y$: GOTO 1150 1270 Y = Y - 2 1280 Y = Y - 1: IF MID$(X$,Y,1) <> " " THEN GOTO 1280 1290 X$ = Y$ + MID$(X$,Y): X = 0: GOTO 1150