2024年1月24日发(作者:)
第三个问题是:错误 error C2220: 警告被视为错误错误 error C2220: 警告被视为错误
代码如下:NTSTATUS mimikatz_doLocal(wchar_t * input){ NTSTATUS status = STATUS_SUCCESS; int argc; wchar_t ** argv = CommandLineToArgvW(input, &argc), *module = NULL, *command = NULL, *match; unsigned short indexModule, indexCommand; BOOL moduleFound = FALSE, commandFound = FALSE;
if(argv && (argc > 0)) { if(match = wcsstr(argv[0], L"::")) { if(module = (wchar_t *) LocalAlloc(LPTR, (match - argv[0] + 1) * sizeof(wchar_t))) { if((unsigned int) (match + 2 - argv[0]) < wcslen(argv[0])) command = match + 2; RtlCopyMemory(module, argv[0], (match - argv[0]) * sizeof(wchar_t)); } } else command = argv[0]; for(indexModule = 0; !moduleFound && (indexModule < ARRAYSIZE(mimikatz_modules)); indexModule++) if(moduleFound = (!module || (_wcsicmp(module, mimikatz_modules[indexModule]->shortName) == 0))) if(command) for(indexCommand = 0; !commandFound && (indexCommand < mimikatz_modules[indexModule]->nbCommands); indexCommand++) if(commandFound = _wcsicmp(command, mimikatz_modules[indexModule]->commands[indexCommand].command) == 0) status = mimikatz_modules[indexModule]->commands[indexCommand].pCommand(argc - 1, argv + 1); if(!moduleFound) { PRINT_ERROR(L""%s" module not found !n", module); for(indexModule = 0; indexModule < ARRAYSIZE(mimikatz_modules); indexModule++) { kprintf(L"n%16s", mimikatz_modules[indexModule]->shortName); if(mimikatz_modules[indexModule]->fullName) kprintf(L" - %s", mimikatz_modules[indexModule]->fullName); if(mimikatz_modules[indexModule]->description) kprintf(L" [%s]", mimikatz_modules[indexModule]->description); } kprintf(L"n"); } else if(!commandFound) { indexModule -= 1; PRINT_ERROR(L""%s" command of "%s" module not found !n", command, mimikatz_modules[indexModule]->shortName); kprintf(L"nModule :t%s", mimikatz_modules[indexModule]->shortName); if(mimikatz_modules[indexModule]->fullName) kprintf(L"nFull name :t%s", mimikatz_modules[indexModule]->fullName); if(mimikatz_modules[indexModule]->description) kprintf(L"nDescription :t%s", mimikatz_modules[indexModule]->description); kprintf(L"n"); for(indexCommand = 0; indexCommand < mimikatz_modules[indexModule]->nbCommands; indexCommand++) { kprintf(L"n%16s", mimikatz_modules[indexModule]->commands[indexCommand].command); if(mimikatz_modules[indexModule]->commands[indexCommand].description) kprintf(L" - %s", mimikatz_modules[indexModule]->commands[indexCommand].description); } kprintf(L"n"); } if(module) LocalFree(module);


发布评论