Refactor to work on Linux / Unix, fix some compiler errors.

CMakeLists was also modified to make this work, but its scuffed
and i will hold on to that for a while longer
This commit is contained in:
Lion Kortlepel
2020-11-01 02:00:27 +01:00
parent 02fbe72eed
commit 8bc35fb82e
18 changed files with 254 additions and 41 deletions

View File

@@ -3,11 +3,12 @@
///
#include "Security/Enc.h"
#include "Settings.h"
#include <windows.h>
//#include <windows.h>
#include "Logger.h"
#include <sstream>
#include <thread>
#include <random>
#include <cassert>
int Rand(){
std::random_device r;
@@ -85,9 +86,10 @@ int Dec(int value,int d,int n){
}
int Handle(EXCEPTION_POINTERS *ep,char* Origin){
assert(false);
std::stringstream R;
R << Sec("Code : ") << std::hex
<< ep->ExceptionRecord->ExceptionCode
//<< ep->ExceptionRecord->ExceptionCode
<< std::dec << Sec(" Origin : ") << Origin;
except(R.str());
return 1;
@@ -116,4 +118,4 @@ std::string RSA_D(const std::string& Data, RSA*k){
ret += char(Dec(c,k->d,k->n));
}
return ret;
}
}