AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Netzwerke Delphi show all IP's on the network that listen to specific portnr
Thema durchsuchen
Ansicht
Themen-Optionen

show all IP's on the network that listen to specific portnr

Ein Thema von Glenndevos · begonnen am 20. Jan 2007 · letzter Beitrag vom 21. Jan 2007
Antwort Antwort
Glenndevos

Registriert seit: 20. Jan 2007
2 Beiträge
 
#1

show all IP's on the network that listen to specific portnr

  Alt 20. Jan 2007, 20:11
Hello All,

First, many thanks for sharing such good info on this site, it helped me very much.
I did however not find something I need : a small routine that show all IP's on a network that listen to a specific port. I work with the TclientSocket components under D7.
I tried already connecting to all IP's but when you try to connect to each client, you get errormsg that teh connection was not accepted.

Thanks in advance for some help in the right direction

GruBen
Glenn
  Mit Zitat antworten Zitat
marabu

Registriert seit: 6. Apr 2005
10.109 Beiträge
 
#2

Re: show all IP's on the network that listen to specific por

  Alt 20. Jan 2007, 20:40
Welcome to Delphi-PRAXiS, Glenn.

Your boat sails under the name "portscanner". Have a look at this short sample code to get started.

Enjoy your visit.
  Mit Zitat antworten Zitat
Glenndevos

Registriert seit: 20. Jan 2007
2 Beiträge
 
#3

Re: show all IP's on the network that listen to specific por

  Alt 20. Jan 2007, 22:29
Many thanks. I placed the code in a loop to check a certain range with a progressbar indicating the progress but found that for some IP adresses, there's a (too) big delay, takes approx. 4-5 seconds for an IP-adress that is not connected on the network. If I do a netstat on the doscommand prompt, that takes 0.5 seconds ... any option to speed things up ?

Thanks !
Glenn

Delphi-Quellcode:
for i := offset to last do
  begin
  progress := progress + progressstep;
  progressbar1.Position := round(progress);

  adrestocheck := IPA1.text + '.' + IPA2.text + '.' + IPA3.text + '.'+inttostr(i);

  WSAStartup($0101,WSAData);

  if checkportopen(adrestocheck,6363) then
    begin
      memo1.Lines.Add(adrestocheck);

    end
    else
    begin
      label1.caption :=('not');
    end;
  WSACleanUp;
  end;
  Mit Zitat antworten Zitat
marabu

Registriert seit: 6. Apr 2005
10.109 Beiträge
 
#4

Re: show all IP's on the network that listen to specific por

  Alt 21. Jan 2007, 17:42
Hi Glenn,

no matter what libraries or components your port scanner employs: You really should do an ICMP prescan to rule out dead IP addresses. Only thereafter you should run a port scan on the remaining set of addresses you kept in a TList or TStringList. That way you won't suffer from aggregating timeouts.

Regards
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 00:20 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz