Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Java An Introduction To Problem Solving And Programming

Authors: Walter Savitch

8th Edition

0134462033, 978-0134462035

More Books

Students also viewed these Programming questions

Question

Discuss essential concepts of family therapy.

Answered: 1 week ago

Question

Write a for statement to compute the sum 1 + 2 + 3 + 4 + 5 + + n .

Answered: 1 week ago

Question

How many complete meals do you eat daily?

Answered: 1 week ago