Skip to content

Commit

Permalink
Fix typos and other edge cases
Browse files Browse the repository at this point in the history
  • Loading branch information
perklet committed Apr 17, 2024
1 parent 36c6ca1 commit 7136ead
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion chrome/curl_chrome124
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ dir=${0%/*}
"$dir/curl-impersonate-chrome" \
--ciphers TLS_AES_128_GCM_SHA256,TLS_AES_256_GCM_SHA384,TLS_CHACHA20_POLY1305_SHA256,ECDHE-ECDSA-AES128-GCM-SHA256,ECDHE-RSA-AES128-GCM-SHA256,ECDHE-ECDSA-AES256-GCM-SHA384,ECDHE-RSA-AES256-GCM-SHA384,ECDHE-ECDSA-CHACHA20-POLY1305,ECDHE-RSA-CHACHA20-POLY1305,ECDHE-RSA-AES128-SHA,ECDHE-RSA-AES256-SHA,AES128-GCM-SHA256,AES256-GCM-SHA384,AES128-SHA,AES256-SHA \
--curves X25519Kyber768Draft00:X25519:P-256:P-384 \
-H 'sec-ch-ua: ""Chromium";v="124", "Google Chrome";v="124", Not-A.Brand";v="99"' \
-H 'sec-ch-ua: "Chromium";v="124", "Google Chrome";v="124", Not-A.Brand";v="99"' \
-H 'sec-ch-ua-mobile: ?0' \
-H 'sec-ch-ua-platform: "macOS"' \
-H 'Upgrade-Insecure-Requests: 1' \
Expand Down
1 change: 1 addition & 0 deletions tests/signatures/chrome_123.0.6312.124.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ signature:
- 2054
- 1537
type: signature_algorithms
- type: server_name
- data: !!binary |
AA==
length: 1
Expand Down
1 change: 1 addition & 0 deletions tests/signatures/chrome_124.0.6367.60.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ signature:
- 2054
- 1537
type: signature_algorithms
- type: server_name
- data: !!binary |
AA==
length: 1
Expand Down
8 changes: 7 additions & 1 deletion tests/test_impersonate.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from th1.tls.signature import TLSClientHelloSignature
from th1.http2.parser import parse_nghttpd_log
from th1.http2.signature import HTTP2Signature
import dpkt


@pytest.fixture
Expand Down Expand Up @@ -264,7 +265,12 @@ def test_tls_client_hello(
assert len(pcap) > 0
logging.debug(f"Captured pcap of length {len(pcap)} bytes")

client_hellos = parse_pcap(pcap)
try:
client_hellos = parse_pcap(pcap)
except dpkt.NeedData:
logging.error("DPKT does not support Chrome 124 yet.")
return

# A client hello message for each URL
assert len(client_hellos) == len(test_urls)

Expand Down

0 comments on commit 7136ead

Please sign in to comment.