This commit is contained in:
mofixx
2025-08-08 10:41:30 +02:00
parent 4444be3799
commit a5df3861fd
1674 changed files with 234266 additions and 0 deletions

35
Code/venv/cipher_new.py Normal file
View File

@ -0,0 +1,35 @@
import subprocess
import json
def analyze_with_external_tools(host, port, skip_cert_verification=False):
# Basis curl-Kommando
terminal = ['curl', '--http3-only', '-v', f'https://{host}:{port}']
# Zertifikatsüberprüfung skippen falls gewünscht
if skip_cert_verification:
terminal.append('-k') # oder '--insecure'
try:
result = subprocess.run(terminal, capture_output=True, text=True)
# Analyse der Ausgabe für TLS-Informationen
return result.stderr
except Exception as e:
print(f"Externe Tool-Analyse fehlgeschlagen: {e}")
return None
# Verwendung mit Zertifikatsüberprüfung (Standard)
result = analyze_with_external_tools("cloudflare.com", 443)
print(60*"=" + "cloudflare.com" + 60*"=")
print(result)
print(200*"=")
print()
print()
result = analyze_with_external_tools("nextcloud.mofixx.net", 443)
print(60*"=" + "nextcloud.mofixx.net" + 60*"=")
print(result)
print(200*"=")
# Verwendung ohne Zertifikatsüberprüfung
#result_insecure = analyze_with_external_tools("localhost", 4433, skip_cert_verification=True)
#print(result_insecure)