minor fixes

This commit is contained in:
anon 2023-01-17 22:57:13 +01:00
parent d7e30ada4d
commit 44f07e2e75
2 changed files with 14 additions and 8 deletions

16
main.py
View File

@ -89,7 +89,7 @@ if onionFlag == 1:
bitcoin = onionReport['bitcoinDetected']
print("\t Bitcoin?", bitcoin)
if bitcoin:
baseScore = baseScore * 0.81
baseScore = baseScore * 0.91
print("\t Score goes down, now:", baseScore)
bitcoinInfo = onionReport['bitcoinServices']['bitcoin']
print("\t Bitcoin user agent:", bitcoinInfo['userAgent'])
@ -109,14 +109,14 @@ if onionFlag == 1:
apacheStatus = idReport['foundApacheModStatus']
print("\t Apache status found?", apacheStatus)
if apacheStatus:
baseScore = baseScore * 0.87
baseScore = baseScore * 0.86
print("\t Score goes down, now:", baseScore)
print("")
ipAddress = idReport['ipAddresses']
print("\t IP address leakage?", ipAddress)
if ipAddress:
baseScore = baseScore * 0.55
baseScore = baseScore * 0.71
print("\t Score goes down, now:", baseScore)
print("")
@ -179,15 +179,21 @@ if httpFlag == 1:
for secureHeader in securityHeaders:
if secureHeader in httpHeaders:
if securityHeaders[secureHeader] != httpHeaders[secureHeader]:
baseScore = baseScore * 0.987
print("\t", secureHeader, "is present, but have diffrent value than expected.")
print("\t Present value:", httpHeaders[secureHeader])
print("\t Expected value:", securityHeaders[secureHeader])
if secureHeader == "Strict-Transport-Security":
baseScore = baseScore * 0.991
else:
baseScore = baseScore * 0.981
print("\t Score goes down, now:", baseScore)
else:
print("\t", secureHeader, "is present and set correctly.")
else:
baseScore = baseScore * 0.983
if secureHeader == "Cross-Origin-Embedder-Policy" or secureHeader == "Cross-Origin-Resource-Policy":
baseScore = baseScore * 0.991
else:
baseScore = baseScore * 0.985
print("\t",secureHeader, "not found.")
print("\t Score goes down, now:", baseScore)
print("")

View File

@ -35,7 +35,7 @@ else
exit 1;
fi
IS_ADDRESS_ONION=`echo $1 | grep -Ei ".onion$" | wc -c`
IS_ADDRESS_ONION=`echo $1 | grep -Ei "\.onion\/?$" | wc -c`
if [[ $IS_ADDRESS_ONION > 0 ]] ; then
echo "Checking Onion Service, address: $1"
else