mirror of
https://github.com/lwthiker/curl-impersonate.git
synced 2026-09-10 10:45:55 +00:00
Merge pull request #184 from lwthiker/chrome116_and_ff_117
Add new Chrome (116) and Firefox (117) versions
This commit is contained in:
Executable
+22
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Find the directory of this script
|
||||
dir=${0%/*}
|
||||
|
||||
# The list of ciphers can be obtained by looking at the Client Hello message in
|
||||
# Wireshark, then converting it using the cipherlist array at
|
||||
# https://github.com/curl/curl/blob/master/lib/vtls/nss.c
|
||||
"$dir/curl-impersonate-ff" \
|
||||
--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 \
|
||||
-H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/117.0' \
|
||||
-H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8' \
|
||||
-H 'Accept-Language: en-US,en;q=0.5' \
|
||||
-H 'Accept-Encoding: gzip, deflate, br' \
|
||||
-H 'Upgrade-Insecure-Requests: 1' \
|
||||
-H 'Sec-Fetch-Dest: document' \
|
||||
-H 'Sec-Fetch-Mode: navigate' \
|
||||
-H 'Sec-Fetch-Site: none' \
|
||||
-H 'Sec-Fetch-User: ?1' \
|
||||
-H 'TE: Trailers' \
|
||||
--http2 --false-start --compressed \
|
||||
"$@"
|
||||
@@ -856,10 +856,10 @@ index c666192fc..e926eb3f5 100644
|
||||
data->set.priority.exclusive);
|
||||
diff --git a/lib/impersonate.c b/lib/impersonate.c
|
||||
new file mode 100644
|
||||
index 000000000..de3d5a258
|
||||
index 000000000..e8ae6a722
|
||||
--- /dev/null
|
||||
+++ b/lib/impersonate.c
|
||||
@@ -0,0 +1,222 @@
|
||||
@@ -0,0 +1,257 @@
|
||||
+#include "curl_setup.h"
|
||||
+
|
||||
+#include <curl/curl.h>
|
||||
@@ -1078,6 +1078,41 @@ index 000000000..de3d5a258
|
||||
+ }
|
||||
+ },
|
||||
+ {
|
||||
+ .target = "ff117",
|
||||
+ .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:109.0) Gecko/20100101 Firefox/117.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"
|
||||
+ }
|
||||
+ },
|
||||
+ {
|
||||
+ /* Last one must be NULL. */
|
||||
+ .target = NULL
|
||||
+ }
|
||||
|
||||
Reference in New Issue
Block a user