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
Step: 1
Pro...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started