From df55d85a489fa2318b31364ba3ec0241c2fbe31c Mon Sep 17 00:00:00 2001 From: Sam Sneed <163201376+sam-sneed@users.noreply.github.com> Date: Wed, 24 Jul 2024 18:18:48 -0500 Subject: [PATCH] Add launchers/constant TLS verify --- main.py | 11 ++++++----- run-linux.sh | 2 ++ run-win.bat | 4 ++++ 3 files changed, 12 insertions(+), 5 deletions(-) create mode 100644 run-linux.sh create mode 100644 run-win.bat diff --git a/main.py b/main.py index b7526e4..2243dfc 100644 --- a/main.py +++ b/main.py @@ -237,11 +237,12 @@ def monitor_registry_changes(): # Verify TLS Certificates def verify_tls_cert(url): - try: - response = requests.get(url, verify=certifi.where()) - print(f"TLS certificate valid for {url}") - except requests.exceptions.SSLError as e: - print(f"TLS certificate error for {url}: {e}") + while True: + try: + response = requests.get(url, verify=certifi.where()) + print(f"TLS certificate valid for {url}") + except requests.exceptions.SSLError as e: + print(f"TLS certificate error for {url}: {e}") def monitor_tls_certificates(): urls = monitored_urls diff --git a/run-linux.sh b/run-linux.sh new file mode 100644 index 0000000..39a20db --- /dev/null +++ b/run-linux.sh @@ -0,0 +1,2 @@ +sudo python3 -m pip install -r requirements.txt +sudo python3 main.py \ No newline at end of file diff --git a/run-win.bat b/run-win.bat new file mode 100644 index 0000000..d640237 --- /dev/null +++ b/run-win.bat @@ -0,0 +1,4 @@ +@echo off +cd /d %~dp0 +pip install -r requirements.txt +python main.py \ No newline at end of file