查看: 407|回复: 0

[源码] [搬运]调用360云引擎并获取返回结果

[复制链接]

2

技术

13

魅力

3

原创

版主

禁止发言

Rank: 7Rank: 7Rank: 7

积分
4471
人气
169
分享
31

最佳新人活跃会员

发表于 2022-8-16 20:36:05 | 显示全部楼层 |阅读模式

原帖链接:https://blog.csdn.net/liyanda5/article/details/110292461
[C++] 纯文本查看 复制代码
 
CString Get360Cloud(CStringA m_md5)
{
    //请求体
    CStringA strBody;
    strBody.Format((
        "-------------------------------7d83e2d7a141e\r\n"
        "Content-Disposition: form-data; name=\"md5s\"\r\n"
        "\r\n"
        "%s        10485760 (风险)regqq.exe\r\n"
        "\r\n"
        "-------------------------------7d83e2d7a141e\r\n"
        "Content-Disposition: form-data; name=\"format\"\r\n"
        "\r\n"
        "XML\r\n"
        "-------------------------------7d83e2d7a141e\r\n"
        "Content-Disposition: form-data; name=\"product\"\r\n"
        "\r\n"
        "360zip\r\n"
        "-------------------------------7d83e2d7a141e\r\n"
        "Content-Disposition: form-data; name=\"combo\"\r\n"
        "\r\n"
        "360zip_main\r\n"
        "-------------------------------7d83e2d7a141e\r\n"
        "Content-Disposition: form-data; name=\"v\"\r\n"
        "\r\n"
        "2\r\n"
        "-------------------------------7d83e2d7a141e\r\n"
        "Content-Disposition: form-data; name=\"osver\"\r\n"
        "\r\n"
        "5.1\r\n"
        "-------------------------------7d83e2d7a141e\r\n"
        "Content-Disposition: form-data; name=\"vk\"\r\n"
        "\r\n"
        "a03bc211\r\n"
        "-------------------------------7d83e2d7a141e\r\n"
        "Content-Disposition: form-data; name=\"mid\"\r\n"
        "\r\n"
        "8a40d9eff408a78fe9ec10a0e7e60f62\r\n"
        "-------------------------------7d83e2d7a141e--"
        ),m_md5);
    CString strHeaders = _T(""); // 请求头
    //建立会话
    CInternetSession mysession;
    //连接到HTTP服务器/
    CHttpConnection* myconn = mysession.GetHttpConnection(_T("qup.f.360.cn"));
    //打开HTTP请求
    CHttpFile* myfile = myconn->OpenRequest(_T("POST"), _T("file_health_info.php"));
    //发送HTTP请求
    myfile->SendRequest(strHeaders,
        (LPVOID)(LPCSTR)strBody, strBody.GetLength());
 
    //从服务器读取字节流
 
    CString mystr;
    //CString temp;
    //while (myfile->ReadString(temp))
    //{
    //    mystr += temp;
    //}
 
    myfile->ReadString(mystr);
    USES_CONVERSION;
    LPSTR pStr = (LPSTR)mystr.GetBuffer();
    LPTSTR ptStr = A2T(pStr);
    mystr.ReleaseBuffer();
 
    myfile->Close();
    myconn->Close();
    delete myfile;
    delete myconn;
    mysession.Close();
    myfile = 0;
    myconn = 0;
    return ptStr;
}


YF工作室驻x64论坛分部
工作室曾开发的软件:YFSafe安全软件,YFChat在线聊天软件,MBRTools等。
欢迎有能力的你加入我们一起共同进步。请发邮件至yfstudio2021@outlook.com
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表