Skip to content

Commit

Permalink
Update safari scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
perklet committed Sep 25, 2024
1 parent cc0c4a5 commit eef0ab7
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 41 deletions.
19 changes: 10 additions & 9 deletions chrome/curl_safari18_0
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,20 @@ dir=${0%/*}
"$dir/curl-impersonate-chrome" \
--ciphers TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384:TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256:TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256:TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384:TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256:TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256:TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA:TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA:TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA:TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA:TLS_RSA_WITH_AES_256_GCM_SHA384:TLS_RSA_WITH_AES_128_GCM_SHA256:TLS_RSA_WITH_AES_256_CBC_SHA:TLS_RSA_WITH_AES_128_CBC_SHA:TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA:TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA:TLS_RSA_WITH_3DES_EDE_CBC_SHA \
--curves X25519:P-256:P-384:P-521 \
--signature-hashes ecdsa_secp256r1_sha256,rsa_pss_rsae_sha256,rsa_pkcs1_sha256,ecdsa_secp384r1_sha384,ecdsa_sha1,rsa_pss_rsae_sha384,rsa_pss_rsae_sha384,rsa_pkcs1_sha384,rsa_pss_rsae_sha512,rsa_pkcs1_sha512,rsa_pkcs1_sha1 \
-H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' \
-H 'Sec-Fetch-Site: none' \
-H 'Accept-Encoding: gzip, deflate, br' \
-H 'Sec-Fetch-Mode: navigate' \
-H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.0 Safari/605.1.15' \
-H 'Accept-Language: en-US,en;q=0.9' \
-H 'Sec-Fetch-Dest: document' \
--signature-hashes ecdsa_secp256r1_sha256,rsa_pss_rsae_sha256,rsa_pkcs1_sha256,ecdsa_secp384r1_sha384,rsa_pss_rsae_sha384,rsa_pss_rsae_sha384,rsa_pkcs1_sha384,rsa_pss_rsae_sha512,rsa_pkcs1_sha512,rsa_pkcs1_sha1 \
-H "sec-fetch-dest: document" \
-H "user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.0 Safari/605.1.15" \
-H "accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" \
-H "sec-fetch-site: none" \
-H "sec-fetch-mode: navigate" \
-H "accept-language: en-US,en;q=0.9" \
-H "priority: u=0, i" \
-H "accept-encoding: gzip, deflate, br" \
--http2 \
--http2-settings '2:0;3:100;4:2097152;8:1;9:1' \
--http2-pseudo-headers-order 'msap' \
--http2-window-update 10420225 \
--http2-stream-weight 255 \
--http2-stream-weight 256 \
--http2-stream-exclusive 0 \
--compressed \
--tlsv1.0 --no-tls-session-ticket \
Expand Down
25 changes: 13 additions & 12 deletions chrome/curl_safari18_0_ios
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,20 @@ dir=${0%/*}
"$dir/curl-impersonate-chrome" \
--ciphers TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384:TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256:TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256:TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384:TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256:TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256:TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA:TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA:TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA:TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA:TLS_RSA_WITH_AES_256_GCM_SHA384:TLS_RSA_WITH_AES_128_GCM_SHA256:TLS_RSA_WITH_AES_256_CBC_SHA:TLS_RSA_WITH_AES_128_CBC_SHA:TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA:TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA:TLS_RSA_WITH_3DES_EDE_CBC_SHA \
--curves X25519:P-256:P-384:P-521 \
--signature-hashes ecdsa_secp256r1_sha256,rsa_pss_rsae_sha256,rsa_pkcs1_sha256,ecdsa_secp384r1_sha384,ecdsa_sha1,rsa_pss_rsae_sha384,rsa_pss_rsae_sha384,rsa_pkcs1_sha384,rsa_pss_rsae_sha512,rsa_pkcs1_sha512,rsa_pkcs1_sha1 \
-H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' \
-H 'Sec-Fetch-Site: none' \
-H 'Accept-Encoding: gzip, deflate, br' \
-H 'Sec-Fetch-Mode: navigate' \
-H 'User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 17_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.2 Mobile/15E148 Safari/604.1' \
-H 'Accept-Language: en-US,en;q=0.9' \
-H 'Sec-Fetch-Dest: document' \
--signature-hashes ecdsa_secp256r1_sha256,rsa_pss_rsae_sha256,rsa_pkcs1_sha256,ecdsa_secp384r1_sha384,rsa_pss_rsae_sha384,rsa_pss_rsae_sha384,rsa_pkcs1_sha384,rsa_pss_rsae_sha512,rsa_pkcs1_sha512,rsa_pkcs1_sha1 \
-H "sec-fetch-dest: document" \
-H "user-agent: Mozilla/5.0 (iPhone; CPU iPhone OS 18_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.0 Mobile/15E148 Safari/604.1" \
-H "accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" \
-H "sec-fetch-site: none" \
-H "sec-fetch-mode: navigate" \
-H "accept-language: en-US,en;q=0.9" \
-H "priority: u=0, i" \
-H "accept-encoding: gzip, deflate, br" \
--http2 \
--http2-settings '2:0;4:2097152;3:100' \
--http2-pseudo-headers-order 'mspa' \
--http2-window-update 10485760 \
--http2-stream-weight 255 \
--http2-settings '2:0;3:100;4:2097152;8:1;9:1' \
--http2-pseudo-headers-order 'msap' \
--http2-window-update 10420225 \
--http2-stream-weight 256 \
--http2-stream-exclusive 0 \
--compressed \
--tlsv1.0 --no-tls-session-ticket \
Expand Down
41 changes: 21 additions & 20 deletions chrome/patches/curl-impersonate.patch
Original file line number Diff line number Diff line change
Expand Up @@ -1522,10 +1522,10 @@ index 80e183480..8ee390b7e 100644
* Store nghttp2 version info in this buffer.
diff --git a/lib/impersonate.c b/lib/impersonate.c
new file mode 100644
index 000000000..eb4e48dc9
index 000000000..36d6df836
--- /dev/null
+++ b/lib/impersonate.c
@@ -0,0 +1,1128 @@
@@ -0,0 +1,1129 @@
+#include "curl_setup.h"
+
+#include <curl/curl.h>
Expand Down Expand Up @@ -2412,18 +2412,19 @@ index 000000000..eb4e48dc9
+ .tls_session_ticket = false,
+ .cert_compression = "zlib",
+ .http_headers = {
+ "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
+ "Sec-Fetch-Site: none",
+ "Accept-Encoding: gzip, deflate, br",
+ "Sec-Fetch-Mode: navigate",
+ "User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 17_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.2 Mobile/15E148 Safari/604.1",
+ "Accept-Language: en-US,en;q=0.9",
+ "Sec-Fetch-Dest: document"
+ "sec-fetch-dest: document",
+ "user-agent: Mozilla/5.0 (iPhone; CPU iPhone OS 18_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.0 Mobile/15E148 Safari/604.1",
+ "accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
+ "sec-fetch-site: none",
+ "sec-fetch-mode: navigate",
+ "accept-language: en-US,en;q=0.9",
+ "priority: u=0, i",
+ "accept-encoding: gzip, deflate, br"
+ },
+ .http2_settings = "2:0;4:2097152;3:100",
+ .http2_window_update = 10485760,
+ .http2_pseudo_headers_order = "mspa",
+ .http2_stream_weight = 255,
+ .http2_settings = "2:0;3:100;4:2097152;8:1;9:1",
+ .http2_window_update = 10420225,
+ .http2_pseudo_headers_order = "msap",
+ .http2_stream_weight = 256,
+ .http2_stream_exclusive = 0,
+ .tls_extension_order = NULL,
+ .tls_grease = true
Expand Down Expand Up @@ -2532,14 +2533,14 @@ index 000000000..eb4e48dc9
+ .tls_session_ticket = false,
+ .cert_compression = "zlib",
+ .http_headers = {
+ "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
+ "Sec-Fetch-Site: none",
+ "Accept-Encoding: gzip, deflate, br",
+ "Sec-Fetch-Mode: navigate",
+ "sec-fetch-dest: document",
+ "user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.0 Safari/605.1.15",
+ "Accept-Language: en-US,en;q=0.9",
+ "priority: u=0, i"
+ "Sec-Fetch-Dest: document"
+ "accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
+ "sec-fetch-site: none",
+ "sec-fetch-mode: navigate",
+ "accept-language: en-US,en;q=0.9",
+ "priority: u=0, i",
+ "accept-encoding: gzip, deflate, br"
+ },
+ .http2_settings = "2:0;3:100;4:2097152;8:1;9:1",
+ .http2_window_update = 10420225,
Expand Down

0 comments on commit eef0ab7

Please sign in to comment.