Solved

Need to create a program to test for open TCP ports

Posted on 2012-03-16
6
305 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:cschene
  • 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:cschene
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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 

Author Comment

by:cschene
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:cschene
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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

760 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now