2023-06-12 04:00:33 +00:00
|
|
|
#include <stdio.h>
|
2024-02-18 20:20:52 +00:00
|
|
|
|
|
|
|
#ifdef _WIN32
|
|
|
|
#include <ws2tcpip.h>
|
|
|
|
#else
|
|
|
|
#include <arpa/inet.h>
|
|
|
|
#endif
|
2023-06-12 04:00:33 +00:00
|
|
|
|
2023-06-03 19:52:10 +00:00
|
|
|
enum demode {
|
|
|
|
DESYNC_NONE,
|
|
|
|
DESYNC_SPLIT,
|
|
|
|
DESYNC_DISORDER,
|
|
|
|
DESYNC_FAKE
|
|
|
|
};
|
|
|
|
|
|
|
|
struct params {
|
2023-10-08 11:43:34 +00:00
|
|
|
char de_known;
|
2023-06-03 19:52:10 +00:00
|
|
|
int ttl;
|
|
|
|
int split;
|
|
|
|
size_t sfdelay;
|
|
|
|
enum demode attack;
|
|
|
|
char split_host;
|
|
|
|
int def_ttl;
|
2023-10-16 12:44:24 +00:00
|
|
|
char custom_ttl;
|
2023-06-03 19:52:10 +00:00
|
|
|
int mod_http;
|
2024-02-18 14:19:11 +00:00
|
|
|
char tlsrec;
|
|
|
|
int tlsrec_pos;
|
|
|
|
char tlsrec_sni;
|
2023-06-03 19:52:10 +00:00
|
|
|
|
|
|
|
char ipv6;
|
|
|
|
char resolve;
|
|
|
|
int max_open;
|
|
|
|
int debug;
|
|
|
|
size_t bfsize;
|
2023-10-08 11:43:34 +00:00
|
|
|
struct sockaddr_in6 baddr;
|
2023-06-03 19:52:10 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
extern struct params params;
|
|
|
|
|
|
|
|
struct packet {
|
2023-10-08 11:43:34 +00:00
|
|
|
ssize_t size;
|
|
|
|
char *data;
|
2023-06-03 19:52:10 +00:00
|
|
|
};
|
|
|
|
extern struct packet fake_tls;
|
|
|
|
extern struct packet fake_http;
|
|
|
|
|
|
|
|
#define LOG_S 1
|
|
|
|
#define LOG_L 2
|
|
|
|
|
|
|
|
#define LOG(s, str, ...) \
|
2023-06-12 08:01:40 +00:00
|
|
|
if (params.debug >= s) printf(str, ##__VA_ARGS__)
|
2023-10-08 11:43:34 +00:00
|
|
|
|