Skip to content

Commit 897443f

Browse files
authored
Merge pull request #2185 from drwetter/censys_fix_2127.3.0
Fix censys link (3.0)
2 parents 41deaf9 + 78e67d8 commit 897443f

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

t/08_isHTML_valid.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ unlink 'tmp.html';
3636
# Remove the HTML footer
3737
$edited_html =~ s/\n\<\/pre\>\n\<\/body\>\n\<\/html\>//;
3838
# Remove any hypertext links for URLs
39-
$edited_html =~ s/<a href=[0-9A-Za-z ";:=\/\.\?\-]*>//g;
39+
$edited_html =~ s/<a href=[0-9A-Za-z ";:_&=\/\.\?\-]*>//g;
4040
$edited_html =~ s/<\/a>//g;
4141

4242
# Replace escaped characters with their original text

testssl.sh

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15617,13 +15617,14 @@ run_drown() {
1561715617
local cwe="CWE-310"
1561815618
local hint=""
1561915619
local jsonID="DROWN"
15620+
local censys_host_url="https://search.censys.io/search?resource=hosts&virtual_hosts=INCLUDE"
1562015621

1562115622
if [[ $VULN_COUNT -le $VULN_THRESHLD ]]; then
1562215623
outln
1562315624
pr_headlineln " Testing for DROWN vulnerability "
1562415625
outln
1562515626
fi
15626-
# if we want to use OPENSSL: check for < openssl 1.0.2g, openssl 1.0.1s if native openssl
15627+
# if we want to use OPENSSL: check for < openssl 1.0.2g, openssl 1.0.1s if native openssl
1562715628
pr_bold " DROWN"; out " (${cve// /, }) "
1562815629

1562915630
# Any fingerprint that is placed in $RSA_CERT_FINGERPRINT_SHA2 is also added to
@@ -15642,10 +15643,11 @@ run_drown() {
1564215643
return 1
1564315644
fi
1564415645

15646+
censys_host_url="$censys_host_url&q=$cert_fingerprint_sha2"
1564515647
if [[ $(has_server_protocol ssl2) -ne 1 ]]; then
1564615648
sslv2_sockets
1564715649
else
15648-
[[ aaa == bbb ]] # provoke retrurn code=1
15650+
[[ aaa == bbb ]] # provoke return code=1
1564915651
fi
1565015652

1565115653
case $? in
@@ -15664,14 +15666,14 @@ run_drown() {
1566415666
nr_ciphers_detected=$((V2_HELLO_CIPHERSPEC_LENGTH / 3))
1566515667
if [[ 0 -eq "$nr_ciphers_detected" ]]; then
1566615668
prln_svrty_high "CVE-2015-3197: SSLv2 supported but couldn't detect a cipher (NOT ok)";
15667-
fileout "$jsonID" "HIGH" "SSLv2 offered, but could not detect a cipher. Make sure you don't use this certificate elsewhere, see https://censys.io/ipv4?q=$cert_fingerprint_sha2" "$cve CVE-2015-3197" "$cwe" "$hint"
15669+
fileout "$jsonID" "HIGH" "SSLv2 offered, but could not detect a cipher. Make sure you don't use this certificate elsewhere, see $censys_host_url" "$cve CVE-2015-3197" "$cwe" "$hint"
1566815670
else
1566915671
prln_svrty_critical "VULNERABLE (NOT ok), SSLv2 offered with $nr_ciphers_detected ciphers";
15670-
fileout "$jsonID" "CRITICAL" "VULNERABLE, SSLv2 offered with $nr_ciphers_detected ciphers. Make sure you don't use this certificate elsewhere, see https://censys.io/ipv4?q=$cert_fingerprint_sha2" "$cve" "$cwe" "$hint"
15672+
fileout "$jsonID" "CRITICAL" "VULNERABLE, SSLv2 offered with $nr_ciphers_detected ciphers. Make sure you don't use this certificate elsewhere, see $censys_host_url" "$cve" "$cwe" "$hint"
1567115673
fi
1567215674
outln "$spaces Make sure you don't use this certificate elsewhere, see:"
1567315675
out "$spaces "
15674-
pr_url "https://censys.io/ipv4?q=$cert_fingerprint_sha2"
15676+
pr_url "$censys_host_url"
1567515677
outln
1567615678
fi
1567715679
;;
@@ -15680,9 +15682,9 @@ run_drown() {
1568015682
if [[ -n "$cert_fingerprint_sha2" ]]; then
1568115683
outln "$spaces make sure you don't use this certificate elsewhere with SSLv2 enabled services"
1568215684
out "$spaces "
15683-
pr_url "https://censys.io/ipv4?q=$cert_fingerprint_sha2"
15684-
outln " could help you to find out"
15685-
fileout "${jsonID}_hint" "INFO" "Make sure you don't use this certificate elsewhere with SSLv2 enabled services, see https://censys.io/ipv4?q=$cert_fingerprint_sha2" "$cve" "$cwe"
15685+
pr_url "$censys_host_url"
15686+
outln
15687+
fileout "${jsonID}_hint" "INFO" "Make sure you don't use this certificate elsewhere with SSLv2 enabled services, see $censys_host_url" "$cve" "$cwe"
1568615688
else
1568715689
outln "$spaces no RSA certificate, thus certificate can't be used with SSLv2 elsewhere"
1568815690
fileout "${jsonID}_hint" "INFO" "no RSA certificate, can't be used with SSLv2 elsewhere" "$cve" "$cwe"

0 commit comments

Comments
 (0)