diff --git a/cfcrawler/cipher.py b/cfcrawler/cipher.py deleted file mode 100644 index c09256a..0000000 --- a/cfcrawler/cipher.py +++ /dev/null @@ -1,42 +0,0 @@ -from cfcrawler.types import Browser - -MAP_BROWSER_TO_CIPHER: dict[Browser, list[str]] = { - Browser.CHROME: [ - "TLS_AES_128_GCM_SHA256", - "TLS_CHACHA20_POLY1305_SHA256", - "TLS_AES_256_GCM_SHA384", - "ECDHE-ECDSA-AES128-GCM-SHA256", - "ECDHE-RSA-AES128-GCM-SHA256", - "ECDHE-ECDSA-CHACHA20-POLY1305", - "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256", - "ECDHE-RSA-CHACHA20-POLY1305", - "ECDHE-RSA-AES256-GCM-SHA384", - "ECDHE-ECDSA-AES256-SHA", - "ECDHE-ECDSA-AES128-SHA", - "ECDHE-RSA-AES128-SHA", - "ECDHE-RSA-AES256-SHA", - "AES128-GCM-SHA256", - "AES256-GCM-SHA384", - "AES128-SHA", - "AES256-SHA", - ], - Browser.FIREFOX: [ - "TLS_AES_128_GCM_SHA256", - "TLS_CHACHA20_POLY1305_SHA256", - "TLS_AES_256_GCM_SHA384", - "ECDHE-ECDSA-AES128-GCM-SHA256", - "ECDHE-RSA-AES128-GCM-SHA256", - "ECDHE-ECDSA-CHACHA20-POLY1305", - "ECDHE-RSA-CHACHA20-POLY1305", - "ECDHE-ECDSA-AES256-GCM-SHA384", - "ECDHE-RSA-AES256-GCM-SHA384", - "ECDHE-ECDSA-AES256-SHA", - "ECDHE-ECDSA-AES128-SHA", - "ECDHE-RSA-AES128-SHA", - "ECDHE-RSA-AES256-SHA", - "AES128-GCM-SHA256", - "AES256-GCM-SHA384", - "AES128-SHA", - "AES256-SHA", - ], -} diff --git a/tests/test_ciphers.py b/tests/test_ciphers.py index 9541624..a65a563 100644 --- a/tests/test_ciphers.py +++ b/tests/test_ciphers.py @@ -2,12 +2,13 @@ import pytest -from cfcrawler.cipher import MAP_BROWSER_TO_CIPHER +from cfcrawler.tls import get_cipher_suite +from cfcrawler.types import Browser def test_valid_ciphers(): - for browser, ciphers in MAP_BROWSER_TO_CIPHER.items(): - cipher_suite = ":".join(ciphers) + for browser in Browser: + cipher_suite = get_cipher_suite(browser) try: context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT) context.set_ciphers(cipher_suite)