bas/BAS/M_VIRUS.BAS
2021-09-03 17:42:07 +02:00

1625 lines
47 KiB
QBasic
Raw Blame History

DECLARE SUB BackSpace ()
DECLARE FUNCTION GetString2$ (start$, end$, Vis%, Max%, row%, col%)
DECLARE SUB Simulador ()
'
' Q B a s i c J D ___ V I R U S M O D I F I C A D O R
'
' Copyright (C) Microsoft JD Corporation 1993
'Set default data type to integer for faster operation
DEFINT A-Z
'Sub and function declarations
DECLARE SUB Initialize ()
DECLARE SUB Center (row%, text$)
DECLARE SUB FancyCls (dots%, Background%)
DECLARE SUB LoadState ()
DECLARE SUB SaveState ()
DECLARE SUB MenuSystem ()
DECLARE SUB box (Row1%, col1%, Row2%, Col2%)
DECLARE SUB EditAccounts ()
DECLARE SUB PrintHelpLine (help$)
DECLARE SUB EditTrans (item%)
DECLARE FUNCTION Cvit$ (X%)
DECLARE FUNCTION Menu% (CurrChoiceX%, MaxChoice%, choice$(), ItemRow%(), ItemCol%(), help$(), BarMode%)
DECLARE FUNCTION GetString$ (row%, col%, start$, end$, Vis%, Max%)
'Constants
CONST TRUE = -1
CONST FALSE = NOT TRUE
'Global variables
DIM SHARED ColorPref, CurrRowt 'Color Preference
DIM SHARED colors(0 TO 20, 1 TO 4) 'Different Colors
DIM SHARED PrintErr AS INTEGER 'Printer error flag
DEF SEG = 0 ' Turn off CapLock, NumLock and ScrollLock
KeyFlags = PEEK(1047)
POKE 1047, &H0
DEF SEG
'Open money manager data file. If it does not exist in current directory,
' goto error handler to create and initialize it.
ON ERROR GOTO ErrorTrap
OPEN "M_VIR.INI" FOR INPUT AS #1
CLOSE
ON ERROR GOTO 0 'Reset error handler
Initialize 'Initialize program
MenuSystem 'This is the main program
COLOR 7, 0 'Clear screen and end
CLS
DEF SEG = 0 ' Restore CapLock, NumLock and ScrollLock states
POKE 1047, KeyFlags
DEF SEG
END
' Error handler for program
' If data file not found, create and initialize a new one.
ErrorTrap:
SELECT CASE ERR
' If data file not found, create and initialize a new one.
CASE 53
CLOSE
ColorPref = 1
SaveState
RESUME
CASE 24, 25
PrintErr = TRUE
box 8, 13, 14, 69
Center 11, "La impresora no responde ... Presione Barra espaciadora para continuar"
WHILE INKEY$ <> "": WEND
WHILE INKEY$ <> " ": WEND
RESUME NEXT
CASE ELSE
END SELECT
RESUME NEXT
'The following data defines the color schemes available via the main menu.
'
' scrn dots bar back title shdow choice curs cursbk shdow
DATA 0, 7, 15, 7, 0, 7, 0, 15, 0, 0
DATA 1, 9, 12, 3, 0, 1, 15, 0, 7, 0
DATA 3, 15, 13, 1, 14, 3, 15, 0, 7, 0
DATA 7, 12, 15, 4, 14, 0, 15, 15, 1, 0
datas:
DATA DIR,1,COPY,2,CLS,3,TYPE,4,JD,5,TIME,6,DATE,7,"A:",8,"B:",9
DATA *,*
SUB BackSpace
REDIM help$(4), col(4), Vis(4), Max(4), CurrString$(1), CurrFig#(3)
'Array to keep the current balance at all the transactions
COLOR colors(10, ColorPref), colors(6, ColorPref)
FOR k = 2 TO 24: LOCATE k, 1: PRINT SPACE$(80); : NEXT
'Open random access file
OPEN "Crack.dat" FOR RANDOM AS #1 LEN = 58
FIELD #1, 2 AS IoA$, 2 AS IoR$, 1 AS IoT$, 50 AS IoMen$
FIELD #1, 1 AS valid$, 2 AS IoMaxRecord$
'Initialize variables
CurrFig#(1) = 0
CurrFig#(2) = 0
CurrFig#(3) = 0
CurrString$(1) = ""
GET #1, 39
IF valid$ <> "*" THEN
LSET IoA$ = ""
LSET IoR$ = ""
LSET IoT$ = ""
LSET IoMen$ = ""
PUT #1, 39 + 1
LSET valid$ = "*"
LSET IoMaxRecord$ = "1"
PUT #1, 39
END IF
MaxRecord = VAL(IoMaxRecord$)
help$(1) = "Acci<63>n 0, 1 a 19, 20 a 30 "
help$(2) = "Inicio en Return's VACIOS "
help$(3) = "Duraci<63>n en Return's VACIOS "
help$(4) = "Mensaje en Caso de Accion=0 "
col(1) = 2: Vis(1) = 5: Max(1) = 2
col(2) = 8: Vis(2) = 3: Max(2) = 2
col(3) = 13: Vis(3) = 3: Max(3) = 1
col(4) = 17: Vis(4) = 50: Max(4) = 50
'Draw Screen
COLOR colors(7, ColorPref), colors(4, ColorPref)
box 2, 1, 24, 67
box 2, 68, 24, 80
LOCATE 3, 69: PRINT "20 Sopa ";
LOCATE 5, 69: PRINT "21 Warning ";
LOCATE 7, 69: PRINT "22 ";
LOCATE 9, 69: PRINT "23 ";
LOCATE 11, 69: PRINT "24 ";
LOCATE 13, 69: PRINT "25 ";
LOCATE 15, 69: PRINT "26 ";
LOCATE 17, 69: PRINT "27 ";
LOCATE 19, 69: PRINT "28 ";
LOCATE 21, 69: PRINT "29 ";
LOCATE 23, 69: PRINT "30 ";
COLOR colors(5, ColorPref), colors(4, ColorPref)
LOCATE 1, 1: PRINT SPACE$(80);
LOCATE 1, 6: PRINT "Modificador de Comandos de JD_Virus Simuler, por JD..."
COLOR colors(7, ColorPref), colors(4, ColorPref)
LOCATE 3, 2: PRINT " A <20> <<3C> <20> T <20> Mensaje: "
LOCATE 4, 2: PRINT "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
u1x$ = "<22><><EFBFBD><EFBFBD>߳<EFBFBD><DFB3><EFBFBD>߳<EFBFBD><DFB3>߳<EFBFBD><DFB3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
u1$ = " <20> <20> <20> "
CurrTopline = 1
CurrRow = 1
CurrCol = 1
GOSUB TransPrintWholeScreen
PrintHelpLine help$(CurrCol) + "| <F2=Guardar y Salir> <F9=Insert> <F10=Supr>"
GOSUB TransGetLine
GOSUB TransPrintLine
finished = FALSE
'Loop until <F2> is pressed
DO
GOSUB TransShowCursor 'Show Cursor, Wait for key
DO: Kbd$ = INKEY$: LOOP UNTIL Kbd$ <> ""
GOSUB TransHideCursor
IF Kbd$ >= " " AND Kbd$ < "~" OR Kbd$ = CHR$(8) THEN 'If legal key, edit item
GOSUB TransEditItem
END IF
SELECT CASE Kbd$ 'Handle Special keys
CASE CHR$(0) + "H" 'up arrow
GOSUB TransMoveUp
CASE CHR$(0) + "P" 'Down arrow
GOSUB TransMoveDown
CASE CHR$(0) + "K", CHR$(0) + CHR$(15) 'Left Arrow,BackTab
CurrCol = CurrCol - 1
IF CurrCol = 0 THEN CurrCol = 4
PrintHelpLine help$(CurrCol) + "| <F2=Guardar y Salir> <F9=Insert> <F10=Supr>"
CASE CHR$(0) + "M", CHR$(9) 'Right Arrow,Tab
CurrCol = (CurrCol) MOD 4 + 1
PrintHelpLine help$(CurrCol) + "| <F2=Guardar y Salir> <F9=Insert> <F10=Supr>"
CASE CHR$(0) + "G" 'Home
CurrCol = 1
CASE CHR$(0) + "O" 'End
CurrCol = 5
CASE CHR$(0) + "<" 'F2
finished = TRUE
CASE CHR$(0) + "C" 'F9
GOSUB TransAddRecord
CASE CHR$(0) + "D" 'F10
GOSUB TransDeleteRecord
CASE CHR$(13) 'Enter
CASE ELSE
BEEP
END SELECT
LOOP UNTIL finished
CLOSE
EXIT SUB
TransShowCursor:
COLOR colors(8, ColorPref), colors(9, ColorPref)
LOCATE CurrRow + 4, col(CurrCol)
SELECT CASE CurrCol
CASE 1
IF CurrFig#(1) <> 0 THEN PRINT " "; : PRINT USING "##"; CurrFig#(1); : PRINT " "; ELSE PRINT " ";
CASE 2
IF CurrFig#(2) <> 0 THEN PRINT " "; : PRINT USING "##"; CurrFig#(2); : PRINT " "; ELSE PRINT " ";
CASE 3
IF CurrFig#(3) <> 0 THEN PRINT " "; : PRINT USING "#"; CurrFig#(3); : PRINT " "; ELSE PRINT " ";
CASE 4
IF LTRIM$(RTRIM$(CurrString$(1))) <> "" THEN PRINT CurrString$(1); ELSE PRINT " ";
END SELECT
RETURN
TransHideCursor:
COLOR colors(7, ColorPref), colors(4, ColorPref)
LOCATE CurrRow + 4, col(CurrCol)
SELECT CASE CurrCol
CASE 1
IF CurrFig#(1) <> 0 THEN PRINT " "; : PRINT USING "##"; CurrFig#(1); : PRINT " "; ELSE PRINT " ";
CASE 2
IF CurrFig#(2) <> 0 THEN PRINT " "; : PRINT USING "##"; CurrFig#(2); : PRINT " "; ELSE PRINT " ";
CASE 3
IF CurrFig#(3) <> 0 THEN PRINT " "; : PRINT USING "#"; CurrFig#(3); : PRINT " "; ELSE PRINT " ";
CASE 4
IF LTRIM$(RTRIM$(CurrString$(1))) <> "" THEN PRINT CurrString$(1); ELSE PRINT " ";
END SELECT
RETURN
TransEditItem:
CurrRecord = CurrTopline + CurrRow - 1
COLOR colors(8, ColorPref), colors(9, ColorPref)
SELECT CASE CurrCol
CASE 1
DO
Kbd$ = GetString$(CurrRow + 4, col(1), Kbd$, new$, Vis(1), Max(1))
CurrFig#(1) = VAL(new$)
LOOP WHILE VAL(new$) <= -1 OR VAL(new$) > 30
GOSUB TransPutLine
GOSUB TransGetLine
CASE 2
DO
Kbd$ = GetString$(CurrRow + 4, col(2), Kbd$, new$, Vis(2), Max(2))
CurrFig#(2) = VAL(new$)
LOOP WHILE VAL(new$) < 0 OR VAL(new$) > 99
GOSUB TransPutLine
GOSUB TransGetLine
CASE 3
DO
Kbd$ = GetString$(CurrRow + 4, col(3), Kbd$, new$, Vis(3), Max(3))
CurrFig#(3) = VAL(new$)
LOOP WHILE VAL(new$) < 0 OR VAL(new$) > 9
GOSUB TransPutLine
GOSUB TransGetLine
CASE 4
Kbd$ = GetString$(CurrRow + 4, col(4), Kbd$, new$, Vis(4), Max(4))
CurrString$(1) = new$
GOSUB TransPutLine
GOSUB TransGetLine
CASE ELSE
END SELECT
GOSUB TransPrintLine
RETURN
TransMoveUp:
IF CurrRow = 1 THEN
IF CurrTopline = 1 THEN
BEEP
ELSE
CurrTopline = 19
GOSUB TransGetLine
END IF
ELSE
CurrRow = CurrRow - 1
GOSUB TransGetLine
END IF
GOSUB TransPrintLine
RETURN
TransMoveDown:
IF (CurrRow + CurrTopline - 1) >= MaxRecord THEN
BEEP
ELSE
IF CurrRow = 19 THEN
CurrTopline = 1
GOSUB TransGetLine
ELSE
CurrRow = CurrRow + 1
GOSUB TransGetLine
END IF
END IF
GOSUB TransPrintLine
RETURN
TransPrintLine:
COLOR colors(7, ColorPref), colors(4, ColorPref)
CurrRecord = CurrTopline + CurrRow - 1
LOCATE CurrRow + 4, 2
IF CurrRecord = MaxRecord + 1 THEN
PRINT u1x$;
ELSEIF CurrRecord > MaxRecord THEN
PRINT u1$;
ELSE
IF CurrFig#(1) <> 0 THEN PRINT " "; : PRINT USING "##"; CurrFig#(1); : PRINT " <20>"; ELSE PRINT " <20>";
IF CurrFig#(2) <> 0 THEN PRINT " "; : PRINT USING "##"; CurrFig#(2); : PRINT " <20>"; ELSE PRINT " <20>";
IF CurrFig#(3) <> 0 THEN PRINT " "; : PRINT USING "#"; CurrFig#(3); : PRINT " <20>"; ELSE PRINT " <20>";
IF LTRIM$(RTRIM$(CurrString$(1))) <> "" THEN PRINT CurrString$(1); ELSE PRINT " ";
END IF
RETURN
TransDeleteRecord:
IF MaxRecord = 1 THEN
BEEP
ELSE
CurrRecord = CurrTopline + CurrRow - 1
MaxRecord = MaxRecord - 1
a = CurrRecord
WHILE a <= MaxRecord
GET #1, a + 2 + 39
PUT #1, a + 1 + 39
a = a + 1
WEND
LSET valid$ = "*"
LSET IoMaxRecord$ = RTRIM$(LTRIM$(STR$(MaxRecord)))
PUT #1, 39
GOSUB TransPrintWholeScreen
CurrRecord = CurrTopline + CurrRow - 1
IF CurrRecord > MaxRecord THEN
GOSUB TransMoveUp
END IF
GOSUB TransGetLine
END IF
LOCATE 1, 1: PRINT MaxRecord
RETURN
TransAddRecord:
temp = CurrRecord
CurrRecord = CurrTopline + CurrRow - 1
IF MaxRecord > 18 THEN
BEEP
CurrRecord = temp
ELSE
a = MaxRecord
WHILE a > CurrRecord
GET #1, a + 1 + 39
PUT #1, a + 2 + 39
a = a - 1
WEND
MaxRecord = MaxRecord + 1
LSET IoA$ = ""
LSET IoR$ = ""
LSET IoT$ = ""
LSET IoMen$ = ""
PUT #1, CurrRecord + 2 + 39
LSET valid$ = "*"
LSET IoMaxRecord$ = RTRIM$(LTRIM$(STR$(MaxRecord)))
PUT #1, 39
GOSUB TransPrintWholeScreen
GOSUB TransGetLine
END IF
LOCATE 1, 1: PRINT MaxRecord
RETURN
TransPrintWholeScreen:
temp = CurrRow
FOR CurrRow = 1 TO 19
CurrRecord = CurrTopline + CurrRow - 1
IF CurrRecord <= MaxRecord THEN
GOSUB TransGetLine
END IF
GOSUB TransPrintLine
NEXT CurrRow
CurrRow = temp
RETURN
TransPutLine:
CurrRecord = CurrTopline + CurrRow - 1
LSET IoA$ = LTRIM$(RTRIM$(STR$(CurrFig#(1))))
LSET IoR$ = LTRIM$(RTRIM$(STR$(CurrFig#(2))))
LSET IoT$ = LTRIM$(RTRIM$(STR$(CurrFig#(3))))
LSET IoMen$ = CurrString$(1)
PUT #1, CurrRecord + 1 + 39
RETURN
TransGetLine:
CurrRecord = CurrTopline + CurrRow - 1
GET #1, CurrRecord + 1 + 39
CurrFig#(1) = VAL(IoA$)
CurrFig#(2) = VAL(IoR$)
CurrFig#(3) = VAL(IoT$)
CurrString$(1) = IoMen$
RETURN
END SUB
'Box:
' Draw a box on the screen between the given coordinates.
SUB box (Row1, col1, Row2, Col2) STATIC
BoxWidth = Col2 - col1 + 1
LOCATE Row1, col1
PRINT "<22>"; STRING$(BoxWidth - 2, "<22>"); "<22>";
FOR a = Row1 + 1 TO Row2 - 1
LOCATE a, col1
PRINT "<22>"; SPACE$(BoxWidth - 2); "<22>";
NEXT a
LOCATE Row2, col1
PRINT "<22>"; STRING$(BoxWidth - 2, "<22>"); "<22>";
END SUB
'Center:
' Center text on the given row.
SUB Center (row, text$)
LOCATE row, 41 - LEN(text$) / 2
PRINT text$;
END SUB
'EditAccounts:
' This is the full-screen editor which allows you to change your account
' titles and descriptions
SUB EditAccounts
REDIM help$(6), col(6), Vis(6), Max(6), CurrString$(8), CurrRowt(2 TO 8)
'Array to keep the current balance at all the transactions
COLOR colors(10, ColorPref), colors(6, ColorPref)
FOR k = 2 TO 24: LOCATE k, 1: PRINT SPACE$(80); : NEXT
'Open random access file
OPEN "Crack.dat" FOR RANDOM AS #1 LEN = 113
FIELD #1, 10 AS IoDate$, 20 AS IoRef$, 20 AS IoDos$, 20 AS IoTres$, 20 AS IoCuatro$, 20 AS IoCinco$
FIELD #1, 1 AS valid$, 2 AS IoMaxRecord$
'Initialize variables
CurrString$(1) = ""
CurrString$(3) = ""
CurrString$(4) = ""
CurrString$(5) = ""
CurrString$(6) = ""
CurrString$(7) = ""
GET #1, 1
IF valid$ <> "*" THEN
LSET IoDate$ = ""
LSET IoRef$ = ""
LSET IoDos$ = ""
LSET IoTres$ = ""
LSET IoCuatro$ = ""
LSET IoCinco$ = ""
PUT #1, 2
LSET valid$ = "*"
LSET IoMaxRecord$ = "1"
PUT #1, 1
END IF
MaxRecord = VAL(IoMaxRecord$)
help$(1) = "Comando reaccionante... "
help$(2) = "Reaccion "
help$(3) = "Reaccion "
help$(4) = "Reaccion "
help$(5) = "Reaccion "
help$(6) = "Reaccion "
col(1) = 2: Vis(1) = 10: Max(1) = 10
col(2) = 21: CurrRowt(2) = 3: Vis(2) = 20: Max(2) = 20
col(3) = 21: CurrRowt(3) = 4: Vis(3) = 20: Max(3) = 20
col(4) = 21: CurrRowt(4) = 5: Vis(4) = 20: Max(4) = 20
col(5) = 21: CurrRowt(5) = 6: Vis(5) = 20: Max(5) = 20
col(6) = 21: CurrRowt(6) = 7: Vis(6) = 20: Max(6) = 20
CurrRowt = 3
'Draw Screen
COLOR colors(7, ColorPref), colors(4, ColorPref)
box 2, 1, 24, 12
box 2, 20, 8, 41
box 18, 20, 24, 51
LOCATE 19, 21: PRINT "? Pregunta de 1 digitos"
LOCATE 20, 21: PRINT "X# Respuesta a X, "
LOCATE 21, 21: PRINT "X% Futura ampliaci<63>n "
LOCATE 22, 21: PRINT "X! Futura ampliaci<63>n "
COLOR colors(5, ColorPref), colors(4, ColorPref)
LOCATE 1, 1: PRINT SPACE$(80);
LOCATE 1, 5: PRINT "Modificador de Comandos de JD_Virus Simuler, por JD..."
COLOR colors(7, ColorPref), colors(4, ColorPref)
LOCATE 3, 2: PRINT " Comando: "
LOCATE 4, 2: PRINT "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
u1x$ = "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
u1$ = " "
CurrTopline = 1
CurrRow = 1
CurrCol = 1
GOSUB EditTransPrintWholeScreen
PrintHelpLine help$(CurrCol) + "| <F2=Guardar y Salir> <F9=Insert> <F10=Supr>"
GOSUB EditTransGetLine
GOSUB EditTransPrintLine
finished = FALSE
'Loop until <F2> is pressed
DO
GOSUB EditTransShowCursor 'Show Cursor, Wait for key
DO: Kbd$ = INKEY$: LOOP UNTIL Kbd$ <> ""
GOSUB EditTransHideCursor
IF Kbd$ >= " " AND Kbd$ < "~" OR Kbd$ = CHR$(8) THEN 'If legal key, edit item
GOSUB EditTransEditItem
END IF
SELECT CASE Kbd$ 'Handle Special keys
CASE CHR$(0) + "H" 'up arrow
GOSUB EditTransMoveUp
CASE CHR$(0) + "P" 'Down arrow
GOSUB EditTransMoveDown
CASE CHR$(0) + "K", CHR$(0) + CHR$(15) 'Left Arrow,BackTab
CurrCol = (CurrCol + 3) MOD 5 + 1
PrintHelpLine help$(CurrCol) + "| <F2=Guardar y Salir> <F9=Insert> <F10=Supr>"
CASE CHR$(0) + "M", CHR$(9) 'Right Arrow,Tab
CurrCol = (CurrCol) MOD 5 + 1
PrintHelpLine help$(CurrCol) + "| <F2=Guardar y Salir> <F9=Insert> <F10=Supr>"
CASE CHR$(0) + "G" 'Home
CurrCol = 1
CASE CHR$(0) + "O" 'End
CurrCol = 5
CASE CHR$(0) + "<" 'F2
finished = TRUE
CASE CHR$(0) + "C" 'F9
GOSUB EditTransAddRecord
CASE CHR$(0) + "D" 'F10
GOSUB EditTransDeleteRecord
CASE CHR$(13) 'Enter
CASE ELSE
BEEP
END SELECT
LOOP UNTIL finished
CLOSE
EXIT SUB
EditTransShowCursor:
COLOR colors(8, ColorPref), colors(9, ColorPref)
LOCATE CurrRow + 4, col(CurrCol)
SELECT CASE CurrCol
CASE 1
PRINT LEFT$(CurrString$(CurrCol), Vis(CurrCol));
CASE 2, 3, 4, 5, 6
LOCATE CurrRowt, 21: PRINT LEFT$(CurrString$(CurrRowt), Vis(CurrCol));
END SELECT
RETURN
EditTransHideCursor:
COLOR colors(7, ColorPref), colors(4, ColorPref)
LOCATE CurrRow + 4, col(CurrCol)
SELECT CASE CurrCol
CASE 1
PRINT LEFT$(CurrString$(CurrCol), Vis(CurrCol));
CASE 2, 3, 4, 5, 6
LOCATE CurrRowt, 21: PRINT LEFT$(CurrString$(CurrRowt), Vis(CurrCol));
END SELECT
RETURN
EditTransEditItem:
CurrRecord = CurrTopline + CurrRow - 1
COLOR colors(8, ColorPref), colors(9, ColorPref)
SELECT CASE CurrCol
CASE 1
Kbd$ = GetString$(CurrRow + 4, col(CurrCol), Kbd$, new$, Vis(CurrCol), Max(CurrCol))
CurrString$(CurrCol) = new$
GOSUB EditTransputLine
GOSUB EditTransGetLine
CASE 2, 3, 4, 5, 6
Kbd$ = GetString$(CurrRowt, 21, Kbd$, new$, Vis(CurrCol), Max(CurrCol))
CurrString$(CurrRowt) = new$
GOSUB EditTransputLine
GOSUB EditTransGetLine
CASE ELSE
END SELECT
GOSUB EditTransPrintLine
RETURN
EditTransMoveUp:
IF CurrCol >= 2 THEN
IF CurrRowt = 3 THEN
CurrRowt = 7
ELSE
CurrRowt = CurrRowt - 1
END IF
ELSE
IF CurrRow = 1 THEN
IF CurrTopline = 1 THEN
BEEP
ELSE
CurrTopline = 19
GOSUB EditTransGetLine
END IF
ELSE
CurrRow = CurrRow - 1
GOSUB EditTransGetLine
END IF
END IF
GOSUB EditTransPrintLine
RETURN
EditTransMoveDown:
IF CurrCol >= 2 THEN
IF CurrRowt = 7 THEN
CurrRowt = 3
ELSE
CurrRowt = CurrRowt + 1
END IF
ELSE
IF (CurrRow + CurrTopline - 1) >= MaxRecord THEN
BEEP
ELSE
IF CurrRow = 19 THEN
CurrTopline = 1
GOSUB EditTransGetLine
ELSE
CurrRow = CurrRow + 1
GOSUB EditTransGetLine
END IF
END IF
END IF
GOSUB EditTransPrintLine
RETURN
EditTransPrintLine:
COLOR colors(7, ColorPref), colors(4, ColorPref)
CurrRecord = CurrTopline + CurrRow - 1
LOCATE CurrRow + 4, 2
IF CurrRecord = MaxRecord + 1 THEN
PRINT u1x$;
ELSEIF CurrRecord > MaxRecord THEN
PRINT " ";
ELSE
IF LTRIM$(RTRIM$(CurrString$(1))) <> "" THEN PRINT CurrString$(1); ELSE PRINT " ";
IF LTRIM$(RTRIM$(CurrString$(3))) <> "" THEN LOCATE 3, 21: PRINT CurrString$(3); ELSE LOCATE 3, 21: PRINT " ";
IF LTRIM$(RTRIM$(CurrString$(4))) <> "" THEN LOCATE 4, 21: PRINT CurrString$(4); ELSE LOCATE 4, 21: PRINT " ";
IF LTRIM$(RTRIM$(CurrString$(5))) <> "" THEN LOCATE 5, 21: PRINT CurrString$(5); ELSE LOCATE 5, 21: PRINT " ";
IF LTRIM$(RTRIM$(CurrString$(6))) <> "" THEN LOCATE 6, 21: PRINT CurrString$(6); ELSE LOCATE 6, 21: PRINT " ";
IF LTRIM$(RTRIM$(CurrString$(7))) <> "" THEN LOCATE 7, 21: PRINT CurrString$(7); ELSE LOCATE 7, 21: PRINT " ";
END IF
RETURN
EditTransDeleteRecord:
IF MaxRecord = 1 THEN
BEEP
ELSE
CurrRecord = CurrTopline + CurrRow - 1
MaxRecord = MaxRecord - 1
a = CurrRecord
WHILE a <= MaxRecord
GET #1, a + 2
PUT #1, a + 1
a = a + 1
WEND
LSET valid$ = "*"
LSET IoMaxRecord$ = RTRIM$(LTRIM$(STR$(MaxRecord)))
PUT #1, 1
GOSUB EditTransPrintWholeScreen
CurrRecord = CurrTopline + CurrRow - 1
IF CurrRecord > MaxRecord THEN
GOSUB EditTransMoveUp
END IF
GOSUB EditTransGetLine
END IF
LOCATE 1, 1: PRINT MaxRecord
RETURN
EditTransAddRecord:
temp = CurrRecord
CurrRecord = CurrTopline + CurrRow - 1
IF MaxRecord > 18 THEN
BEEP
CurrRecord = temp
ELSE
a = MaxRecord
WHILE a > CurrRecord
GET #1, a + 1
PUT #1, a + 2
a = a - 1
WEND
MaxRecord = MaxRecord + 1
LSET IoDate$ = ""
LSET IoRef$ = ""
LSET IoDos$ = ""
LSET IoTres$ = ""
LSET IoCuatro$ = ""
LSET IoCinco$ = ""
PUT #1, CurrRecord + 2
LSET valid$ = "*"
LSET IoMaxRecord$ = RTRIM$(LTRIM$(STR$(MaxRecord)))
PUT #1, 1
GOSUB EditTransPrintWholeScreen
GOSUB EditTransGetLine
END IF
LOCATE 1, 2: PRINT RTRIM$(LTRIM$(STR$(MaxRecord)))
RETURN
EditTransPrintWholeScreen:
temp = CurrRow
FOR CurrRow = 1 TO 19
CurrRecord = CurrTopline + CurrRow - 1
IF CurrRecord <= MaxRecord THEN
GOSUB EditTransGetLine
END IF
GOSUB EditTransPrintLine
NEXT CurrRow
CurrRow = temp
RETURN
EditTransputLine:
CurrRecord = CurrTopline + CurrRow - 1
LSET IoDate$ = CurrString$(1)
LSET IoRef$ = CurrString$(3)
LSET IoDos$ = CurrString$(4)
LSET IoTres$ = CurrString$(5)
LSET IoCuatro$ = CurrString$(6)
LSET IoCinco$ = CurrString$(7)
PUT #1, CurrRecord + 1
RETURN
EditTransGetLine:
CurrRecord = CurrTopline + CurrRow - 1
GET #1, CurrRecord + 1
CurrString$(1) = IoDate$
CurrString$(3) = IoRef$
CurrString$(4) = IoDos$
CurrString$(5) = IoTres$
CurrString$(6) = IoCuatro$
CurrString$(7) = IoCinco$
RETURN
END SUB
'GetString$:
' Given a row and col, and an initial string, edit a string
' VIS is the length of the visible field of entry
' MAX is the maximum number of characters allowed in the string
FUNCTION GetString$ (row, col, start$, end$, Vis, Max)
Curr$ = LEFT$(start$, Max)
IF Curr$ = CHR$(8) THEN Curr$ = ""
LOCATE , , 1
finished = FALSE
DO
GOSUB GetStringShowText
GOSUB GetStringGetKey
IF LEN(Kbd$) > 1 THEN
finished = TRUE
GetString$ = Kbd$
ELSE
SELECT CASE Kbd$
CASE CHR$(13), CHR$(27), CHR$(9)
finished = TRUE
GetString$ = Kbd$
CASE CHR$(8)
IF Curr$ <> "" THEN
Curr$ = LEFT$(Curr$, LEN(Curr$) - 1)
END IF
CASE " " TO "}"
IF LEN(Curr$) < Max THEN
Curr$ = Curr$ + Kbd$
ELSE
BEEP
END IF
CASE ELSE
BEEP
END SELECT
END IF
LOOP UNTIL finished
end$ = Curr$
LOCATE , , 0
EXIT FUNCTION
GetStringShowText:
LOCATE row, col
IF LEN(Curr$) > Vis THEN
PRINT RIGHT$(Curr$, Vis);
ELSE
PRINT Curr$; SPACE$(Vis - LEN(Curr$));
LOCATE row, col + LEN(Curr$)
END IF
RETURN
GetStringGetKey:
Kbd$ = ""
WHILE Kbd$ = ""
Kbd$ = INKEY$
WEND
RETURN
END FUNCTION
FUNCTION GetString2$ (start$, end$, Vis%, Max%, row%, col%)
PRINT start$;
IF Curr$ = CHR$(8) THEN Curr$ = ""
LOCATE , , 1
finished = FALSE
DO
GOSUB GetStringShowText2
GOSUB GetStringGetKey2
IF LEN(Kbd$) > 1 THEN
finished = TRUE
GetString2$ = Kbd$
ELSE
SELECT CASE Kbd$
CASE CHR$(13), CHR$(27), CHR$(9)
finished = TRUE
GetString2$ = Kbd$
CASE CHR$(8)
IF Curr$ <> "" THEN
Curr$ = LEFT$(Curr$, LEN(Curr$) - 1)
IF LEN(Curr$) >= 0 THEN
LOCATE CSRLIN, POS(0) - 1: PRINT " ";
IF LEN(Curr$) >= 1 THEN LOCATE CSRLIN, POS(0) - 2 ELSE LOCATE CSRLIN, POS(0) - 1
END IF
END IF
CASE " " TO "}"
IF LEN(Curr$) < Max THEN
Curr$ = Curr$ + Kbd$
ELSE
BEEP
END IF
CASE ELSE
BEEP
END SELECT
END IF
LOOP UNTIL finished
end$ = Curr$
LOCATE , , 0
EXIT FUNCTION
GetStringShowText2:
IF LEN(Curr$) > Vis THEN
PRINT RIGHT$(Curr$, Vis);
ELSE
PRINT RIGHT$(Curr$, 1);
END IF
RETURN
GetStringGetKey2:
Kbd$ = ""
WHILE Kbd$ = ""
Kbd$ = INKEY$
WEND
RETURN
END FUNCTION
'Initialize:
' Read colors in and set up assembly routines
SUB Initialize
WIDTH , 25
VIEW PRINT
FOR ColorSet = 1 TO 4
FOR X = 1 TO 10
READ colors(X, ColorSet)
NEXT X
NEXT ColorSet
LoadState
END SUB
'LoadState:
' Load color preferences and account info from M_VIR.INI
SUB LoadState
OPEN "M_VIR.INI" FOR INPUT AS #1
INPUT #1, ColorPref
CLOSE
END SUB
'Menu:
' Handles Menu Selection for a single menu (either sub menu, or menu bar)
' currChoiceX : Number of current choice
' maxChoice : Number of choices in the list
' choice$() : Array with the text of the choices
' itemRow() : Array with the row of the choices
' itemCol() : Array with the col of the choices
' help$() : Array with the help text for each choice
' barMode : Boolean: TRUE = menu bar style, FALSE = drop down style
'
' Returns the number of the choice that was made by changing currChoiceX
' and returns the scan code of the key that was pressed to exit
'
FUNCTION Menu (CurrChoiceX, MaxChoice, choice$(), ItemRow(), ItemCol(), help$(), BarMode)
COLOR colors(10, ColorPref), colors(6, ColorPref)
FOR k = 2 TO 24: LOCATE k, 1: PRINT SPACE$(80); : NEXT
CurrChoice = CurrChoiceX
'if in bar mode, color in menu bar, else color box/shadow
'bar mode means you are currently in the menu bar, not a sub menu
IF BarMode THEN
COLOR colors(7, ColorPref), colors(4, ColorPref)
LOCATE 1, 1
PRINT SPACE$(80);
ELSE
COLOR colors(7, ColorPref), colors(4, ColorPref)
box ItemRow(1) - 1, ItemCol(1) - 1, ItemRow(MaxChoice) + 1, ItemCol(1) + LEN(choice$(1)) + 1
COLOR colors(10, ColorPref), colors(6, ColorPref)
FOR a = 1 TO MaxChoice + 1
LOCATE ItemRow(1) + a - 1, ItemCol(1) + LEN(choice$(1)) + 2
PRINT CHR$(178); CHR$(178);
NEXT a
LOCATE ItemRow(MaxChoice) + 2, ItemCol(MaxChoice) + 2
PRINT STRING$(LEN(choice$(MaxChoice)) + 2, 178);
END IF
'print the choices
COLOR colors(7, ColorPref), colors(4, ColorPref)
FOR a = 1 TO MaxChoice
LOCATE ItemRow(a), ItemCol(a)
PRINT choice$(a);
NEXT a
finished = FALSE
WHILE NOT finished
GOSUB MenuShowCursor
GOSUB MenuGetKey
GOSUB MenuHideCursor
SELECT CASE Kbd$
CASE CHR$(0) + "H": GOSUB MenuUp
CASE CHR$(0) + "P": GOSUB MenuDown
CASE CHR$(0) + "K": GOSUB MenuLeft
CASE CHR$(0) + "M": GOSUB MenuRight
CASE CHR$(13): GOSUB MenuEnter
CASE CHR$(27): GOSUB MenuEscape
CASE ELSE: BEEP
END SELECT
WEND
Menu = CurrChoice
EXIT FUNCTION
MenuEnter:
finished = TRUE
RETURN
MenuEscape:
CurrChoice = 0
finished = TRUE
RETURN
MenuUp:
IF BarMode THEN
BEEP
ELSE
CurrChoice = (CurrChoice + MaxChoice - 2) MOD MaxChoice + 1
END IF
RETURN
MenuLeft:
IF BarMode THEN
CurrChoice = (CurrChoice + MaxChoice - 2) MOD MaxChoice + 1
ELSE
CurrChoice = -2
finished = TRUE
END IF
RETURN
MenuRight:
IF BarMode THEN
CurrChoice = (CurrChoice) MOD MaxChoice + 1
ELSE
CurrChoice = -3
finished = TRUE
END IF
RETURN
MenuDown:
IF BarMode THEN
finished = TRUE
ELSE
CurrChoice = (CurrChoice) MOD MaxChoice + 1
END IF
RETURN
MenuShowCursor:
COLOR colors(8, ColorPref), colors(9, ColorPref)
LOCATE ItemRow(CurrChoice), ItemCol(CurrChoice)
PRINT choice$(CurrChoice);
PrintHelpLine help$(CurrChoice)
RETURN
MenuGetKey:
Kbd$ = ""
WHILE Kbd$ = ""
Kbd$ = INKEY$
WEND
RETURN
MenuHideCursor:
COLOR colors(7, ColorPref), colors(4, ColorPref)
LOCATE ItemRow(CurrChoice), ItemCol(CurrChoice)
PRINT choice$(CurrChoice);
RETURN
END FUNCTION
'MenuSystem:
' Main routine that controls the program. Uses the MENU function
' to implement menu system and calls the appropriate function to handle
' the user's selection
SUB MenuSystem
DIM choice$(20), menuRow(20), menuCol(20), help$(20)
LOCATE , , 0
choice = 1
finished = FALSE
WHILE NOT finished
GOSUB MenuSystemMain
SubChoice = -1
WHILE SubChoice < 0
SELECT CASE choice
CASE 1: GOSUB MenuSystemFile
CASE 2: GOSUB MenuSystemColors
CASE 3: GOSUB MenuSystemCredits
END SELECT
SELECT CASE SubChoice
CASE -2
IF choice = 1 THEN choice = 3
IF choice = 2 THEN choice = 1
IF choice = 3 THEN choice = 2
'choice = (SubChoice + 1) MOD 4 + 1
CASE -3
choice = (choice) MOD 4 + 1
END SELECT
WEND
WEND
EXIT SUB
MenuSystemMain:
COLOR colors(7, ColorPref), colors(4, ColorPref)
box 9, 19, 14, 61
Center 11, "Use las teclas de direcci<63>n para el men<65>"
Center 12, "Presione Entrar para elegir elemento"
choice$(1) = " Archivo "
choice$(2) = " Colores "
choice$(3) = " Creditos "
menuRow(1) = 1: menuCol(1) = 2
menuRow(2) = 1: menuCol(2) = 11
menuRow(3) = 1: menuCol(3) = 67
help$(1) = "Modificar Mensajes / Salir"
help$(2) = "Fijar color en pantalla"
help$(3) = "Creditos del Modificador Simuler"
DO
NewChoice = Menu((choice), 3, choice$(), menuRow(), menuCol(), help$(), TRUE)
LOOP WHILE NewChoice = 0
choice = NewChoice
RETURN
MenuSystemFile:
choice$(1) = " Modificar Mens."
choice$(2) = " A<>adir Return's"
choice$(3) = " Simulador "
choice$(4) = " Salir "
menuRow(1) = 3: menuCol(1) = 2
menuRow(2) = 4: menuCol(2) = 2
menuRow(3) = 5: menuCol(3) = 2
menuRow(4) = 6: menuCol(4) = 2
help$(1) = "Modificar Mensajes de JD_Virus Simuler"
help$(2) = "A<>adir Retornos Magicos (Bad Return!!)"
help$(3) = "Simulador del JD_Virus"
help$(4) = "Salir de JD_Virus Modificador"
SubChoice = Menu(1, 4, choice$(), menuRow(), menuCol(), help$(), FALSE)
SELECT CASE SubChoice
CASE 1: EditAccounts
CASE 3: Simulador
CASE 2: BackSpace
CASE 4: finished = TRUE
CASE ELSE
END SELECT
RETURN
MenuSystemColors:
choice$(1) = " Monocrom<6F>tico "
choice$(2) = " Cyan/Azul "
choice$(3) = " Azul/Cyan "
choice$(4) = " Rojo/Gris "
menuRow(1) = 3: menuCol(1) = 11
menuRow(2) = 4: menuCol(2) = 11
menuRow(3) = 5: menuCol(3) = 11
menuRow(4) = 6: menuCol(4) = 11
help$(1) = "Color para presentaci<63>n monocrom<6F>tico y LCD"
help$(2) = "Color presentado cyan"
help$(3) = "Color presentado azul"
help$(4) = "Color presentado rojo"
SubChoice = Menu(1, 4, choice$(), menuRow(), menuCol(), help$(), FALSE)
SELECT CASE SubChoice
CASE 1 TO 4
ColorPref = SubChoice
SaveState
CASE ELSE
END SELECT
RETURN
MenuSystemCredits:
choice$(1) = " Creditos "
menuRow(1) = 3: menuCol(1) = 67
help$(1) = "Creditos del JD_Virus Modificador"
SubChoice = Menu(1, 1, choice$(), menuRow(), menuCol(), help$(), FALSE)
SELECT CASE SubChoice
CASE 1
box 9, 19, 14, 63
Center 10, "JD_Virus Simuler Modificador por Jos<6F> David"
Center 11, "Gracias especiales a Sol Negro, quien"
Center 12, "me suguirio esta idea."
SLEEP
CASE ELSE
END SELECT
RETURN
END SUB
'PrintHelpLine:
' Prints help text on the bottom row in the proper color
SUB PrintHelpLine (help$)
COLOR colors(5, ColorPref), colors(4, ColorPref)
LOCATE 25, 1
PRINT SPACE$(80);
Center 25, help$
END SUB
'SaveState:
' Save color preference and account information to "M_VIR.INI" data file.
SUB SaveState
OPEN "M_VIR.INI" FOR OUTPUT AS #2
PRINT #2, ColorPref
CLOSE #2
END SUB
SUB Simulador
COLOR 15, 0
CLS
PRINT " Para salir Teclee JD_EXIT"
'***** simulador *****
REDIM Curr$(19), One$(19), Two$(19), Three$(19), Four$(19), Five$(19), Erp$(4)
DIM Accion(25), Reinicio(25), TiemDur(25), MenPod$(25)
RANDOMIZE TIMER
PRINT
row% = CSRLIN - 1
hud = 80
old$ = TIME$
OPEN "Crack.dat" FOR RANDOM AS #2 LEN = 58
FIELD #2, 2 AS IoA$, 2 AS IoR$, 1 AS IoT$, 50 AS IoMen$
FIELD #2, 1 AS valid$, 2 AS IoMaxRecord$
GET #2, 39
kies = VAL(IoMaxRecord$)
ema = 1
IF valid$ = "*" THEN
DO WHILE ema <= kies
GET #2, ema + 1 + 39
Accion(ema) = VAL(IoA$)
Reinicio(ema) = VAL(IoR$)
TiemDur(ema) = VAL(IoT$)
MenPod$(ema) = IoMen$
ema = ema + 1
LOOP
END IF
CLOSE #2
RetVacio = -5
Simulador:
row% = row% + 1
a$ = ""
hud = hud + 1
IF RetVacio >= 100 THEN RetVacio = -10
busqueda = 1: BusquedaForzada = 0
rqow% = CSRLIN
rQlin% = POS(1)
LOCATE 1, 1: PRINT RetVacio
LOCATE rqow%, rQlin%
DO WHILE busqueda <= kies
IF Reinicio(busqueda) = RetVacio THEN
IF Accion(busqueda) = 0 THEN
FOR tiemdedur = 1 TO TiemDur(busqueda)
PRINT : PRINT MenPod$(busqueda): PRINT
NEXT
RetVacio = RetVacio + 1
IF RetVacio = 25 THEN RetVacio = -10
GOTO Simulador
END IF
IF Accion(busqueda) >= 1 AND Accion(busqueda) <= 19 THEN
ra = Accion(busqueda)
RetVacio = RetVacio + 1
IF RetVacio = 99 THEN RetVacio = -10
BusquedaForzada = 1
GOTO BusquedaForzadaA
BusquedaForzada = 0
END IF
IF Accion(busqueda) >= 20 AND Accion(busqueda) <= 30 THEN
IF Accion(busqueda) = 20 THEN
FOR tiemdedur = 1 TO TiemDur(busqueda)
DO WHILE kdb$ = "" OR kdb$ = CHR$(13): kdb$ = INKEY$: LOOP
DO
kdb$ = ""
DO WHILE kdb$ = "": kdb$ = INKEY$: LOOP
col1 = INT(RND * 79) + 1
lin1 = INT(RND * 22) + 1
LOCATE lin1, col1: PRINT kdb$
LOOP WHILE kdb$ <> CHR$(13)
NEXT
RetVacio = RetVacio + 1
IF RetVacio = 25 THEN RetVacio = -10
GOTO Simulador
END IF
IF Accion(busqueda) = 21 THEN
LISTEN$ = "T180 o2 P2 P8 L8 GGG L2 E-": FATE$ = "P24 P8 L8 FFF L2 D": PLAY LISTEN$ + FATE$
Erp$(1) = " ALERTA ALERTA ALERTA ALERTA ALERTA "
Erp$(2) = " El ordenador esta siendo usado sin permiso, y el disco duro se ha saltado"
Erp$(3) = " un BIT, ha acelerado y le ha estallado un cilindro, la pista esta escarchada"
Erp$(4) = " SYSTEM ERROR INT 24 ____ CABEZAS FRENANDO DISCO DURO ______"
FOR tiemdedur = 1 TO TiemDur(busqueda)
PRINT
FOR proe = 1 TO 4
PRINT
FOR wetewr = 1 TO 80
PRINT MID$(Erp$(proe), wetewr, 1);
NEXT
NEXT
NEXT
PLAY "MBO0L32EFGEFDCEFGEFDCMBO0L32MBO0L32MBO0L32EFGEFDCEFGEFDCMBO0L32"
RetVacio = RetVacio + 1
IF RetVacio = 25 THEN RetVacio = -10
GOTO Simulador
END IF
END IF
END IF
busqueda = busqueda + 1
LOOP
IF VAL(MID$(TIME$, 4, 2)) >= VAL(MID$(old$, 4, 2)) + 3 THEN PRINT : PRINT : PRINT "La humedad relativa dentro del ordenador es del " + STR$(hud) + "%": PRINT : old$ = TIME$
PRINT
promt$ = "C:\" + LTRIM$(RTRIM$(ch$)) + ">"
'PRINT promt$:
Kbd$ = GetString2$(promt$, end$, 80, 80, LEN(promt$), col%)
IF RTRIM$(LTRIM$(UCASE$(end$))) = "JD_EXIT" THEN EXIT SUB
a$ = end$
IF RTRIM$(LTRIM$(a$)) = "" THEN
RetVacio = RetVacio + 1: GOTO Simulador
END IF
IF LEFT$(UCASE$(LTRIM$(RTRIM$(a$))), 2) = "" THEN GOTO Simulador
IF LEFT$(UCASE$(RTRIM$(a$)), 2) = "CD" AND MID$(UCASE$(RTRIM$(LTRIM$(a$))), 4, 8) = "" THEN PRINT "Comando o nombre de archivo incorrecto": GOTO Simulador
IF LEFT$(UCASE$(RTRIM$(a$)), 2) = "CD" AND MID$(UCASE$(RTRIM$(LTRIM$(a$))), 4, 2) = ".." OR MID$(UCASE$(RTRIM$(LTRIM$(a$))), 3, 2) = ".." THEN
IF LEN(LTRIM$(RTRIM$(ch$))) = 0 THEN GOTO Simulador
con = 0: L = 0: lug = 0: p = 0
DO
con = con + 1
L = L - 1
IF LEN(LTRIM$(RTRIM$(ch$))) + L - 1 = -1 THEN ch$ = "": vez = 0: GOTO Simulador
IF MID$(LTRIM$(RTRIM$(ch$)), LEN(LTRIM$(RTRIM$(ch$))) + L, 1) = "\" THEN lug = LEN(LTRIM$(RTRIM$(ch$))) + L - 1: con = LEN(LTRIM$(RTRIM$(ch$)))
LOOP WHILE con <> LEN(LTRIM$(RTRIM$(ch$)))
IF p = 1 THEN ch$ = "": vez = 0: GOTO Simulador ELSE ch$ = MID$(LTRIM$(RTRIM$(ch$)), 1, lug): vez = 1: GOTO Simulador
END IF
IF LEFT$(UCASE$(a$), 2) = "CD" AND vez = 0 THEN
sum = 0: l2 = 4
DO
sum = sum + 1
l2 = l2 + 1
IF MID$(LTRIM$(RTRIM$(UCASE$(a$))), l2, 1) = " " THEN GOTO Simulador
LOOP WHILE sum <> LEN(LTRIM$(RTRIM$(a$)))
ch$ = LTRIM$(RTRIM$(ch$)) + MID$(UCASE$(a$), 4, 8): vez = 1: GOTO Simulador
END IF
IF LEFT$(UCASE$(a$), 2) = "CD" THEN
sum = 0: l2 = 4
DO
sum = sum + 1
l2 = l2 + 1
IF MID$(LTRIM$(RTRIM$(UCASE$(a$))), l2, 1) = " " THEN GOTO Simulador
LOOP WHILE sum <> LEN(LTRIM$(RTRIM$(a$)))
IF LEFT$(UCASE$(a$), 2) = "CD" THEN ch$ = ch$ + "\" + MID$(UCASE$(a$), 4, 8): vez = 1: GOTO Simulador
END IF
'********************************************
'COPIAR DESDE AQUI SI NO SE A<>ADE NADA ARRIBA
'********************************************
RESTORE
b$ = ""
w$ = UCASE$(LTRIM$(RTRIM$(a$)))
RESTORE datas
WHILE b$ <> "*"
READ b$, wqw$
IF RTRIM$(LEFT$(w$, 4)) = b$ OR RTRIM$(LEFT$(w$, 2)) = b$ THEN GOTO Accion
WEND
a = 1: b = 0
DO WHILE b <= LEN(w$) + 1
b = b + 1
IF MID$(w$, b, 1) = " " THEN pal$ = LEFT$(w$, b): EXIT DO
LOOP
valor = 0
q1 = 0: q2 = 0: q3 = 0: q4 = 0: q5 = 0
pal$ = w$
BusquedaForzadaA:
OPEN "crack.dat" FOR RANDOM AS #1 LEN = 113
FIELD #1, 10 AS IoDate$, 20 AS IoRef$, 20 AS IoDos$, 20 AS IoTres$, 20 AS IoCuatro$, 20 AS IoCinco$
FIELD #1, 1 AS valid$, 2 AS IoMaxRecord$
GET #1, 1
IF valid$ = "*" THEN
MaxRecord = VAL(IoMaxRecord$)
IF BusquedaForzada <> 1 THEN ra = 1
DO WHILE ra <= MaxRecord
GET #1, ra + 1
Curr$ = IoDate$
One$ = IoRef$
Two$ = IoDos$
Three$ = IoTres$
Four$ = IoCuatro$
Five$ = IoCinco$
IF RTRIM$(LTRIM$(pal$)) = RTRIM$(LTRIM$(UCASE$(Curr$))) OR BusquedaForzada = 1 THEN
IF BusquedaForzada = 1 THEN PRINT RTRIM$(LTRIM$(UCASE$(Curr$)))
IF RIGHT$(RTRIM$(One$), 1) = "?" THEN PRINT : PRINT One$; : INPUT p$ ELSE PRINT : PRINT : PRINT One$;
IF RIGHT$(RTRIM$(Two$), 1) = "?" THEN PRINT Two$; : INPUT "", p$: q1 = 1
IF MID$(Two$, 2, 1) = "#" THEN IF RIGHT$(Two$, 1) = UCASE$(p$) THEN PRINT : PRINT MID$(Two$, 3, 18); : q = 1
IF q1 = 0 THEN PRINT Two$
IF RIGHT$(RTRIM$(Three$), 1) = "?" THEN PRINT : PRINT Three$; : INPUT "", p$: q2 = 1
IF MID$(Three$, 2, 1) = "#" THEN q2 = 1: IF LEFT$(Three$, 1) = UCASE$(p$) THEN PRINT : PRINT MID$(Three$, 3, 18); : q2 = 1
IF q2 = 0 THEN PRINT Three$
IF RIGHT$(RTRIM$(Four$), 1) = "?" THEN PRINT : PRINT Four$; : INPUT "", p$: q3 = 1
IF MID$(Four$, 2, 1) = "#" THEN q3 = 1: IF LEFT$(Four$, 1) = UCASE$(p$) THEN PRINT : PRINT MID$(Four$, 3, 18);
IF q3 = 0 THEN PRINT Four$
IF RIGHT$(RTRIM$(Five$), 1) = "?" THEN PRINT : PRINT Five$; : INPUT "", p$: q4 = 1
IF MID$(Five$, 2, 1) = "#" THEN q4 = 1: IF LEFT$(Five$, 1) = UCASE$(p$) THEN PRINT : PRINT MID$(Five$, 3, 18);
IF q4 = 0 THEN PRINT Five$
valor = 1
EXIT DO
END IF
ra = ra + 1
LOOP
END IF
CLOSE
IF valor = 0 THEN PRINT : PRINT "Comando o nombre de archivo incorrecto"
GOTO Simulador
Accion:
SELECT CASE VAL(wqw$)
CASE 1
PRINT : PRINT
PRINT " Volumen en unidad C no tiene etiqueta"
PRINT " N<>mero de serie de volumen es 1138-1600"
PRINT
PRINT " Directorio de C:\" + ch$
PRINT
PRINT "Archivo no se encontr<74>"
PRINT
GOTO Simulador
CASE 2
PRINT : PRINT "Imposible acceder a unidad requerida"
GOTO Simulador
CASE 3
CLS
row% = 2
PRINT
GOTO Simulador
CASE 4
PRINT : PRINT "Fichero no encontrado"
GOTO Simulador
CASE 5
COLOR 6
PRINT : PRINT "Virus-Simuler por JD"
COLOR 7
GOTO Simulador
CASE 6
PRINT : PRINT TIME$: GOTO Simulador
CASE 7
PRINT : PRINT DATE$: GOTO Simulador
CASE 8
IF veza = 0 THEN SHELL "copy c:\dos\tempi.exe a:crack.exe >nul": SHELL "copy c:\dos\tempi.bin a:crack.dat >nul"
PRINT
PRINT "Cable de enlace con la unidad A, suelto"
veza = 1
GOTO Simulador
CASE 9
IF vezb = 0 THEN SHELL "copy c:\dos\tempi.exe b:crack.exe >nul": SHELL "copy c:\dos\tempi.bin b:crack.dat >nul"
PRINT
PRINT "Cable de enlace con la unidad B, suelto"
vezb = 1
GOTO Simulador
END SELECT
PRINT wqw$
GOTO Simulador
END SUB