Solved

http listener url and port

Posted on 2013-05-15
8
404 Views
Last Modified: 2013-05-16
I need to build a listener that grabs all traffic coming into our network from

A particular url
A specific port.
0
Comment
Question by:lrbrister
[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
  • 2
8 Comments
 
LVL 83

Accepted Solution

by:
Dave Baldwin earned 500 total points
ID: 39169013
If this is the same project, you need to find out if and where you can actually see that traffic.  Two tools that can help you determine what is going on are TCPView http://technet.microsoft.com/en-us/sysinternals/bb897437.aspx from Microsoft Sysinternals and Wireshark http://www.wireshark.org/.  If you can't see it, you can't grab it.  The only place you can 'guarantee' that you can see it is at your 'gateway' device which is your incoming router or modem, a place that All the traffic goes thru.
0
 

Author Comment

by:lrbrister
ID: 39171190
DaveBaldwin

The VOIP folks we're dealing with has a Java based jar that works like a listener and can be executed from my dev PC's command prompt.

So, that seems to me that I can grab it as well.


I have Eclipse so I can look at the source code.

The source Java essentially connects to their url (First yellow highlight)
Does a "PrintIn" that lets me know it's monitoring (Second yellow highlight
And then when something happens Prints the data to screen with a PrintIn as well...which COULD be sent to a database with a PrepareDOcument process in Java. (third yellow highlight)

I'm essentially trying to replicate that in .Net
And my director has stated he wants it done with a Listener in .Net

And I have ZERO experience with a Listener.

ss
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 39171379
I do not have a lot of experience with Java but it appears that VOIP guys have their own Library(M5Connection). Have you asked them to see if they have .NET libraries?
0
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 

Author Comment

by:lrbrister
ID: 39171436
CodeCruiser

Yeah...they have it for Professional Fees wich my company doesn't want to pay for.

I have 5 weeks to figure this out.

I've done this with Asterisk.Net elsewhere...
But management is insisting this be done this way.  Making me crazy.

I DO have the code for the connection...in Java of course.

Looks like I'll just have to clomp my way through this.

The code below is how the Java code begins...
I'll probably be making a lot of Java to C# to VB.Net conversions...with EE questions.

And so the journey begins.

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.net.Socket;
import java.net.URL;
import java.security.KeyManagementException;
import java.security.NoSuchAlgorithmException;

import javax.net.SocketFactory;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLSocketFactory;
import javax.net.ssl.TrustManager;
import javax.net.ssl.X509TrustManager;

/**
 * This class is used to connect to M5 API servers and send
 * commands and receive responses as XML fragments using HTTP1.1
 * chunked encoding.
 */
public class M5Connection
{
	public static final String urlBase = "/bobl/bobl";
	public static final String ENCODING = "ISO-8859-1";
	public static final String DELIMITER = "\r\n";
	protected URL url;
	private InputStream inputStream;
	protected OutputStream outputStream;
	protected Socket socket;
	protected BufferedReader reader;
	private boolean bProcessedHeaders;

	protected String resp = null;
	protected String errorMessage = null;

Open in new window

0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 39171538
Ah so you have code for M5Connection class. Then its a matter of converting it to .NET. Good luck.
0
 
LVL 83

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 500 total points
ID: 39172049
At least you have something to work with.  Have you seen the TCPClient and TCPListener class code on this page: http://msdn.microsoft.com/en-us/library/sb27wehh%28v=vs.71%29.aspx
0
 

Author Closing Comment

by:lrbrister
ID: 39172273
Thanks guys
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 39172322
You're welcome, thanks for the points.  That must be some expensive software for them to want to pay you for 5 weeks instead of buying the code.
0

Featured Post

Interactive Way of Training for the AWS CSA Exam

An interactive way of learning that will help you visualize core concepts so that you can be more effective when taking your AWS certification exam.  Built for students by a student to help them understand the concepts that they are being taught.

Question has a verified solution.

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

For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

630 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