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

Method AddExtension

AdaptixClient/Source/Client/Storage.cpp:276–284  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

274}
275
276void Storage::AddExtension(const ExtensionFile &extFile)
277{
278 QSqlQuery query(QSqlDatabase::database(DB_CONNECTION_NAME));
279 query.prepare( "INSERT INTO Extensions (filepath, enabled) VALUES (:Filepath, :Enabled);");
280 query.bindValue(":Filepath", extFile.FilePath.toStdString().c_str());
281 query.bindValue(":Enabled", extFile.Enabled);
282 if (!query.exec())
283 LogError("The extension has not been added to the database: %s\n", query.lastError().text().toStdString().c_str());
284}
285
286void Storage::UpdateExtension(const ExtensionFile &extFile)
287{

Callers 1

SetExtensionMethod · 0.45

Calls 4

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

Tested by

no test coverage detected