Results 1 to 7 of 7
Thread: port already in use...
- 04-09-2009, 07:50 PM #1
Member
- Join Date
- Apr 2009
- Posts
- 4
- Rep Power
- 0
port already in use...
Hello all - This is my first post.
1. I tried to search this forum (i really did) but kept running into search term not long enough (4 words) even when my search was "port already in use exception", clearly longer than 4 words. Sooo, apologies if this topic already exists.
I am trying to write a small program to intercept data packets from an external server to a client on my computer (this is a windows client). This is nothing nefarious, but would be useful, and will be released as OS freeware.
Problem is that the only way to get the port number is to start the client - but then the port is in use and cannot be attached to without an exception being thrown. I am trying to use a proxy server setup here, but am not married to it. I am also a networking nubi, but fluent in Java.
Any and all ideas appreciated, and i will gladly get more detailed if need be.
Thankful for any response
- 04-27-2009, 07:32 PM #2
Member
- Join Date
- Apr 2009
- Posts
- 4
- Rep Power
- 0
Really?
Is there really no one who can answer this question? Did i make a faux pas in the wording? Is it just a stupid question?
Network analyzers like wireshark do this all the time, therefor it is possible.
I just want to capture data coming in on a port for analysis, without disrupting the dataflow. Is it really that difficult?
Thanks to any responders.
- 04-27-2009, 07:54 PM #3
In order to do that you need to interface with much lower-level code than Java will allow (i.e. down in the OS transport layer).
You could set up a proxy in Java, listening or transmitting on a different port, but you would have to configure your other applications to use that port.Last edited by OrangeDog; 04-27-2009 at 10:42 PM.
Don't forget to mark threads as [SOLVED] and give reps to helpful posts.
How To Ask Questions The Smart Way
- 04-27-2009, 08:39 PM #4
Member
- Join Date
- Apr 2009
- Posts
- 4
- Rep Power
- 0
Thanks Orange Dog!
Thank you - I am also conversant in C, can you steer me in the right direction?
Thanks again!
- 04-27-2009, 10:42 PM #5
In order to packet sniff invisibly you need to hook into the OS's network stack. On Windows the various components are running as part of one or more Services. I imagine there'll be lots of security business to contend with too. Best of luck.
Don't forget to mark threads as [SOLVED] and give reps to helpful posts.
How To Ask Questions The Smart Way
- 05-04-2009, 03:19 AM #6
- 05-04-2009, 07:09 AM #7
Member
- Join Date
- Apr 2009
- Posts
- 4
- Rep Power
- 0
Similar Threads
-
how to write to parallel port?
By gen1mx6 in forum NetBeansReplies: 3Last Post: 07-30-2010, 06:06 PM -
Serial Port
By radhika in forum New To JavaReplies: 5Last Post: 11-06-2009, 10:40 AM -
Serial Port Ethernet
By nipunreddevil in forum NetworkingReplies: 2Last Post: 03-01-2009, 05:22 PM -
rs232 serial port on xp
By simo_mon in forum New To JavaReplies: 0Last Post: 12-04-2008, 11:25 AM -
serial port
By musiigedeo in forum Advanced JavaReplies: 0Last Post: 07-23-2007, 04:52 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks