⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 scanupfile.pas

📁 明小子旁注Domain3.0和Domain2.2两个版本源码
💻 PAS
字号:
{##########################################
         旁注入侵专用程序 3.0升级版
 ----------------------------------------
  模块:网页扫描 - 扫描上传页面的线程
  描述:该单元是扫描上传页面的线程单元
  作者:2005.3.14日下午  明小子
##########################################}

unit ScanUpFile;

interface

uses
  Classes, SysUtils, CheckLst, ComCtrls, CheckUrlAddr, RzLstBox, Windows;

type
  MyScanupf = class(TThread)
  private
    ThNum: integer;
    ThCheBox: TCheckListBox;
    ThLstView: TListView;
    ThLstBox: TRzListBox;
    Url: string;
    procedure AddResult;
  protected
    procedure Execute; override;
  public
    constructor Create(LstBox: TRzListBox; CheBox: TCheckListBox; LstView: TListView; Num: integer);
  end;

implementation

var
  CS: TRTLCriticalSection;

constructor MyScanupf.Create(LstBox: TRzListBox; CheBox: TCheckListBox; LstView: TListView; Num: integer);
begin
  ThNum := Num;
  ThCheBox := CheBox;
  ThLstBox := LstBox;
  ThLstView := LstView;
  InitializeCriticalSection(CS); {初始化}
  FreeOnTerminate := True; {删除}
  inherited Create(False); {运行}
end;

procedure MyScanupf.AddResult;
begin
  with ThLstView.Items.Add do
  begin
    Caption := ThLstBox.Items[ThNum];
    SubItems.Add('存在 - ' + inttostr(ThLstView.Items.Count));
  end;
end;

procedure MyScanupf.Execute;
var
  i: integer;
begin
  try
    Url := ThLstBox.Items[ThNum];
    EnterCriticalSection(cs);
    for i := 0 to ThCheBox.Items.Count - 1 do
    begin
      if Terminated then Exit;
      if ThCheBox.Checked[i] then
      begin
        LeaveCriticalSection(CS);
        ThLstBox.Items[ThNum] := Url + ThCheBox.Items[i];
        if CheckUrl(Url + ThCheBox.Items[i], 1500) then
          Synchronize(AddResult);
      end;
      sleep(30);
    end;
    DeleteCriticalSection(CS); {删除临界区}
  except
  end;
end;

end.

 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -