IP w całej sieci

0

A czy ktos wie jak pobrać IP w całej sieci lokalnej. Może jakiś skaner IP. czy coś w tym stylu.

0

możę się przyda skaner portów:

unit Unit1;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ScktComp, StdCtrls;

type
TForm1 = class(TForm)
ClientSocket1: TClientSocket;
ListBox1: TListBox;
Label4: TLabel;
GroupBox1: TGroupBox;
Button1: TButton;
Button2: TButton;
GroupBox2: TGroupBox;
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
procedure Button1Click(Sender: TObject);
procedure ClientSocket1Connect(Sender: TObject;
Socket: TCustomWinSocket);
procedure ClientSocket1Error(Sender: TObject; Socket: TCustomWinSocket;
ErrorEvent: TErrorEvent; var ErrorCode: Integer);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;
port : integer;
start : boolean;
implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
start := True;
ClientSocket1.Address := Edit1.Text;
port := StrToInt(Edit2.Text);
ClientSocket1.Port := port;
ClientSocket1.Active := True;
end;

procedure TForm1.ClientSocket1Connect(Sender: TObject;
Socket: TCustomWinSocket);
begin
ClientSocket1.Active := false;
ListBox1.Items.Add('Połączono z '+Edit1.Text + ' na porcie '+IntToStr(port)) ;
Inc(port);
ClientSocket1.Port := port;
ClientSocket1.Active := True;
end;

procedure TForm1.ClientSocket1Error(Sender: TObject;
Socket: TCustomWinSocket; ErrorEvent: TErrorEvent;
var ErrorCode: Integer);
label tam;
begin
ClientSocket1.Active := False;
ErrorCode := 0;
Label4.Caption := 'Skanuje PORT nr: '+IntToStr(port);
Inc(port);

if start = False then goto tam;

ClientSocket1.Port := port;
ClientSocket1.Active := true;
tam:
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
start := False;
end;

end.

1 użytkowników online, w tym zalogowanych: 0, gości: 1