我已经从 here 下载了 pass the hash 工具包源代码.当我使用 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
我该如何解决这个错误,或者是否有其他更好的方法来编译代码。我是 C 的新手,我愿意接受任何建议。
更新:我已经链接了 Secur32.lib 和 Psapi.lib 并且它可以编译。非常感谢
最佳答案
听起来您需要链接到一些额外的库。
如果您在 MSDN 中搜索错误中列出的函数(减去前导下划线) , 它会告诉你要链接到哪些库。
例如
- GetModuleInformation位于 Kernel32.lib 或 Psaip.lib 中,具体取决于您使用的 Windows 版本
- LsaGetLogonSessionData在Secur32.lib中
关于c - 编译 pshtoolkit 的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12969998/