我从这里下载了传递哈希工具包源代码.当我使用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 应用程序,该应用程序使用带有 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,我正在使用代码中的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)