'Y'

Building Java Client/Server Applications with TCP. Part 3

Time for our third installment in the series. This time we look at the port scanner program.

Time for our third installment in the series. This time we look at the port scanner program.

3. The port scanner program

We’ll present a port scanner program that shows which ports are open on your computer, on someone else's computer, or on an Internet server. In order to achieve this, the program browses through a given range of ports, creates a socket and tries to connect to the server on each port.

port scanner program.PNG


In order to use this program, you have to pass 3 arguments to it: the server, the start port and the end port. This is the result of running the program with the arguments “www.google.com 70 90”.

port scanner program results.png


This shows that, on www.google.com, port 80 is open – it is the HTTP port waiting for connections.

Interested in Java? Check out our trainings.



Catalin Tudose
Java and Web Technologies Expert


Share the knowledge

Luxoft Warsaw - Warsaw Spire, plac Europejski 1, 00-844 Warszawa
Dimitrie Pompeiu nr 5-7 , building C, Et. 5, sect 2, Bucharest, 014459

Contact phone:

021 371 4858
Luxoft Poland Wroclaw - Silver Tower pl. Konstytucji 3-go Maja 3 50-048 Wroclaw
Aleja Generała Tadeusza Bora-Komorowskiego 25, Quattro Business Park Five, 31-476 Kraków, Poland

Contact phone:

+48 122110650
Success
Thank you.
Your request has been received.