91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

資源簡介

檢測出所有局域網(wǎng)PC,然后通過配置,生成.rdp文件,直接通過算法將密碼寫入這個文件,運行這個文件就無需輸入密碼,vs2008下開發(fā),vs2008及以上版本可正常編譯

資源截圖

代碼片段和文件信息

//?DlgSetRdp.cpp?:?實現(xiàn)文件
//

#include?“stdafx.h“
#include?“TCPSERVER.h“
#include?“DlgSetRdp.h“
#include?
#include?
using?namespace?std;

//?CDlgSetRdp?對話框


IMPLEMENT_DYNAMIC(CDlgSetRdp?CDialog)

CDlgSetRdp::CDlgSetRdp(CWnd*?pParent?/*=NULL*/)
:?CDialog(CDlgSetRdp::IDD?pParent)
{

}

CDlgSetRdp::~CDlgSetRdp()
{
}

void?CDlgSetRdp::DoDataExchange(CDataExchange*?pDX)
{
CDialog::DoDataExchange(pDX);
DDX_Control(pDX?IDC_STATIC_IP?m_txtIp);
DDX_Control(pDX?IDC_EDIT_USERNAME?m_editUsername);
DDX_Control(pDX?IDC_EDIT_PASSWORD?m_editPass);
}


BEGIN_MESSAGE_MAP(CDlgSetRdp?CDialog)
ON_BN_CLICKED(IDOK?&CDlgSetRdp::OnBnClickedOk)
END_MESSAGE_MAP()


//?CDlgSetRdp?消息處理程序

BOOL?CDlgSetRdp::OnInitDialog()
{
CDialog::OnInitDialog();

//?TODO:??在此添加額外的初始化
m_txtIp.SetWindowText(m_strIp);
return?TRUE;??//?return?TRUE?unless?you?set?the?focus?to?a?control
//?異常:?OCX?屬性頁應(yīng)返回?FALSE
}
std::wstring?MbsToWcs(?const?std::string&?mbs?)?{??
int?lengthOfWcs?=?MultiByteToWideChar(?CP_ACP?0?mbs.c_str()?-1?NULL?0?);
wchar_t*?wcs?=?new?wchar_t[?lengthOfWcs?];
MultiByteToWideChar(?CP_ACP?0?mbs.c_str()?-1?wcs?lengthOfWcs?);
std::wstring?result?=?wcs;
delete?wcs;
wcs?=?NULL;
return?result;
}
void?CDlgSetRdp::OnBnClickedOk()
{
CString?strPass;
m_editPass.GetWindowText(strPass);

CString?strUser;
m_editUsername.GetWindowText(strUser);
string?strPassword?=?strPass.GetBuffer();
wstring?strWpassword?=?MbsToWcs(strPassword);
DATA_BLOB?DataIn;
DATA_BLOB?DataOut;
//?mstsc.exe中使用的是unicode所以必須做寬字符轉(zhuǎn)換
BYTE?*pbDataInput?=(BYTE?*)strWpassword.c_str();
DWORD?cbDataInput?=?wcslen(strWpassword.c_str())*sizeof(wchar_t);

DataIn.pbData?=?pbDataInput;
DataIn.cbData?=?cbDataInput;

CString?passwordres;
if(CryptProtectData(
&DataIn
L“psw“????????????????????????????????//?A?description?string
//?to?be?included?with?the
//?encrypted?data.
NULL???????????????????????????????//?Optional?entropy?not?used.
NULL???????????????????????????????//?Reserved.
NULL???????????????????????????????//?Pass?NULL?for?the
//?prompt?structure.
0
&DataOut))
{
int?count=0;
while?(?count?<=?(int)DataOut.cbData?){
//?因為一個unsigned?int?占32位
//?轉(zhuǎn)換成成16進制要占兩位
//?所以這里需要用%02
char?tmp[100]?=?{0};
sprintf(tmp“%02X“DataOut.pbData[count]);
passwordres?+=?tmp;
count++;
}
}
CString?strFile;
strFile.Format(“screen?mode?id:i:1\n“
“desktopwidth:i:1024\n“
“desktopheight:i:768\n“
“session?bpp:i:16\n“
“winposstr:s:01161236969863\n“
“full?address:s:%s\n“
“compression:i:1\n“
“keyboardhook:i:2\n“
“audiomode:i:0\n“
“redirectdrives:i:0\n“
“redirectprinters:i:1\n“
“redirectcomports:i:0\n“
“redirectsmartcards:i:1\n“
“drivestoredirect:s:C:;D:;\n“
“displayconnectionbar:i:1\n“
“autoreconnection?enabled:i:0\n“
“username:s:%s\n“
“domain:s:\n“
“alternate?shell:s:\n“

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件???????1776??2012-12-25?18:39??TCPSERVER\dat\1?Default.rdp

?????文件????????888??2012-12-25?19:32??TCPSERVER\dat\192.168.1.28.rdp

?????文件???????3647??2012-12-26?11:01??TCPSERVER\DlgSetRdp.cpp

?????文件????????542??2012-12-25?19:06??TCPSERVER\DlgSetRdp.h

?????文件?????????19??2012-12-25?11:43??TCPSERVER\MemPool.cpp

?????文件??????????0??2012-12-25?11:32??TCPSERVER\MemPool.h

?????文件???????2799??2012-12-24?16:37??TCPSERVER\ReadMe.txt

?????文件??????21630??2003-07-24?09:52??TCPSERVER\res\TCPSERVER.ico

?????文件????????365??2012-12-24?16:37??TCPSERVER\res\TCPSERVER.rc2

?????文件???????1143??2012-12-25?19:01??TCPSERVER\resource.h

?????文件????????140??2012-12-24?16:37??TCPSERVER\stdafx.cpp

?????文件???????1842??2012-12-25?13:20??TCPSERVER\stdafx.h

?????文件???????1030??2012-12-24?16:37??TCPSERVER\targetver.h

?????文件??????43804??2013-06-04?09:20??TCPSERVER\TCPSERVER.APS

?????文件???????2504??2012-12-25?19:59??TCPSERVER\TCPSERVER.cpp

?????文件????????764??2012-12-25?19:59??TCPSERVER\TCPSERVER.h

?????文件???????6427??2012-12-26?10:00??TCPSERVER\TCPSERVER.rc

?????文件????????883??2012-12-24?16:37??TCPSERVER\TCPSERVER.sln

?????文件???????5840??2012-12-25?20:03??TCPSERVER\TCPSERVER.vcproj

?????文件??????13576??2012-12-25?19:58??TCPSERVER\TCPSERVERDlg.cpp

?????文件???????1132??2012-12-25?18:53??TCPSERVER\TCPSERVERDlg.h

?????目錄??????????0??2013-01-05?16:21??TCPSERVER\dat

?????目錄??????????0??2013-01-05?16:21??TCPSERVER\res

?????目錄??????????0??2013-06-27?09:13??TCPSERVER

-----------?---------??----------?-----??----

???????????????110751????????????????????24


評論

共有 條評論