delphi编写的LPK.DLL专杀,可清理RAR  
官方Delphi 学习QQ群: 682628230(三千人)
频道

delphi编写的LPK.DLL专杀,可清理RAR


            if Match(FilePath + FileRec.Name, MaskList) then
            begin
              ce:=FilePath + FileRec.Name;
              Form1.lbl3.Caption := ce;
              Application.ProcessMessages;
                if LowerCase(RightStr(ce,9)) = 'usp10.dll' then
                begin
                  Form1.mmo1.Lines.Add('发现usp10.dll:' + ce);
                  SetFileAttributes(PChar(ce),0);
                  if (filerec.Size>30000) and (filerec.Size<48000) then//这儿你看一下文件大小,自己改一下,为了对付变种,看一下它的体积区间,单位是字节
                  if WinExecAndWait32('cmd /c del /f "' + ce +'"', SW_HIDE)=0
                  then
                  begin
                  Form1.mmo1.Lines.Add('删除:' + ce);
                  Inc(sum);
                  end;

                end;
                if LowerCase(RightStr(ce,3)) = 'rar' then
                begin
                  Form1.mmo1.Lines.Add('发现RAR文件:' + ce);
                  Form1.mmo1.Lines.Add('分析' + ce);
                  WinExecAndWait32('cmd /c rar.exe vb "' + ce +
                    '" >TEMP.TXT', SW_HIDE);
                  system.Assign(p, 'TEMP.TXT');
                  system.Reset(p);
                  repeat
                    Readln(p, s);

                    l := Length(s);
                    if (l > 8) and (LowerCase(RightStr(s, 9)) = 'usp10.dll') then
                    begin
                      Form1.mmo1.Lines.Add('发现USP10.DLL文件:' + s);
                      if WinExecAndWait32('rar.exe d -sm30000 -sl48000 "' +
                        ce + '" "' + s + '"', SW_HIDE) = 0 then//注意体积 -sm后跟的是最小体积,-sl后是最大体积
                        begin
                        Form1.mmo1.Lines.Add('已清理:' + s);
                        Inc(sum);
                        end;
当然,重点就是RAR的清理。
推荐分享
图文皆来源于网络,内容仅做公益性分享,版权归原作者所有,如有侵权请告知删除!
 

Copyright © 2014 DelphiW.com 开发 源码 文档 技巧 All Rights Reserved
晋ICP备14006235号-8 晋公网安备 14108102000087号

执行时间: 0.037981986999512 seconds