mirror of
https://github.com/lwthiker/curl-impersonate.git
synced 2026-09-08 09:51:52 +00:00
Impersonate Firefox 98
Add support for impersonating Firefox 98 released a few days ago. It has the same TLS signature as Firefox 95 so the adaptation includes changing the user-agent only. Upgrade the NSS version used to 3.75, even though it's not strictly necessary.
This commit is contained in:
@@ -80,7 +80,7 @@ index 2dbfb26b5..e0bf86169 100644
|
||||
* NAME curl_easy_getinfo()
|
||||
*
|
||||
diff --git a/lib/easy.c b/lib/easy.c
|
||||
index 20293a710..1a4d52d2f 100644
|
||||
index 20293a710..b97ac204e 100644
|
||||
--- a/lib/easy.c
|
||||
+++ b/lib/easy.c
|
||||
@@ -80,6 +80,7 @@
|
||||
@@ -91,7 +91,7 @@ index 20293a710..1a4d52d2f 100644
|
||||
|
||||
/* The last 3 #include files should be in this order */
|
||||
#include "curl_printf.h"
|
||||
@@ -282,6 +283,162 @@ void curl_global_cleanup(void)
|
||||
@@ -282,6 +283,197 @@ void curl_global_cleanup(void)
|
||||
init_flags = 0;
|
||||
}
|
||||
|
||||
@@ -180,6 +180,41 @@ index 20293a710..1a4d52d2f 100644
|
||||
+ "Sec-Fetch-User: ?1",
|
||||
+ "TE: Trailers"
|
||||
+ }
|
||||
+ },
|
||||
+ {
|
||||
+ .target = "ff98",
|
||||
+ .httpversion = CURL_HTTP_VERSION_2_0,
|
||||
+ .ssl_version = CURL_SSLVERSION_TLSv1_2 | CURL_SSLVERSION_MAX_DEFAULT,
|
||||
+ .ciphers =
|
||||
+ "aes_128_gcm_sha_256,"
|
||||
+ "chacha20_poly1305_sha_256,"
|
||||
+ "aes_256_gcm_sha_384,"
|
||||
+ "ecdhe_ecdsa_aes_128_gcm_sha_256,"
|
||||
+ "ecdhe_rsa_aes_128_gcm_sha_256,"
|
||||
+ "ecdhe_ecdsa_chacha20_poly1305_sha_256,"
|
||||
+ "ecdhe_rsa_chacha20_poly1305_sha_256,"
|
||||
+ "ecdhe_ecdsa_aes_256_gcm_sha_384,"
|
||||
+ "ecdhe_rsa_aes_256_gcm_sha_384,"
|
||||
+ "ecdhe_ecdsa_aes_256_sha,"
|
||||
+ "ecdhe_ecdsa_aes_128_sha,"
|
||||
+ "ecdhe_rsa_aes_128_sha,"
|
||||
+ "ecdhe_rsa_aes_256_sha,"
|
||||
+ "rsa_aes_128_gcm_sha_256,"
|
||||
+ "rsa_aes_256_gcm_sha_384,"
|
||||
+ "rsa_aes_128_sha,"
|
||||
+ "rsa_aes_256_sha",
|
||||
+ .http_headers = {
|
||||
+ "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:98.0) Gecko/20100101 Firefox/98.0",
|
||||
+ "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8",
|
||||
+ "Accept-Language: en-US,en;q=0.5",
|
||||
+ "Accept-Encoding: gzip, deflate, br",
|
||||
+ "Upgrade-Insecure-Requests: 1",
|
||||
+ "Sec-Fetch-Dest: document",
|
||||
+ "Sec-Fetch-Mode: navigate",
|
||||
+ "Sec-Fetch-Site: none",
|
||||
+ "Sec-Fetch-User: ?1",
|
||||
+ "TE: Trailers"
|
||||
+ }
|
||||
+ }
|
||||
+};
|
||||
+
|
||||
@@ -254,7 +289,7 @@ index 20293a710..1a4d52d2f 100644
|
||||
/*
|
||||
* curl_easy_init() is the external interface to alloc, setup and init an
|
||||
* easy handle that is returned. If anything goes wrong, NULL is returned.
|
||||
@@ -290,6 +447,7 @@ struct Curl_easy *curl_easy_init(void)
|
||||
@@ -290,6 +482,7 @@ struct Curl_easy *curl_easy_init(void)
|
||||
{
|
||||
CURLcode result;
|
||||
struct Curl_easy *data;
|
||||
@@ -262,7 +297,7 @@ index 20293a710..1a4d52d2f 100644
|
||||
|
||||
/* Make sure we inited the global SSL stuff */
|
||||
if(!initialized) {
|
||||
@@ -308,6 +466,22 @@ struct Curl_easy *curl_easy_init(void)
|
||||
@@ -308,6 +501,22 @@ struct Curl_easy *curl_easy_init(void)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -285,7 +320,7 @@ index 20293a710..1a4d52d2f 100644
|
||||
return data;
|
||||
}
|
||||
|
||||
@@ -878,6 +1052,13 @@ struct Curl_easy *curl_easy_duphandle(struct Curl_easy *data)
|
||||
@@ -878,6 +1087,13 @@ struct Curl_easy *curl_easy_duphandle(struct Curl_easy *data)
|
||||
outcurl->state.referer_alloc = TRUE;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user