home *** CD-ROM | disk | FTP | other *** search
- ;READ ONLY ATTRIBUT RÜCKSETZEN VERHINDERN
- ;Übersetzen mit : MASM secure
- ; LINK secure
- ; EXE2BIN secure.exe secure.com
- ; ! Nur als .COM - File ausführen !
- ; (C) Copyright 1989 by RUZICKA KLAUS & Toolbox
- ; Alle Rechte vorbehalten.
- ;
- code segment
- assume cs:code
- org 0fbh
- origvector dd ?
- ;
- ;init entry
- org 100h
- start: jmp short init
- ;
- int21 proc far
- pushf ;Register & Flags retten
- push ax
- push bx
- push cx
- mov bx,cx ;Register CX nach BX retten
- cmp ax,4301h ;Attribut ändern?
- jnz short int21_2 ;nein -> weiter
- mov ax,4300h ;Attribut lesen
- int 21h
- and cx,01h ;RO-Attr gar nicht gesetzt?
- jz short int21_2 ;nicht gesetzt ->weiter
- and bx,01h ;RO-Attr rücksetzen?
- jnz short int21_2 ;nein ->weiter
- mov al,0B6h ;Timerkanal 2 f. Modus 3 programmieren
- out 43h,al ;für Warnton
- mov ax,2712h ;Teiler für Ton 440Hz
- out 42h,al ;Low-Byte ausgeben
- mov al,ah
- out 42h,al ;High-Byte ausgeben
- in al,61h ;Ton einschalten
- or al,3h
- out 61h,al
- xor cx,cx ;warten
- warte: loop warte
- xor cx,cx ;warten
- warte1: loop warte1
- in al,61h ;Ton abschalten
- and al,0FCh
- out 61h,al
- pop cx ;benutzte Register wiederherstellen
- pop bx
- pop ax
- popf
- stc ;CF=1 --> Fehlermeldung ausgeben
- mov ax,5 ;access denied
- iret ;->zurück
- int21_2:pop cx ;Register & Flags wiederherstellen
- pop bx
- pop ax
- popf
- jmp cs:[origvector]
- int21 endp
- ;init-code
- assume ds:code
- init proc near
- mov dx,offset message ;Nachricht ausgeben
- mov ah,9
- int 21h
- mov ax,3521h ;Get Int.vec 21h
- int 21h
- mov word ptr [origvector],bx
- mov word ptr [origvector+2],es
- mov ax,2521h ;Set Int.vec 21h
- mov dx,offset int21
- int 21h
- mov ax,3100h ;Resident machen
- mov dx,((offset init-offset start)+10fh) shr 4
- int 21h
- init endp
- message: db'Virus-Schutzimpfung V2.00 (C)1988 by Ruzicka Klaus',13,10,10
- db'Die zu schützenden Programme (.COM,.EXE) müssen mit dem ReadOnly-Attribut ',13,10
- db'versehen sein! (Attrib,Chmod,Pctools)',13,10
- db'Wird versucht das Read-Only Attribut einer Datei rückzusetzen, so wird das',13,10
- db'verhindert und durch einen Summton angezeigt',13,10,10,'$'
- code ends
- end start
- ;End of File: Line Nr.:85
-