Intercept data with WINSOCK

Please support our C++ advertiser: Intel Parallel Studio Home
Thread Solved

Join Date: Dec 2007
Posts: 236
Reputation: TheBeast32 is on a distinguished road 
Solved Threads: 6
TheBeast32's Avatar
TheBeast32 TheBeast32 is offline Offline
Posting Whiz in Training

Intercept data with WINSOCK

 
0
  #1
Jan 21st, 2009
Hi, I was wondering how you would intercept data on a given port without interrupting it in WINSOCK. Like if computer A sent computer B "hi" on port 1337 and it was received on a server program. How could I listen for that data on computer B, but still let the data get to the server program. If you have no Idea what I'm asking just tell me and I'll try to explain it better.
Last edited by TheBeast32; Jan 21st, 2009 at 9:38 pm.
"Always program as if the person who will be maintaining your program is a violent psychopath that knows where you live."
--Martin Golding
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 111
Reputation: clutchkiller is an unknown quantity at this point 
Solved Threads: 1
clutchkiller's Avatar
clutchkiller clutchkiller is offline Offline
Junior Poster

Re: Intercept data with WINSOCK

 
0
  #2
Jan 21st, 2009
is there a reason why its port 1337...dot dot dot
>That confuses me =(
Get used to it. Good programmers are in a constant state of confusion.
>Looks like i have some quasi specifics to investigate! Up Up And AWAY!
Reply With Quote Quick reply to this message  
Join Date: Jan 2009
Posts: 1
Reputation: pipaman is an unknown quantity at this point 
Solved Threads: 1
pipaman pipaman is offline Offline
Newbie Poster

Re: Intercept data with WINSOCK

 
0
  #3
Jan 22nd, 2009
You can use Deviare API hook to intercept WinSock API and you will get the data before the application. You will be able to manipulate it or keep it as it.
P-

Originally Posted by TheBeast32 View Post
Hi, I was wondering how you would intercept data on a given port without interrupting it in WINSOCK. Like if computer A sent computer B "hi" on port 1337 and it was received on a server program. How could I listen for that data on computer B, but still let the data get to the server program. If you have no Idea what I'm asking just tell me and I'll try to explain it better.
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 236
Reputation: TheBeast32 is on a distinguished road 
Solved Threads: 6
TheBeast32's Avatar
TheBeast32 TheBeast32 is offline Offline
Posting Whiz in Training

Re: Intercept data with WINSOCK

 
0
  #4
Jan 22nd, 2009
1. The port doesn't have to be 1337, it was just an example

2. Thanks pipaman, I'll try that
"Always program as if the person who will be maintaining your program is a violent psychopath that knows where you live."
--Martin Golding
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 2,413
Reputation: Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough 
Solved Threads: 211
Team Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Taboo Programmer

Re: Intercept data with WINSOCK

 
0
  #5
Jan 22nd, 2009
I'm not sure you can put winsock in permiscous mode. I know most sniffers come with like winpcap and what not...
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 236
Reputation: TheBeast32 is on a distinguished road 
Solved Threads: 6
TheBeast32's Avatar
TheBeast32 TheBeast32 is offline Offline
Posting Whiz in Training

Re: Intercept data with WINSOCK

 
1
  #6
Jan 22nd, 2009
I found this http://www.codeproject.com/KB/IP/sniffer.aspx. This is what I wanted to do.
"Always program as if the person who will be maintaining your program is a violent psychopath that knows where you live."
--Martin Golding
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Other Threads in the C++ Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC