Start New Discussion Reply to this Discussion C# hooks for sniffer
Hi everyone! Can you help me please? I need to write sniffer for internet explorer 9.0 using hooks in c# Is it possible? I searched google.com found some information: SharpCap (packet capture framework for .NET), using .NET Socket class to listen user's activities on the web browser but I didn't find anything how I can create sniffer with usage of hooks. Can you guys give me some advice how to do that? Is there any way? Well, if it's not possible to use hooks than maybe some fuctions which incapsulates hooks inside. Maybe there is some way to hook winsock and steal packets from there?
Thank you for your help.
11 Months Ago
Last Updated
Related Article: C# socket Programming
is a C# discussion thread by jayuma that has 3 replies, was last updated 1 year ago and has been tagged with the keywords: c#, programming, socket.
Taximus
Newbie Poster
11 posts since Oct 2011
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0
There's 2 ways to do this. 1 would be to hook IE directly by injecting code into it and knowing what you are monitoring (basically would have to know how IE works inside which I unfortunately can't help you with). This would be pretty troublesome and complicated so I recommend not doing this. 2 would be to monitor all HTTP packets coming in (port 80). It's actually more robust to do it this way since it will work for all browsers. This describes how to sniff packets in C#, you would probably want to filter the port to 80 unless you care about TCP/UDP/other random ports as well.
skatamatic
Posting Shark
986 posts since Nov 2007
Reputation Points: 403
Solved Threads: 132
Skill Endorsements: 1
Thank you for your help. Got it. I will look at codeproject.com
Taximus
Newbie Poster
11 posts since Oct 2011
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0
© 2013 DaniWeb® LLC
Page rendered in 0.0810 seconds
using 2.66MB