Click here to Skip to main content
15,867,568 members
Articles / Desktop Programming / MFC
Article

Network Sniffer

Rate me:
Please Sign up or sign in to vote.
4.71/5 (28 votes)
19 Jul 2004CPOL 261.5K   14.7K   116   65
Network Sniffer

Sample Image - Sniffer.jpg

Introduction

A "Packet Sniffer" is a utility that sniffs without modifying the network's packets in any way. By comparison, a firewall sees all of a computer's packet traffic as well, but it has the ability to block and drop any packets that its programming dictates. Packet sniffers merely watch, display, and log this traffic.

One disturbingly powerful aspect of packet sniffers is their ability to place the hosting machine's network adapter into "promiscuous mode." Network adapters running in promiscuous mode receive not only the data directed to the machine hosting the sniffing software, but also ALL of the traffic on the physically connected local network.

I hope that this piece of code will help you understand the network better.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer
Australia Australia
Been a programmer since 1999.
Experience in:
.Net, C++, C#, VB, VB.NET, ASP, ASP.NET, DLLs, COM etc.

Comments and Discussions

 
Questionworks for 127.0.0.1 only Pin
Dmitry Gorelov12-Dec-16 12:31
Dmitry Gorelov12-Dec-16 12:31 
QuestionNetwork Sniffer in another language Pin
Adamsonn14-Aug-14 0:43
professionalAdamsonn14-Aug-14 0:43 
BugMemory leaking Pin
ruiwng4-Mar-13 0:34
ruiwng4-Mar-13 0:34 
Questionaccess permissions Pin
yudaavni18-Feb-13 4:01
yudaavni18-Feb-13 4:01 
AnswerRe: access permissions Pin
ruiwng4-Mar-13 0:39
ruiwng4-Mar-13 0:39 
QuestionNetwork problems Pin
AJMAL SHAHZAD10-Dec-12 18:48
AJMAL SHAHZAD10-Dec-12 18:48 
QuestionI've got problem with commpiling on VS 2008 Pin
1nbveh24-Apr-12 4:21
1nbveh24-Apr-12 4:21 
AnswerRe: I've got problem with commpiling on VS 2008 Pin
lakshmanakumar_varada7-Nov-12 22:58
lakshmanakumar_varada7-Nov-12 22:58 
GeneralMy vote of 1 Pin
robmar8-Nov-11 12:08
robmar8-Nov-11 12:08 
AnswerRe: My vote of 1 Pin
boris.pong18-Jun-12 21:23
boris.pong18-Jun-12 21:23 
Questioncan't build in visual 2010 + MS SDK 7.0 Pin
Yohanes Pradono23-Jul-11 19:11
Yohanes Pradono23-Jul-11 19:11 
1>c:\program files\microsoft visual studio 10.0\vc\atlmfc\include\atlcore.h(35): fatal error C1189: #error : This file requires _WIN32_WINNT to be #defined at least to 0x0403. Value 0x0501 or higher is recommended.

Please help. I'm beginner in C++
AnswerRe: can't build in visual 2010 + MS SDK 7.0 Pin
mla15427-Sep-11 6:26
mla15427-Sep-11 6:26 
Questionhey how to run this project ............... Pin
silverkali13-Oct-10 2:53
silverkali13-Oct-10 2:53 
AnswerRe: hey how to run this project ............... Pin
Yohanes Pradono23-Jul-11 15:26
Yohanes Pradono23-Jul-11 15:26 
GeneralMy vote of 1 Pin
dheeraj_jun218-Dec-08 17:34
dheeraj_jun218-Dec-08 17:34 
Generalpacket sniffer Pin
User 268325828-Oct-08 19:39
User 268325828-Oct-08 19:39 
GeneralRe: packet sniffer Pin
priyanka,oberoi110-Aug-09 1:33
priyanka,oberoi110-Aug-09 1:33 
GeneralGood Project, what is the format to save? does it support Packetbone Pin
jerrysmith2222-Jul-08 17:50
jerrysmith2222-Jul-08 17:50 
GeneralWhich compiler? Visual C++ .NET? (=Version 7) Pin
gerspeece28-Mar-08 5:16
gerspeece28-Mar-08 5:16 
GeneralRe: Which compiler? Visual C++ .NET? (=Version 7) Pin
Eran Aharonovich29-Mar-08 0:33
Eran Aharonovich29-Mar-08 0:33 
Questionhelp me how to compile and execute the project.... Pin
rahul.csit28-Feb-08 17:36
rahul.csit28-Feb-08 17:36 
QuestionIt works in visual c++ 6.0?? Pin
uriel_slp24-Oct-07 10:23
uriel_slp24-Oct-07 10:23 
AnswerRe: It works in visual c++ 6.0?? Pin
uriel_slp24-Oct-07 10:27
uriel_slp24-Oct-07 10:27 
QuestionPlease I Need Help Pin
mustafa_kh_200710-Sep-07 4:03
mustafa_kh_200710-Sep-07 4:03 
QuestionWe can catch the TCP packet only? Pin
MD8414-May-07 21:57
MD8414-May-07 21:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.