Question: Create a program that will scan all open ports (from 1 to 1024) of a computer (localhost or any computer within a network). *Make the


  Create a program that will scan all open ports (from 1 to 1024) of a computer (localhost or any computer within a network). *Make the first line in your main method with the statement: String host= "localhost"; So that if I want to have another host to check then I simply need to edit the value of the variable with the desired host and run your program.


Sample output 1: (for host variable assigned with "localhost") localhost: 135 is open localhost: 445 is open Sample output 2: (for host variable assigned with "www.slu.edu.ph") www.slu.edu.ph:80 is open www.slu.edu.ph:443 is open www.slu.edu.ph:554 is open

Problem 2:

Rewrite your program in problem 1 such that each check to a port on the specified host will be performed by a runnable or callable object. Note that you are to maintain the first line in your main method with the statement: String host="localhost"; Note: Name the class for the runnable/callable object as PortChecker


Step by Step Solution

3.38 Rating (148 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Pro... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!