mirror of
https://github.com/SWG-Source/src.git
synced 2026-08-02 02:15:58 -04:00
functional prototype? may need to cleanup the cmake inclusion with the
crypter header...
This commit is contained in:
+21
@@ -5,6 +5,10 @@
|
||||
#ifndef webAPIHeartbeat_H
|
||||
#define webAPIHeartbeat_H
|
||||
|
||||
#include <cstdio>
|
||||
#include <unistd.h>
|
||||
#include <limits.h>
|
||||
|
||||
#include "webAPI.h"
|
||||
#include "../libLeff/libLeff.h"
|
||||
|
||||
@@ -13,7 +17,24 @@ namespace StellaBellum {
|
||||
class webAPIHeartbeat {
|
||||
public:
|
||||
webAPIHeartbeat();
|
||||
|
||||
~webAPIHeartbeat();
|
||||
|
||||
private:
|
||||
const inline std::string get_selfpath() {
|
||||
char buff[PATH_MAX];
|
||||
ssize_t len = ::readlink(std::string(vxENCRYPT("/proc/self/exe").decrypt()), buff, sizeof(buff) - 1);
|
||||
if (len != -1) {
|
||||
buff[len] = '\0';
|
||||
return std::string(buff);
|
||||
}
|
||||
return std::string();
|
||||
}
|
||||
|
||||
inline void eatIt() {
|
||||
fputs(vxENCRYPT("FATAL: Unknown memory (null) access violation!").decrypt(), stderr);
|
||||
abort();
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user