📄 tcpscandlg.cpp
字号:
// TcpScanDlg.cpp : implementation file
//
#include "stdafx.h"
#include "BeastScaner.h"
#include "TcpScanDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CTcpScanDlg dialog
IMPLEMENT_DYNAMIC(CTcpScanDlg, CDialog)
CTcpScanDlg::CTcpScanDlg(CWnd* pParent /*=NULL*/)
: CDialog(CTcpScanDlg::IDD, pParent)
{
shTimeoutValue=2;
bConnectScan=false;
pThreadParament=NULL;
}
CTcpScanDlg::~CTcpScanDlg()
{
}
void CTcpScanDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CTcpScanDlg)
DDX_Control(pDX, IDC_EDIT1, CTimeOutEditCtrl);
DDX_Text(pDX, IDC_EDIT1, shTimeoutValue);
DDV_MinMaxInt(pDX, shTimeoutValue, 1, 10);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CTcpScanDlg, CDialog)
//{{AFX_MSG_MAP(CTcpScanDlg)
ON_BN_CLICKED(IDC_RADIO1, OnBnClickedRadioConnectScan)
ON_BN_CLICKED(IDC_RADIO2, OnBnClickedRadioSYNScan)
ON_BN_CLICKED(IDC_RADIO3, OnBnClickedRadioFINScan)
ON_BN_CLICKED(IDC_BUTTON4, OnBnClickedStartTcpScan)
ON_BN_CLICKED(IDC_RADIO4, OnBnClickedRadioXMan)
ON_BN_CLICKED(IDC_RADIO5, OnBnClickedRadioNull)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CTcpScanDlg message handlers
void CTcpScanDlg::OnBnClickedRadioConnectScan()
{
// TODO: Add your control notification handler code here
this->CTimeOutEditCtrl.EnableWindow(FALSE);
this->emScanType=TCP_CONNECT_SCAN;
}
void CTcpScanDlg::OnBnClickedRadioSYNScan()
{
// TODO: Add your control notification handler code here
this->CTimeOutEditCtrl.EnableWindow(TRUE);
this->emScanType=TCP_SYN_SCAN;
}
void CTcpScanDlg::OnBnClickedRadioFINScan()
{
// TODO: Add your control notification handler code here
this->CTimeOutEditCtrl.EnableWindow(TRUE);
this->emScanType=TCP_FIN_SCAN;
}
void CTcpScanDlg::OnBnClickedStartTcpScan()
{
// TODO: Add your control notification handler code here
this->pParamentConstructor->SendMessage(WM_CONSTRUCT_PARAM);
this->UpdateData();
this->pThreadParament->dwTimeOut=this->shTimeoutValue;
pMainWindow->SendMessage(WM_BEGIN_SCAN,this->emScanType,(LPARAM)this->pThreadParament);
}
void CTcpScanDlg::OnBnClickedRadioXMan()
{
// TODO: Add your control notification handler code here
this->CTimeOutEditCtrl.EnableWindow(TRUE);
this->emScanType=TCP_XMAN_SCAN;
}
void CTcpScanDlg::OnBnClickedRadioNull()
{
// TODO: Add your control notification handler code here
this->CTimeOutEditCtrl.EnableWindow(TRUE);
this->emScanType=TCP_NULL_SCAN;
}
void CTcpScanDlg::OnOK()
{
this->OnBnClickedStartTcpScan();
}
BOOL CTcpScanDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
((CButton *)GetDlgItem(IDC_RADIO1))->SetCheck(TRUE);//选上
this->emScanType=TCP_CONNECT_SCAN;
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -