mirror of
https://github.com/Waujito/youtubeUnblock.git
synced 2025-01-15 11:05:18 +00:00
Implement sni-detection brute for QUIC
This commit is contained in:
parent
60e33318cb
commit
e98bb5ecad
10
src/quic.c
10
src/quic.c
@ -391,9 +391,13 @@ pl_incr:
|
||||
}
|
||||
|
||||
out:
|
||||
ret = analyze_tls_message(
|
||||
section, crypto_message, crypto_message_len, &tlsv
|
||||
);
|
||||
if (section->sni_detection == SNI_DETECTION_BRUTE) {
|
||||
ret = bruteforce_analyze_sni_str(section, crypto_message, crypto_message_len, &tlsv);
|
||||
} else {
|
||||
ret = analyze_tls_message(
|
||||
section, crypto_message, crypto_message_len, &tlsv
|
||||
);
|
||||
}
|
||||
|
||||
free(crypto_message);
|
||||
return tlsv;
|
||||
|
@ -28,11 +28,13 @@
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
static int bruteforce_analyze_sni_str(
|
||||
int bruteforce_analyze_sni_str(
|
||||
const struct section_config_t *section,
|
||||
const uint8_t *data, size_t dlen,
|
||||
struct tls_verdict *vrd
|
||||
) {
|
||||
*vrd = (struct tls_verdict){0};
|
||||
|
||||
if (section->all_domains) {
|
||||
vrd->target_sni = 1;
|
||||
vrd->sni_len = 0;
|
||||
|
@ -55,6 +55,15 @@ int analyze_tls_message(
|
||||
struct tls_verdict *tlsv
|
||||
);
|
||||
|
||||
/**
|
||||
* Tries to bruteforce over the packet and match domains as plain text
|
||||
*/
|
||||
int bruteforce_analyze_sni_str(
|
||||
const struct section_config_t *section,
|
||||
const uint8_t *data, size_t dlen,
|
||||
struct tls_verdict *vrd
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
* Processes the packet and finds TLS Client Hello information inside it.
|
||||
|
Loading…
Reference in New Issue
Block a user