S- - 11


IF INSTR(plainf$, "*.") THEN

IF INSTR(oldplainf$, ".") THEN

plainf$ = LEFT$(plainf$, INSTR(plainf$, "*.") - 1) + LEFT$(oldplainf$, INSTR(oldplainf$, ".")) + RIGHT$(plainf$, LEN(plainf$) - INSTR(plainf$, "*.") - 1)

ELSE

plainf$ = LEFT$(plainf$, INSTR(plainf$, "*.") - 1) + oldplainf$ + RIGHT$(plainf$, LEN(plainf$) - INSTR(plainf$, "*."))

END IF

END IF

IF (RIGHT$(plainf$, 1) = "*") THEN

IF plainf$ = "*" THEN

plainf$ = oldplainf$

ELSE

IF (MID$(plainf$, LEN(plainf$) - 1, 1) = ".") THEN

plainf$ = LEFT$(plainf$, INSTR(plainf$, ".") - 1) +

RIGHT$(oldplainf$, LEN(oldplainf$) -

INSTR(oldplainf$, ".") + 1)

ELSE

plainf$ = LEFT$(plainf$, LEN(plainf$) - 1) + oldplainf$

END IF

END IF

END IF

IF RIGHT$(plainf$, 1) = "\" THEN plainf$ = plainf$ + oldplainf$

18.4

OPEN plainf$ FOR RANDOM AS 2

IF LOF(2) > 0 THEN

CLOSE #2

PRINT : PRINT " !"

SYSTEM

ELSE

CLOSE #2

OPEN plainf$ FOR BINARY AS 2

END IF

plaintekst$ = ""

blocks& = (LOF(1) \ 8) - 3

LOCATE rescue% + 11, 21: PRINT ; " : 0 %";

bigblocks&=(blocks&-1) \ 32

large$=space$(256)

FOR m& = 1 TO bigblocks&

outblock$=""

get$ #1,256,large$

for o%=1 to 256 step 8

outblock$=outblock$+desalg$(mid$(large$,o%,8))

next

put$ #2,outblock$

LOCATE rescue% + 11, 32: PRINT ; USING "###"; (m& / (bigblocks&+1)) * 100;

next

FOR n& = (bigblocks&*32)+1 TO blocks& - 1

GET$ #1,8,ciphertekst$

plaintekst$ = desalg$(ciphertekst$)

PUT$ #2, plaintekst$

LOCATE rescue% + 11, 32: PRINT ; USING "###"; (n& / blocks&) * 100;

NEXT n&

get$ #1,8,ciphertekst$

if len(ciphertekst$) > 0 then

plaintekst$ = desalg$(ciphertekst$)

IF rescue% THEN

last$ = plaintekst$