|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
鱼老师的鱼C扫描器,我已经可以正常扫描了,为什么会弹出错误。端口是正常扫描好好的,就是为什么一到了135这个端口就出错。求指教
这是出错的图片:
出错图片
以下是我的代码:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, ComCtrls, ScktComp;
type
TForm1 = class(TForm)
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
Edit4: TEdit;
Label6: TLabel;
Label7: TLabel;
ProgressBar1: TProgressBar;
Timer1: TTimer;
Panel1: TPanel;
Panel2: TPanel;
Panel3: TPanel;
ListBox1: TListBox;
ClientSocket1: TClientSocket;
procedure Panel1Click(Sender: TObject);
procedure Panel2Click(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
procedure ClientSocket1Connect(Sender: TObject;
Socket: TCustomWinSocket);
procedure ClientSocket1Error(Sender: TObject; Socket: TCustomWinSocket;
ErrorEvent: TErrorEvent; var ErrorCode: Integer);
procedure FormCreate(Sender: TObject);
procedure ClientSocket1Disconnect(Sender: TObject;
Socket: TCustomWinSocket);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
Var
i:Integer ;
{$R *.dfm}
procedure TForm1.Panel1Click(Sender: TObject);
begin
close;
end;
procedure TForm1.Panel2Click(Sender: TObject);
begin
If Edit1.Text='' Then
ShowMessage('请输入IP地址')
Else If Edit2.Text='' Then
ShowMessage('请输入起始端口')
Else If Edit3.Text='' Then
ShowMessage('请输入终止端口')
Else If Edit4.Text='' Then
ShowMessage('请输入速率')
Else
Timer1.Enabled := True;
end;
procedure TForm1.Timer1Timer(Sender: TObject);
begin
i:=i +1;
label7.Caption:= IntToStr(i);
ClientSocket1.Address:=edit1.Text;
ClientSocket1.Port:=StrToInt(label7.Caption);
ClientSocket1.Open;
end;
procedure TForm1.ClientSocket1Connect(Sender: TObject;
Socket: TCustomWinSocket);
begin
ListBox1.Items.Add('端口:' + label7.Caption);
end;
procedure TForm1.ClientSocket1Error(Sender: TObject;
Socket: TCustomWinSocket; ErrorEvent: TErrorEvent;
var ErrorCode: Integer);
begin
ErrorCode:=0;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
i := StrToInt(label7.Caption);
end;
procedure TForm1.ClientSocket1Disconnect(Sender: TObject;
Socket: TCustomWinSocket);
begin
Timer1.Enabled:=True;
end;
end.
我好无助啊。想了好久了啊。大哥们好心帮帮忙吧。
|
|