-
Notifications
You must be signed in to change notification settings - Fork 108
/
Copy pathDoser.h
41 lines (34 loc) · 1.21 KB
/
Doser.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#ifndef XERXES_DOSER_H
#define XERXES_DOSER_H
#include <array>
#include <openssl/ssl.h>
#include <openssl/err.h>
#include "Configuration.h"
#include "Logger.h"
class Doser {
public:
Doser(config *conf, Logger *logger);
void run();
private:
int make_socket(const char *host, const char *port);
void read_socket(int socket);
void read_socket(SSL *ssl);
int write_socket(int socket, const char* string, int length);
int write_socket(SSL *ssl, const char* string, int length);
std::string craft_packet(bool keep_alive=false);
static void broke(int);
std::string createStr();
int randomInt(int min, int max);
void attack(const int *id);
void attack_ssl(const int *id);
std::string randomizeUserAgent();
SSL_CTX* InitCTX();
SSL *Apply_SSL(int socket, SSL_CTX *ctx);
config *conf;
Logger *logger;
std::vector<std::string> encoding{"\'\'", "*", "identity", "gzip", "deflate"};
std::vector<std::string> caching{"no-cache", "max-age=0"};
std::vector<std::string> charset{"ISO-8859-1", "utf-8", "Windows-1251", "ISO-8859-2", "ISO-8859-15"};
std::vector<std::string> contenttype{"multipart/form-data", "application/x-url-encoded"};
};
#endif //XERXES_DOSER_H