Solved

Need to create a program to test for open TCP ports

Posted on 2012-03-16
6
311 Views
Last Modified: 2012-03-22
I have a need for a port testing tool that I can program to to read and send from one node to another in a network. I know there may be tools that could do this for me, but I want flexibility of changing the functionality as the need arises. My preferred language is Java because I would like to run on both windows and Linux.

Here is what I would like the tool to do:

listen on a specified range of ports for a known message and when we receive that message, close that port.

Similarly, I want the program to write a message to a specified set of ports.

After all ports are verified or after a specified timeout, the program should spit out a report (I can handle this part).

As a follow up question once I have the program working, I want to set it up to use secure protocol as an option.
0
Comment
Question by:Christopher Schene
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 500 total points
ID: 37732559
This is a good framework to get you started. I also have an https version


http://technojeeves.com/joomla/index.php/free/84-server-by-david-flanagan
0
 

Author Comment

by:Christopher Schene
ID: 37732731
Looks pretty good I'll try this. I'll ask for the http version in a separate question so you get another 500 points
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 37732734
No - don't worry about the points thanks
0
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 

Author Comment

by:Christopher Schene
ID: 37733705
What is the purpose of these lines in the example code?  I have taken a java class, but most of my programming is in C, C#, Vb.net---I am not familiar with the Hash templates

threadGroup = new ThreadGroup(Server.class.getName());
      this.maxConnections = maxConnections;
      services = new HashMap<Integer, Listener>();
      connections = new HashSet<Connection>(maxConnections);

It looks like a good book...I think I'll buy it.
0
 

Author Closing Comment

by:Christopher Schene
ID: 37755036
I purchased the book as well. Thanks!
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 37755100
What is the purpose of these lines in the example code?

There's quite a bit there - which part of that do you mean?

I purchased the book as well. Thanks!

That's a good investment!
0

Featured Post

Free NetCrunch network monitor licenses!

Only on Experts-Exchange: Sign-up for a free-trial and we'll send you your permanent license!

Here is what you get: 30 Nodes | Unlimited Sensors | No Time Restrictions | Absolutely FREE!

Act now. This offer ends July 14, 2017.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
This video teaches viewers about errors in exception handling.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question