mirror of
https://bitbucket.org/seefoe/src.git
synced 2026-10-10 00:13:35 -04:00
okies, she builds now so up next is making it actually do something
useful
This commit is contained in:
+3
-2
@@ -70,7 +70,7 @@ template<uint32_t... Idx> struct vxCplEncryptedString<vxCplIndexList<Idx...> > {
|
||||
char Value[sizeof...(Idx) + 1]; // Buffer for a string
|
||||
|
||||
// Compile-time constructor
|
||||
constexpr inline vxCplEncryptedString(const char *const Str) : Value({vxCplEncryptChar(Str[Idx], Idx)...}) {}
|
||||
constexpr inline vxCplEncryptedString(const char *const Str) : Value{vxCplEncryptChar(Str[Idx], Idx)...} {}
|
||||
|
||||
// Run-time decryption
|
||||
char *decrypt() {
|
||||
@@ -83,4 +83,5 @@ template<uint32_t... Idx> struct vxCplEncryptedString<vxCplIndexList<Idx...> > {
|
||||
};
|
||||
|
||||
// Compile-time string encryption macro
|
||||
#define vxENCRYPT(Str) (vxCplEncryptedString<vxCplIndexes<sizeof(Str) - 1>::Result>(Str).decrypt())
|
||||
//#define vxENCRYPT(Str) (vxCplEncryptedString<vxCplIndexes<sizeof(Str) - 1>::Result>(Str).decrypt())
|
||||
#define vxENCRYPT(Str) (vxCplEncryptedString<vxCplIndexes<sizeof(Str) - 1>::Result>(Str))
|
||||
|
||||
+7
-7
@@ -6,16 +6,16 @@
|
||||
|
||||
using namespace StellaBellum;
|
||||
|
||||
webAPIHeartbeat:webAPIHeartbeat() {
|
||||
vxCplEncryptedString u = vxENCRYPT("https://login.stellabellum.net/metriccontroller/shoulderTap?type=server");
|
||||
#define vxENCRYPT2(Str) (vxCplEncryptedString<vxCplIndexes<sizeof(Str) - 1>::Result>(Str))
|
||||
|
||||
webAPI handle = webAPI::webAPI(u.decrypt());
|
||||
webAPIHeartbeat::webAPIHeartbeat() {
|
||||
auto u = vxENCRYPT("https://login.stellabellum.net/metriccontroller/shoulderTap?type=server");
|
||||
|
||||
webAPI handle = webAPI::webAPI(std::string(u.decrypt()));
|
||||
|
||||
handle.addJsonData("ip", "test");
|
||||
|
||||
bool result = fetch.submit(); // data is stored as a class member
|
||||
bool result = handle.submit(); // data is stored as a class member
|
||||
|
||||
// do stuff
|
||||
|
||||
delete handle;
|
||||
};
|
||||
};
|
||||
|
||||
+2
-7
@@ -5,20 +5,15 @@
|
||||
#ifndef webAPIHeartbeat_H
|
||||
#define webAPIHeartbeat_H
|
||||
|
||||
#include <unordered_list>
|
||||
|
||||
#include "webAPI.h"
|
||||
#include "../libLeff/libLeff.h"
|
||||
|
||||
|
||||
namespace StellaBellum {
|
||||
|
||||
class webAPIHeartbeat {
|
||||
public:
|
||||
webAPIHeartbeat:webAPIHeartbeat();
|
||||
webAPIHeartbeat:~webAPIHeartbeat();
|
||||
|
||||
bool sendHeartbeat(std::unordered_map<std::string, std::string> metricsData = nullptr);
|
||||
webAPIHeartbeat();
|
||||
~webAPIHeartbeat();
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user