diff --git a/README.md b/README.md index c001c90..f863ff4 100644 --- a/README.md +++ b/README.md @@ -82,7 +82,10 @@ HTTP Headers Analyzer
Full analysis


-.: (Linux) - TLS/SSL checks (requires https://testssl.sh/ and Unix machine (for now!).
+.: (Linux) - TLS/SSL checks (requires https://testssl.sh/ and Unix machine, for now!).
+``` +$ Options used: -f -g -p -U -s --hints +```

TLS/SSL analysis diff --git a/humble.py b/humble.py index afd4a9e..0741b7a 100644 --- a/humble.py +++ b/humble.py @@ -293,41 +293,33 @@ def testssl_params(directory, uri): if not path.isfile(testssl_file): sys.exit(f"\n{get_detail('[notestssl_path]')}") else: - testssl_analysis(testssl_file, uri) + # Check './testssl.sh --help' to choose your preferred options + command = f'{testssl_file} -f -g -p -U -s --hints "{uri}"' + testssl_analysis(command) -def testssl_analysis(testssl_file, uri): - # Check './testssl.sh --help' to choose your preferred options: - # -p: checks TLS/SSL protocols (including SPDY/HTTP2) - # -U: tests all vulnerabilities (if applicable) - # -s: tests standard cipher categories by strength - # --hints: additional hints to findings - command = f'{testssl_file} -p -U -s --hints "{uri}"' +def testssl_analysis(command): try: process = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True) while True: - line = process.stdout.readline() - if not line: + ln = process.stdout.readline() + if not ln: break - print(line, end='') - - if 'Done' in line: + print(ln, end='') + if 'Done' in ln: process.terminate() process.wait() sys.exit() stdout, stderr = process.communicate() - - if stdout: - print(stdout) - if stderr: - print(stderr) + print(stdout or '') + print(stderr or '') except subprocess.CalledProcessError as e: print(e.stderr) except Exception as e: - print(f"Error running testssl analysis!: {e}") + print(f"Error running testssl.sh analysis!: {e}") def get_details_lines(): diff --git a/screenshots/humble_encryption_s.PNG b/screenshots/humble_encryption_s.PNG index a799841..83afa73 100644 Binary files a/screenshots/humble_encryption_s.PNG and b/screenshots/humble_encryption_s.PNG differ