Click here to Skip to main content
15,886,110 members
Articles / Desktop Programming / MFC

Internet Traffic Firewall and Sniffer

Rate me:
Please Sign up or sign in to vote.
4.91/5 (26 votes)
23 Oct 2007GPL33 min read 100.9K   9.1K   133  
The article demonstrates internet packets interception with firewall capabilities based on IpFilterDriver driver and sending TCP/UDP/ICMP packets using raw sockets with IP spoofing support.
// MainFrm.h : interface of the CMainFrame class
//


#pragma once
class CMainFrame : public CFrameWnd
{

protected: // create from serialization only
        CMainFrame();
        DECLARE_DYNCREATE(CMainFrame)

// Attributes
public:

// Operations
public:

// Overrides
public:
        virtual BOOL PreCreateWindow(CREATESTRUCT& cs);

// Implementation
public:
        virtual ~CMainFrame();
#ifdef _DEBUG
        virtual void AssertValid() const;
        virtual void Dump(CDumpContext& dc) const;
#endif

protected:  // control bar embedded members
        CStatusBar  m_wndStatusBar;
        CToolBar    m_wndToolBar;

// Generated message map functions
protected:
        afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
        DECLARE_MESSAGE_MAP()

public:
        CString m_paneRaw;
        CString m_panePromisc;
        CString m_paneIpfilter;
        afx_msg void OnPaneRaw(CCmdUI *);
        afx_msg void OnPanePromisc(CCmdUI *);
        afx_msg void OnPaneIpfilter(CCmdUI *);
};


By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The GNU General Public License (GPLv3)


Written By
Engineer
Russian Federation Russian Federation
Highly skilled Engineer with 14 years of experience in academia, R&D and commercial product development supporting full software life-cycle from idea to implementation and further support. During my academic career I was able to succeed in MIT Computers in Cardiology 2006 international challenge, as a R&D and SW engineer gain CodeProject MVP, find algorithmic solutions to quickly resolve tough customer problems to pass product requirements in tight deadlines. My key areas of expertise involve Object-Oriented
Analysis and Design OOAD, OOP, machine learning, natural language processing, face recognition, computer vision and image processing, wavelet analysis, digital signal processing in cardiology.

Comments and Discussions