bool mimikatz::doCommandeLocale(wstring * fonction, vector<wstring> * arguments) { size_t monIndex = fonction->find(L"::"); wstring module = L""; wstring commande = *fonction; if(monIndex != wstring::npos) { module = fonction->substr(0, monIndex); commande = fonction->substr(monIndex + 2); } for(vector<KIWI_MIMIKATZ_LOCAL_MODULE>::iterator monModule = mesModules.begin(); monModule != mesModules.end(); monModule++) { if(module == monModule->module) { for(vector<KIWI_MIMIKATZ_LOCAL_MODULE_COMMAND>::iterator maCommande = monModule->commandes.begin(); maCommande != monModule->commandes.end(); maCommande++) { if(commande == maCommande->commandName) { return maCommande->ptrCommand(arguments); } } if(module.empty()) wcout << L"Local Command \'" << commande << L"\' found" << endl; else wcout << L"Module : \'" << module << L"\' identified command \'" << commande << L"\' found" << endl; wcout << endl << L"Module Description : " << monModule->description << endl; listCommandes(monModule); return true; } } wcout << L"Module : \'" << module << L"\' found" << endl << endl << L"Modules available : " << endl; listModules(); return true; }
bool mimikatz::doCommandeLocale(wstring * fonction, vector<wstring> * arguments) { size_t monIndex = fonction->find(L"::"); wstring module = L""; wstring commande = *fonction; if(monIndex != wstring::npos) { module = fonction->substr(0, monIndex); commande = fonction->substr(monIndex + 2); } for(vector<KIWI_MIMIKATZ_LOCAL_MODULE>::iterator monModule = mesModules.begin(); monModule != mesModules.end(); monModule++) { if(module == monModule->module) { for(vector<KIWI_MIMIKATZ_LOCAL_MODULE_COMMAND>::iterator maCommande = monModule->commandes.begin(); maCommande != monModule->commandes.end(); maCommande++) { if(commande == maCommande->commandName) { return maCommande->ptrCommand(arguments); } } if(module.empty()) (*outputStream) << L"Commande locale \'" << commande << L"\' introuvable" << endl; else (*outputStream) << L"Module : \'" << module << L"\' identifié, mais commande \'" << commande << L"\' introuvable" << endl; (*outputStream) << endl << L"Description du module : " << monModule->description << endl; listCommandes(monModule); return true; } } (*outputStream) << L"Module : \'" << module << L"\' introuvable" << endl << endl << L"Modules disponibles : " << endl; listModules(); return true; }