Update faking strategies

Use random ip4 id for frags, use sequential ip4 id for fakes
This commit is contained in:
Vadim Vetrov
2024-10-12 12:19:33 +03:00
parent 30bc3a8d3f
commit e9b033ccca
14 changed files with 397 additions and 270 deletions

23
tls.h
View File

@@ -2,6 +2,7 @@
#define TLS_H
#include "types.h"
#include "utils.h"
/**
@@ -22,28 +23,6 @@ struct tls_verdict {
struct tls_verdict analyze_tls_data(const uint8_t *data, uint32_t dlen);
struct fake_type {
#define FAKE_PAYLOAD_RANDOM 0
#define FAKE_PAYLOAD_DATA 1
// In default mode all other options will be skipped.
#define FAKE_PAYLOAD_DEFAULT 2
int type;
// Length of the final fake message.
// Pass 0 in RANDOM mode to make it random
uint16_t fake_len;
// Payload of the fake message of fake_len length.
// Will be omitted in RANDOM mode.
const char *fake_data;
// faking strategy of the fake packet.
// Does not support bitmask, pass standalone strategy.
// Pass 0 if you don't want any faking procedures.
unsigned int strategy;
};
/**
* Generates the fake client hello message
*/