Skip to content

Commit

Permalink
Add tests for Safari 18.0
Browse files Browse the repository at this point in the history
  • Loading branch information
perklet committed Sep 25, 2024
1 parent eef0ab7 commit 3633069
Show file tree
Hide file tree
Showing 4 changed files with 307 additions and 8 deletions.
6 changes: 2 additions & 4 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..36d6df836
index 000000000..3054870de
--- /dev/null
+++ b/lib/impersonate.c
@@ -0,0 +1,1129 @@
@@ -0,0 +1,1127 @@
+#include "curl_setup.h"
+
+#include <curl/curl.h>
Expand Down Expand Up @@ -2399,7 +2399,6 @@ index 000000000..36d6df836
+ "rsa_pss_rsae_sha256,"
+ "rsa_pkcs1_sha256,"
+ "ecdsa_secp384r1_sha384,"
+ "ecdsa_sha1,"
+ "rsa_pss_rsae_sha384,"
+ "rsa_pss_rsae_sha384,"
+ "rsa_pkcs1_sha384,"
Expand Down Expand Up @@ -2520,7 +2519,6 @@ index 000000000..36d6df836
+ "rsa_pss_rsae_sha256,"
+ "rsa_pkcs1_sha256,"
+ "ecdsa_secp384r1_sha384,"
+ "ecdsa_sha1,"
+ "rsa_pss_rsae_sha384,"
+ "rsa_pss_rsae_sha384,"
+ "rsa_pkcs1_sha384,"
Expand Down
145 changes: 145 additions & 0 deletions tests/signatures/safari_18.0_iOS.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
browser:
name: safari
os: iOS
version: 17.2
signature:
http2:
frames:
- frame_type: SETTINGS
settings:
- key: 2
value: 0
- key: 3
value: 100
- key: 4
value: 2097152
- key: 8
value: 1
- key: 9
value: 1
stream_id: 0
- frame_type: WINDOW_UPDATE
stream_id: 0
window_size_increment: 10420225
- frame_type: HEADERS
headers:
- "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"
pseudo_headers:
- :method
- :scheme
- :authority
- :path
stream_id: 1
tls_client_hello:
ciphersuites:
- GREASE
- 4865
- 4866
- 4867
- 49196
- 49195
- 52393
- 49200
- 49199
- 52392
- 49162
- 49161
- 49172
- 49171
- 157
- 156
- 53
- 47
- 49160
- 49170
- 10
comp_methods:
- 0
extensions:
- length: 0
type: GREASE
- type: server_name
- length: 0
type: extended_master_secret
- length: 1
type: renegotiation_info
- length: 12
supported_groups:
- GREASE
- 29
- 23
- 24
- 25
type: supported_groups
- ec_point_formats:
- 0
length: 2
type: ec_point_formats
- alpn_list:
- h2
- http/1.1
length: 14
type: application_layer_protocol_negotiation
- length: 5
status_request_type: 1
type: status_request
- length: 24
sig_hash_algs:
- 1027
- 2052
- 1025
- 1283
- 2053
- 2053
- 1281
- 2054
- 1537
- 513
type: signature_algorithms
- length: 0
type: signed_certificate_timestamp
- key_shares:
- group: GREASE
length: 1
- group: 29
length: 32
length: 43
type: keyshare
- length: 2
psk_ke_mode: 1
type: psk_key_exchange_modes
- length: 11
supported_versions:
- GREASE
- TLS_VERSION_1_3
- TLS_VERSION_1_2
- TLS_VERSION_1_1
- TLS_VERSION_1_0
type: supported_versions
- algorithms:
- 1
length: 3
type: compress_certificate
- data: !!binary |
AA==
length: 1
type: GREASE
- type: padding
handshake_version: TLS_VERSION_1_2
record_version: TLS_VERSION_1_0
session_id_length: 32
third_party:
akamai_hash: d4a2dcbfde511b5040ed5a5190a8d78b
akamai_text: 2:0;3:100;4:2097152;8:1;9:1|10420225|0|m,s,a,p
ja3_hash: 773906b0efdefa24a7f2b8eb6985bf37
ja3_text: 771,4865-4866-4867-49196-49195-52393-49200-49199-52392-49162-49161-49172-49171-157-156-53-47-49160-49170-10,0-23-65281-10-11-16-5-13-18-51-45-43-27-21,29-23-24-25,0
ja3n_hash: 44f7ed5185d22c92b96da72dbe68d307
ja3n_text: 771,4865-4866-4867-49196-49195-52393-49200-49199-52392-49162-49161-49172-49171-157-156-53-47-49160-49170-10,0-5-10-11-13-16-18-21-23-27-43-45-51-65281,29-23-24-25,0
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
148 changes: 148 additions & 0 deletions tests/signatures/safari_18.0_macOS.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
browser:
name: safari
os: macOS
version: 17.0
signature:
http2:
frames:
- frame_type: SETTINGS
settings:
- key: 2
value: 0
- key: 3
value: 100
- key: 4
value: 2097152
- key: 8
value: 1
- key: 9
value: 1
stream_id: 0
- frame_type: WINDOW_UPDATE
stream_id: 0
window_size_increment: 10420225
- frame_type: SETTINGS
settings: []
stream_id: 0
- frame_type: HEADERS
headers:
- "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"
pseudo_headers:
- :method
- :scheme
- :authority
- :path
stream_id: 1
tls_client_hello:
ciphersuites:
- GREASE
- 4865
- 4866
- 4867
- 49196
- 49195
- 52393
- 49200
- 49199
- 52392
- 49162
- 49161
- 49172
- 49171
- 157
- 156
- 53
- 47
- 49160
- 49170
- 10
comp_methods:
- 0
extensions:
- length: 0
type: GREASE
- type: server_name
- length: 0
type: extended_master_secret
- length: 1
type: renegotiation_info
- length: 12
supported_groups:
- GREASE
- 29
- 23
- 24
- 25
type: supported_groups
- ec_point_formats:
- 0
length: 2
type: ec_point_formats
- alpn_list:
- h2
- http/1.1
length: 14
type: application_layer_protocol_negotiation
- length: 5
status_request_type: 1
type: status_request
- length: 24
sig_hash_algs:
- 1027
- 2052
- 1025
- 1283
- 2053
- 2053
- 1281
- 2054
- 1537
- 513
type: signature_algorithms
- length: 0
type: signed_certificate_timestamp
- key_shares:
- group: GREASE
length: 1
- group: 29
length: 32
length: 43
type: keyshare
- length: 2
psk_ke_mode: 1
type: psk_key_exchange_modes
- length: 11
supported_versions:
- GREASE
- TLS_VERSION_1_3
- TLS_VERSION_1_2
- TLS_VERSION_1_1
- TLS_VERSION_1_0
type: supported_versions
- algorithms:
- 1
length: 3
type: compress_certificate
- data: !!binary |
AA==
length: 1
type: GREASE
- type: padding
handshake_version: TLS_VERSION_1_2
record_version: TLS_VERSION_1_0
session_id_length: 32
third_party:
akamai_hash: d4a2dcbfde511b5040ed5a5190a8d78b
akamai_text: 2:0;3:100;4:2097152;8:1;9:1|10420225|0|m,s,a,p
ja3_hash: 773906b0efdefa24a7f2b8eb6985bf37
ja3_text: 771,4865-4866-4867-49196-49195-52393-49200-49199-52392-49162-49161-49172-49171-157-156-53-47-49160-49170-10,0-23-65281-10-11-16-5-13-18-51-45-43-27-21,29-23-24-25,0
ja3n_hash: 44f7ed5185d22c92b96da72dbe68d307
ja3n_text: 771,4865-4866-4867-49196-49195-52393-49200-49199-52392-49162-49161-49172-49171-157-156-53-47-49160-49170-10,0-5-10-11-13-16-18-21-23-27-43-45-51-65281,29-23-24-25,0
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
16 changes: 12 additions & 4 deletions tests/targets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,14 @@
- null
- null
- safari_15.5_macos12.4
- - curl_safari17_0
- - curl_safari18_0
- null
- null
- safari_17.0_macOS
- - curl_safari17_2_ios
- safari_18.0_macOS
- - curl_safari18_0_ios
- null
- null
- safari_17.2_iOS
- safari_18.0_iOS
# - - curl_firefox120
# - null
# - null
Expand Down Expand Up @@ -151,6 +151,14 @@
- CURL_IMPERSONATE: safari17_2_ios
- libcurl-impersonate-chrome
- safari_17.2_iOS
- - minicurl
- CURL_IMPERSONATE: safari18_0
- libcurl-impersonate-chrome
- safari_18.0_macOS
- - minicurl
- CURL_IMPERSONATE: safari18_0_ios
- libcurl-impersonate-chrome
- safari_18.0_iOS
# - - minicurl
# - CURL_IMPERSONATE: firefox120
# - libcurl-impersonate-chrome
Expand Down

0 comments on commit 3633069

Please sign in to comment.