MCPcopy Create free account
hub / github.com/Adaptix-Framework/AdaptixC2 / UpdateSettingsGraph

Method UpdateSettingsGraph

AdaptixClient/Source/Client/Storage.cpp:441–452  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

439}
440
441void Storage::UpdateSettingsGraph(const SettingsData &settingsData)
442{
443 QJsonObject json;
444 json["version"] = settingsData.GraphVersion;
445 QString data = QJsonDocument(json).toJson(QJsonDocument::Compact);
446
447 QSqlQuery query(QSqlDatabase::database(DB_CONNECTION_NAME));
448 query.prepare("INSERT OR REPLACE INTO Settings (key, data) VALUES ('SettingsGraph', :Data);");
449 query.bindValue(":Data", data);
450 if (!query.exec())
451 LogError("SettingsGraph not updated in database: %s\n", query.lastError().text().toStdString().c_str());
452}
453
454void Storage::SelectSettingsTasks(SettingsData* settingsData)
455{

Callers 1

SaveToDBMethod · 0.80

Calls 5

LogErrorFunction · 0.85
execMethod · 0.80
toStdStringMethod · 0.80
toJsonMethod · 0.45
textMethod · 0.45

Tested by

no test coverage detected