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

Method encode_data

AdaptixClient/Source/Client/AxScript/BridgeApp.cpp:712–729  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

710}
711
712QString BridgeApp::encode_data(const QString &algorithm, const QString &data, const QString &key) const
713{
714 QByteArray bytes = data.toUtf8();
715 QString alg = algorithm.toLower();
716
717 if (alg == "hex")
718 return QString::fromLatin1(bytes.toHex());
719 if (alg == "base64")
720 return QString::fromLatin1(bytes.toBase64());
721 if (alg == "base32")
722 return QString::fromLatin1(encodeBase32(bytes));
723 if (alg == "zip")
724 return QString::fromLatin1(qCompress(bytes).toBase64());
725 if (alg == "xor")
726 return QString::fromLatin1(applyXor(bytes, key.toUtf8()).toBase64());
727
728 return data;
729}
730
731QString BridgeApp::decode_data(const QString &algorithm, const QString &data, const QString &key) const
732{

Callers

nothing calls this directly

Calls 2

encodeBase32Function · 0.85
applyXorFunction · 0.85

Tested by

no test coverage detected