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

Method ExistsExtension

AdaptixClient/Source/Client/Storage.cpp:264–274  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

262}
263
264bool Storage::ExistsExtension(const QString &path)
265{
266 QSqlQuery query(QSqlDatabase::database(DB_CONNECTION_NAME));
267 query.prepare("SELECT 1 FROM Extensions WHERE filepath = :Filepath LIMIT 1;");
268 query.bindValue(":Filepath", path);
269 if (!query.exec()) {
270 LogError("Failed to query extension from database: %s\n", query.lastError().text().toStdString().c_str());
271 return false;
272 }
273 return query.next();
274}
275
276void Storage::AddExtension(const ExtensionFile &extFile)
277{

Callers 1

SetExtensionMethod · 0.80

Calls 4

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

Tested by

no test coverage detected