From f5b5b12eec7dcd1ca33cdce95746f2f7049437a0 Mon Sep 17 00:00:00 2001 From: Apex Liu Date: Wed, 6 Dec 2017 03:10:57 +0800 Subject: [PATCH] temp. --- client/tp_assist_win/ts_http_rpc.cpp | 60 ++++++++++++++-------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/client/tp_assist_win/ts_http_rpc.cpp b/client/tp_assist_win/ts_http_rpc.cpp index 43703df..e94d928 100644 --- a/client/tp_assist_win/ts_http_rpc.cpp +++ b/client/tp_assist_win/ts_http_rpc.cpp @@ -50,8 +50,8 @@ End Sub #ifdef RDP_CLIENT_SYSTEM_BUILTIN -#include -#pragma comment(lib, "Crypt32.lib") +// #include +// #pragma comment(lib, "Crypt32.lib") std::string rdp_content = "\ connect to console:i:%d\n\ @@ -174,34 +174,34 @@ int ts_url_decode(const char *src, int src_len, char *dst, int dst_len, int is_f return i >= src_len ? j : -1; } -#ifdef RDP_CLIENT_SYSTEM_BUILTIN -bool calc_psw51b(const char* password, std::string& ret) -{ - DATA_BLOB DataIn; - DATA_BLOB DataOut; - - ex_wstr w_pswd; - ex_astr2wstr(password, w_pswd, EX_CODEPAGE_ACP); - - DataIn.cbData = w_pswd.length() * sizeof(wchar_t); - DataIn.pbData = (BYTE*)w_pswd.c_str(); - - - if (!CryptProtectData(&DataIn, L"psw", NULL, NULL, NULL, 0, &DataOut)) - return false; - - char szRet[5] = {0}; - for (int i = 0; i < DataOut.cbData; ++i) - { - sprintf_s(szRet, 5, "%02X", DataOut.pbData[i]); - ret += szRet; - } - - LocalFree(DataOut.pbData); - return true; -} -#endif - +// #ifdef RDP_CLIENT_SYSTEM_BUILTIN +// bool calc_psw51b(const char* password, std::string& ret) +// { +// DATA_BLOB DataIn; +// DATA_BLOB DataOut; +// +// ex_wstr w_pswd; +// ex_astr2wstr(password, w_pswd, EX_CODEPAGE_ACP); +// +// DataIn.cbData = w_pswd.length() * sizeof(wchar_t); +// DataIn.pbData = (BYTE*)w_pswd.c_str(); +// +// +// if (!CryptProtectData(&DataIn, L"psw", NULL, NULL, NULL, 0, &DataOut)) +// return false; +// +// char szRet[5] = {0}; +// for (int i = 0; i < DataOut.cbData; ++i) +// { +// sprintf_s(szRet, 5, "%02X", DataOut.pbData[i]); +// ret += szRet; +// } +// +// LocalFree(DataOut.pbData); +// return true; +// } +// #endif +// TsHttpRpc::TsHttpRpc() { m_stop = false;