From 3ccce15a04df7b0a75457b6d6a1c08a2ec4646e9 Mon Sep 17 00:00:00 2001 From: devjanger <55939719+devjanger@users.noreply.github.com> Date: Tue, 7 Apr 2026 10:27:17 +0900 Subject: [PATCH] Fix TypeError: compare bytes instead of str in e.fp.read() --- cloudfrunt.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cloudfrunt.py b/cloudfrunt.py index d172b94..6e74544 100644 --- a/cloudfrunt.py +++ b/cloudfrunt.py @@ -145,11 +145,11 @@ def find_cf_issues(domains): try: response = urlopen('http://' + domain) except HTTPError as e: - if e.code == 403 and 'Bad request' in e.fp.read(): + if e.code == 403 and b'Bad request' in e.fp.read(): try: response = urlopen('https://' + domain) except URLError as e: - if 'handshake' in str(e).lower() or e.code == 403 and 'Bad request' in e.fp.read(): + if 'handshake' in str(e).lower() or e.code == 403 and b'Bad request' in e.fp.read(): error_domains.append(domain) except: pass