X
xebaobei
Unregistered / Unconfirmed
GUEST, unregistred user!
第一
delphi什么办法可以验证远程计算机密码,我想写弱口令扫描;
我有一个用户名和密码~
我如何能验证这个密码能不能和远程2000计算机连接(就是我的密码和用户名是不是他机器的用户名和密码)
第二
我写了一个扫描端口的程序
我在程序打开时候创建300个tclientsock
在点扫描的时候就分别去连接远程计算机端口。成功就是端口打开~
失败就是没打开`
但是在我扫描到3900时候就出问题了~
------------------------------
windows socket error: 由于系统缓冲空间不足或列队已满,不能执行套接子上的操作。(10055),on API 'connect'
确定
------------------------------
请问我问题出在哪里
如何解决
代码如下
----------------------------------------------------------------------
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ScktComp;
type
TForm1 = class(TForm)
Edit1: TEdit;
Edit2: TEdit;
Button1: TButton;
ClientSocket1: TClientSocket;
ListBox1: TListBox;
ListBox2: TListBox;
procedure Button1Click(Sender: TObject);
procedure linkok(Sender: TObject;Socket: TCustomWinSocket);
procedure linkError(Sender: TObject; Socket: TCustomWinSocket;ErrorEvent: TErrorEvent; var ErrorCode: Integer);
function showip():integer;
procedure FormShow(Sender: TObject);
procedure sao(i:integer);
procedure jia;
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
link: array[1..300] of tClientSocket;
ports,f,j: integer;
implementation
{$R *.dfm}
//当连接成功时候 (端口打开)
procedure tform1.linkok(Sender: TObject;Socket: TCustomWinSocket);
var
temp: string;
begin
temp:=inttostr(tClientSocket(sender).Tag);
listbox2.Items.Add(temp+'连接成功');
tClientSocket(sender).Close;
jia;
end;
//当连接错误时候 (端口关闭)
procedure TForm1.linkError(Sender: TObject;
Socket: TCustomWinSocket; ErrorEvent: TErrorEvent;
var ErrorCode: Integer);
begin
errorcode:=0;
tClientSocket(sender).Close;
jia;
end;
//显示扫描到哪里,和在一组线程完毕后从新启动线程
procedure TForm1.jia;
begin
f:=f+1;
j:=j+1;
edit2.text:=inttostr(f);
if f<10000 then
begin
if j=300 then
begin
j:=0;
Button1.Click;
end;
end;
end;
//开始扫描
procedure TForm1.Button1Click(Sender: TObject);
var
i:integer;
begin
Button1.Enabled:=false;
for i:=1 to 300 do
begin
sao(i);
end;
Button1.Enabled:=true;
end;
//得到该扫描哪个端口
function tform1.showip():integer;
begin
result:=ports;
ports:=ports+1;
end;
//当窗口打开时候,
procedure TForm1.FormShow(Sender: TObject);
var
i:integer;
begin
ports:=1; //设置初始端口为1
f:=0;
j:=0;
for i:=1 to 300 do //创建300个clientsock
begin
link:=tClientSocket.Create(self);
link.Name:='link'+inttostr(i);
link.Tag:=i;
link.OnConnect:=linkok;
link.OnError:=linkerror;
end;
end;
//扫描过程
procedure TForm1.sao(i:integer);
var
duan:integer;
begin
duan:=form1.showip;
link.address:=edit1.text;
link.Port:=duan;
link.Tag:=duan;
link.Open;
listbox1.Items.Add(inttostr(duan)+'试图测试');
end;
end.
delphi什么办法可以验证远程计算机密码,我想写弱口令扫描;
我有一个用户名和密码~
我如何能验证这个密码能不能和远程2000计算机连接(就是我的密码和用户名是不是他机器的用户名和密码)
第二
我写了一个扫描端口的程序
我在程序打开时候创建300个tclientsock
在点扫描的时候就分别去连接远程计算机端口。成功就是端口打开~
失败就是没打开`
但是在我扫描到3900时候就出问题了~
------------------------------
windows socket error: 由于系统缓冲空间不足或列队已满,不能执行套接子上的操作。(10055),on API 'connect'
确定
------------------------------
请问我问题出在哪里
如何解决
代码如下
----------------------------------------------------------------------
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ScktComp;
type
TForm1 = class(TForm)
Edit1: TEdit;
Edit2: TEdit;
Button1: TButton;
ClientSocket1: TClientSocket;
ListBox1: TListBox;
ListBox2: TListBox;
procedure Button1Click(Sender: TObject);
procedure linkok(Sender: TObject;Socket: TCustomWinSocket);
procedure linkError(Sender: TObject; Socket: TCustomWinSocket;ErrorEvent: TErrorEvent; var ErrorCode: Integer);
function showip():integer;
procedure FormShow(Sender: TObject);
procedure sao(i:integer);
procedure jia;
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
link: array[1..300] of tClientSocket;
ports,f,j: integer;
implementation
{$R *.dfm}
//当连接成功时候 (端口打开)
procedure tform1.linkok(Sender: TObject;Socket: TCustomWinSocket);
var
temp: string;
begin
temp:=inttostr(tClientSocket(sender).Tag);
listbox2.Items.Add(temp+'连接成功');
tClientSocket(sender).Close;
jia;
end;
//当连接错误时候 (端口关闭)
procedure TForm1.linkError(Sender: TObject;
Socket: TCustomWinSocket; ErrorEvent: TErrorEvent;
var ErrorCode: Integer);
begin
errorcode:=0;
tClientSocket(sender).Close;
jia;
end;
//显示扫描到哪里,和在一组线程完毕后从新启动线程
procedure TForm1.jia;
begin
f:=f+1;
j:=j+1;
edit2.text:=inttostr(f);
if f<10000 then
begin
if j=300 then
begin
j:=0;
Button1.Click;
end;
end;
end;
//开始扫描
procedure TForm1.Button1Click(Sender: TObject);
var
i:integer;
begin
Button1.Enabled:=false;
for i:=1 to 300 do
begin
sao(i);
end;
Button1.Enabled:=true;
end;
//得到该扫描哪个端口
function tform1.showip():integer;
begin
result:=ports;
ports:=ports+1;
end;
//当窗口打开时候,
procedure TForm1.FormShow(Sender: TObject);
var
i:integer;
begin
ports:=1; //设置初始端口为1
f:=0;
j:=0;
for i:=1 to 300 do //创建300个clientsock
begin
link:=tClientSocket.Create(self);
link.Name:='link'+inttostr(i);
link.Tag:=i;
link.OnConnect:=linkok;
link.OnError:=linkerror;
end;
end;
//扫描过程
procedure TForm1.sao(i:integer);
var
duan:integer;
begin
duan:=form1.showip;
link.address:=edit1.text;
link.Port:=duan;
link.Tag:=duan;
link.Open;
listbox1.Items.Add(inttostr(duan)+'试图测试');
end;
end.