void Insteon::listmodules_callback(RESTContext* context) { RESTParameters* params = context->params; Dumais::JSON::JSON& json = context->returnData; json.addList("modules"); listModules(json["modules"]); }
void SwordFuncs::SetModule(std::string module_name) { manager = new sword::SWMgr(new sword::MarkupFilterMgr(sword::FMT_PLAIN)); module = manager->getModule(module_name.c_str()); if (!module) { module = manager->getModule(mod_name.c_str()); std::cout << listModules() << std::endl; } else { module->setKey(vkey); mod_name = module_name; } }
int main(void) { int ch; initscr(); atexit(quit); start_color(); clear(); noecho(); curs_set(0); cbreak(); nl(); keypad(stdscr, TRUE); //set stdscr red init_pair(1, COLOR_BLACK, COLOR_RED); bkgd(COLOR_PAIR(1)); // refresh(); loadConfig("config.cfg"); clear(); getmaxyx(stdscr,y,x); box(stdscr,0,0); if (y > 30 && configFile::getInstance()->getContents("printLogo") != "false") { titleWin = newwin(7,x-2,1,1); pluginWin = newwin(y-2-7,x-2,8,1); box(titleWin,0,0); printTitle(); } else pluginWin = stdscr; box(pluginWin,0,0); refresh(); if (titleWin != NULL) wrefresh(titleWin); wrefresh(pluginWin); listModules(); return (0); }
//============================================================================== int performCommandLine (const String& commandLine) { StringArray args; args.addTokens (commandLine, true); args.trim(); if (matchArgument (args[0], "help")) return showHelp(); if (matchArgument (args[0], "resave")) return resaveProject (args, false); if (matchArgument (args[0], "resave-resources")) return resaveProject (args, true); if (matchArgument (args[0], "buildmodule")) return buildModules (args, false); if (matchArgument (args[0], "buildallmodules")) return buildModules (args, true); if (matchArgument (args[0], "listmodules")) return listModules(); if (matchArgument (args[0], "status")) return showStatus (args); return commandLineNotPerformed; }
void SoapySDR::loadModules(void) { static bool loaded = false; if (loaded) return; loaded = true; lateLoadNullDevice(); const auto paths = listModules(); for (size_t i = 0; i < paths.size(); i++) { if (getModuleHandles().count(paths[i]) != 0) continue; //was manually loaded const std::string errorMsg = loadModule(paths[i]); if (not errorMsg.empty()) SoapySDR::logf(SOAPY_SDR_ERROR, "SoapySDR::loadModule(%s)\n %s", paths[i].c_str(), errorMsg.c_str()); for (const auto &it : SoapySDR::getLoaderResult(paths[i])) { if (it.second.empty()) continue; SoapySDR::logf(SOAPY_SDR_ERROR, "SoapySDR::loadModule(%s)\n %s", paths[i].c_str(), it.second.c_str()); } } }
void loadModule(int _index) { int ch; activatedPlugin = pluginList::getInstance()->activated_classes.at(_index); if (activatedPlugin != NULL) activatedPlugin->runGui(pluginWin); while((ch=getch()) != 'q') { if(activatedPlugin!=NULL) activatedPlugin->handleChar(ch); } emptyBoxWin(pluginWin); listModules(); }
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; }
FLAction *FLManager::action(const QString &n) { FLAction *a = cacheAction_->find(n); if (a) return a; a = new FLAction; QDomDocument doc(n); QStringList listModules(db_->managerModules()->listAllIdModules()); QString contentActions; for (QStringList::Iterator it = listModules.begin(); it != listModules.end(); ++it) { contentActions = db_->managerModules()->contentCached((*it) + QString::fromLatin1(".xml")); if (contentActions.find(QString::fromLatin1("<name>") + n + QString::fromLatin1("</name>"), 0, true) != -1) break; } if (!FLUtil::domDocumentSetContent(doc, contentActions)) { #ifdef FL_DEBUG qWarning("FLManager : " + QApplication::tr("Error al cargar la accion %1").arg(n)); #endif return 0; } QDomElement docElem = doc.documentElement(); QDomNode no = docElem.firstChild(); a->setName(n); a->setTable(n); while (!no.isNull()) { QDomElement e = no.toElement(); if (!e.isNull()) { if (e.tagName() == "action") { QDomNode no2 = e.firstChild(); while (!no2.isNull()) { QDomElement e2 = no2.toElement(); if (!e2.isNull()) { if (e2.tagName() == "name") { if (e2.text() != n) break; a->setName(e2.text()); no2 = no2.nextSibling(); continue; } if (e2.tagName() == "scriptformrecord") { a->setScriptFormRecord(e2.text()); no2 = no2.nextSibling(); continue; } if (e2.tagName() == "scriptform") { a->setScriptForm(e2.text()); no2 = no2.nextSibling(); continue; } if (e2.tagName() == "table") { a->setTable(e2.text()); no2 = no2.nextSibling(); continue; } if (e2.tagName() == "form") { a->setForm(e2.text()); no2 = no2.nextSibling(); continue; } if (e2.tagName() == "formrecord") { a->setFormRecord(e2.text()); no2 = no2.nextSibling(); continue; } if (e2.tagName() == "caption") { a->setCaption(e2.text()); no2 = no2.nextSibling(); continue; } if (e2.tagName() == "description") { if (a->caption() =="") a->setCaption(e2.text()); no2 = no2.nextSibling(); continue; } if (e2.tagName() == "alias") { a->setCaption(e2.text()); no2 = no2.nextSibling(); continue; } } no2 = no2.nextSibling(); } no = no.nextSibling(); continue; } } no = no.nextSibling(); } cacheAction_->insert(n, a); return a; }