小编use*_*596的帖子

编译pshtoolkit的问题

我从这里下载了传递哈希工具包源代码.当我使用Visual Studio Ultimate 2010进行编译时,我会收到以下错误:

findfuncs_msv10.obj : error LNK2019: unresolved external symbol _GetModuleInformation@16 referenced in function _FindMSV10Functions
whosthere-alt.obj : error LNK2019: unresolved external symbol _LsaFreeReturnBuffer@4 referenced in function _GetLogonSessionData
whosthere-alt.obj : error LNK2019: unresolved external symbol _LsaGetlogonSessionData@8 referenced in function _GetLogonSessionData
whosthere-alt.obj : error LNK2019: unresolved external symbol _LsaEnumerateLogonSession@8 referenced in function _main
Run Code Online (Sandbox Code Playgroud)

如何解决此错误或是否有另一种更好的方法来编译代码.我是C的新手,我对任何建议持开放态度.

更新:我已链接Secur32.lib和Psapi.lib并进行编译.非常感谢

c compiler-errors

7
推荐指数
1
解决办法
268
查看次数

使用 libcurl 通过 HTTP POST 发送多个文件

我正在编写一个 C 应用程序,该应用程序使用带有 libcurl 的简单 HTTP POST 请求上传文件。我可以用一个文件来完成,但我不知道如何上传多个文件。我尝试使用相同代码的另一种方法,但无济于事。HTTP POST 的代码如下:

void sendHashes()
{
    struct curl_httppost *post = NULL;
    struct curl_httppost *last = NULL;
    CURL *curlhash;
    CURLcode response;

    curlhash = curl_easy_init();
    curl_easy_setopt(curlhash, CURLOPT_URL, URL);

    curl_formadd(&post, &last,
        CURLFORM_COPYNAME, "Hash",
        CURLFORM_FILECONTENT, "C:\\file.txt", 
        CURLFORM_END
    );

    curl_easy_setopt(curlhash, CURLOPT_HTTPPOST, post);

    response = curl_easy_perform(curlhash);
    curl_formfree(post);
    curl_easy_cleanup(curlhash);
}
Run Code Online (Sandbox Code Playgroud)

c http-post libcurl

6
推荐指数
1
解决办法
7430
查看次数

C++中这行代码的含义

我刚开始拿起C,我正在使用代码中的RSA密码.但是,这行代码让我很困惑.积分在此处从此站点发送给作者.

char* intmsg = new char[strlen(msg)*3 + 1];
Run Code Online (Sandbox Code Playgroud)

这是可以找到该行的方法.

inline void encrypt(char* msg,FILE* fout)
{
    /* This function actually does the encrypting of each message */

    unsigned int i;
    int tmp;
    char tmps[4];
    char* intmsg = new char[strlen(msg)*3 + 1];


    /* Here, (mpz_t) M is the messsage in gmp integer 
    *  and (mpz_t) c is the cipher in gmp integer */

    char ciphertext[1000];

    strcpy(intmsg,"");

    for(i=0;i<strlen(msg);i++)
    {
        tmp = (int)msg[i];

        /* print it in a 3 character wide format …
Run Code Online (Sandbox Code Playgroud)

c++ rsa

1
推荐指数
1
解决办法
322
查看次数

标签 统计

c ×2

c++ ×1

compiler-errors ×1

http-post ×1

libcurl ×1

rsa ×1