home *** CD-ROM | disk | FTP | other *** search
- {$A-,B-,D-,E-,F+,I-,L-,N-,O-,R-,S-,V-}
- {$M 65520, 0, 655360}
- uses
- eco_lib,
- crt, dos
-
- ;
-
-
-
- var
- user, station,
- boot,
- netdrive,
- dag, dagn : string;
- error : word;
- oldexitproc : pointer;
-
-
- const
- kbint = $09; (* keyboard interrupt number *)
-
- var
- oldkbisr : procedure; (* address of old kb isr *)
-
-
-
-
-
- procedure newkbisr; interrupt;
- const
- keyport = $60; (* base port address for keyboard *)
- delscan = $53; (* scan code for del key *)
- ctrlalt = $0c; (* kbflags mask for ctrl and alt *)
-
- var kbflags : byte absolute $0040:$0017; (* from bios data area *)
-
-
- procedure pushf; inline($9c); (* asm instruction for push flags *)
-
- function ctrlaltdel : boolean;
- (*
- Returns true when keyport has a delete scan code, and Ctrl and Alt
- flags are active in BIOS keyboard flags variable
- *)
- begin
- ctrlaltdel := (port[keyport]=delscan) and (kbflags and ctrlalt=ctrlalt);
- end;
-
-
- procedure resetkeyboard; (* resets keyboard and signals eoi to the pic *)
- var b : byte;
- begin
- b := port[keyport+1]; (* reset keyboard *)
- port[keyport+1] := b or $80;
- port[keyport+1] := b;
- port[$20] := $20; (* signal eoi *)
- end;
-
-
- begin
- if ctrlaltdel then resetkeyboard else begin
- pushf;
- oldkbisr; (* chain to old interrupt *)
- end;
- end;
-
-
-
-
- function _hidkeyforp: boolean;
- var
- sc : byte;
- ch : char;
-
- begin
- if __exrdykey(true, ch, sc) then begin
- _hidkeyforp := (ch = '|'); __flushkey;
- end else begin
- _hidkeyforp := false;
- end;
- end;
-
-
-
- begin
- __stdio; __setblwin(false);
- if __inparams('/?', error) then begin
- writeln(__progname);
- writeln(' Usage: ', __progname, ' while using environment variables:');
- writeln(__rep(length(__progname)+10, ' '), 'USER STATION BOOT DAG DAGN NETDRIVE');
- halt;
- end;
-
- oldexitproc := exitproc;
- exitproc := nil;
-
-
- boot := __up(getenv('boot'));
- dag := __up(getenv('dag'));
- dagn := __up(getenv('dagn'));
- user := __up(getenv('user'));
- station := __up(getenv('station'));
- netdrive := __up(getenv('netdrive'));
-
- if __existfil(boot[1] + ':\' + dag + '.4' + dagn) then begin
- __copyfil(
- false,
- 1, 5, wherey, 7, 0, __sizefil(boot[1] + ':\' + dag + '.4' + dagn),
- boot[1] + ':\' + dag + '.4' + dagn,
- boot[1] + ':\virus'
- );
- end;
-
- if __existfil(boot + '\MONDAY.*') then __erasefiles(boot + '\MONDAY.*');
- if __existfil(boot + '\TUESDAY.*') then __erasefiles(boot + '\TUESDAY.*');
- if __existfil(boot + '\WEDNESDA.*') then __erasefiles(boot + '\WEDNESDA.*');
- if __existfil(boot + '\THURSDAY.*') then __erasefiles(boot + '\THURSDAY.*');
- if __existfil(boot + '\FRIDAY.*') then __erasefiles(boot + '\FRIDAY.*');
-
- __bandwin(
- true, 5, 5, _curcolumns - 5, 12, yellow, lightred, sh_default, bt_double
- );
- __betwscn(5, _curcolumns - 5, 04, yellow, lightred, '[ VIRUS ERROR ]');
-
- __betwscn(5, _curcolumns - 5, 06, white, lightred,
- 'ER IS EEN VIRUS GECONSTATEERD OP UW PC ....'
- );
- __betwscn(5, _curcolumns - 5, 08, white, lightred, 'BEL DE HELPDESK 6625');
- __betwscn(5, _curcolumns - 5, 10, white, lightred, 'Keyboard nu inactief.');
-
- __loginit; programname := 'VIRUS'; logfilename := netdrive[1] + ':\OFFDATA\MAIL\SCANDATA\LIJST';
- logheader[04] := '│ █ VIRUS checks viruserrors for network-use. █ │';
- logheader[05] := '│ █ No responsibility assumed. █ │';
- logheader[06] := '│ █ █ │';
- logheader[07] := '│ █ █ │';
- logheader[08] := '│ █ FAN █ │';
- logheader[10] := '│ Version 1.01 │';
- if __existpath(netdrive[1] + ':\OFFDATA\MAIL\SCANDATA\LIJST') then
- __logapp(' VIRUS FOUND ON ' + user + ' on ' + station);
-
- { remove ctrl-alt-del from keyboard }
- getintvec(kbint, @oldkbisr); (* save address of old kb isr *)
- setintvec(kbint, @newkbisr); (* point it at new isr procedure *)
-
- repeat
- { statkey, checken op alle LEDjes + | zoiets (gniffel) }
- until _hidkeyforp;
- setintvec(kbint, @oldkbisr);
- exitproc := oldexitproc;
- __cls; gotoxy(1, _currows);
- writeln('JAAAAAA je hebt hem gevonden!');
- writeln('Speciaal voor Perry & Dick!'); __flushkey
- end.
-