Click here to Skip to main content
15,892,674 members
Articles / Desktop Programming / MFC

PortScanner : Efficient TCP port scanner based on popular TCP Half Open scanning method

Rate me:
Please Sign up or sign in to vote.
4.42/5 (24 votes)
17 Jun 20044 min read 215.6K   10.8K   48  
A TCP port scanner
//////////////////////////////////////////////////////////////////////////////
//
//   PortScanner
//   Efficient TCP port scanner based on TCP half open scanning method.
//
//   Author  : Nagareshwar Y Talekar.
//	 Contact : nsry2002@yahoo.co.in
//	 Date    : 15-6-2004.
//
//   Name :  PortScannerDlg.h
//   Description : 
//
//////////////////////////////////////////////////////////////////////////////



#if !defined(AFX_PORTSCANNERDLG_H__0B6C8886_5499_11D6_888C_000B2B0F84B6__INCLUDED_)
#define AFX_PORTSCANNERDLG_H__0B6C8886_5499_11D6_888C_000B2B0F84B6__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include<afxwin.h>
#include"packet.h"
#include "resource.h"


/////////////////////////////////////////////////////////////////////////////
// CPortScannerDlg dialog

class CPortScannerDlg : public CDialog
{
// Construction
public:
	CPortScannerDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	//{{AFX_DATA(CPortScannerDlg)
	enum { IDD = IDD_PORTSCANNER_DIALOG };
		// NOTE: the ClassWizard will add data members here
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CPortScannerDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
	public :
	HICON m_hIcon;
	CListCtrl *list;
	CEdit *port1,*port2;
	CButton *butstart,*butstop;
	CComboBox *devlist;
	Packet *packet;
	
	// Generated message map functions
	//{{AFX_MSG(CPortScannerDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnButton2();
	afx_msg void OnButton1();
	BOOL GetMacAddress();
	virtual void OnCancel();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_PORTSCANNERDLG_H__0B6C8886_5499_11D6_888C_000B2B0F84B6__INCLUDED_)

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 has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
India India
Nagareshwar is a security enthusiastic person involved in reverse engineering, vulnerability research, coding security tools etc. He spend most of the time in uncovering the secrets of computer world.

He holds 'Bachelor of Engineering' degree from National Institute of Technology of Karnataka, India. He had professional experience of 2.5 years in Novell. At Novell he was working on various security products including 'Novell Secure Login' and CASA.

For more details visit his website http://securityxploded.com

Comments and Discussions