Skip to content

Commit

Permalink
Add IP address to html report (column 2) (#201)
Browse files Browse the repository at this point in the history
  • Loading branch information
kyhau authored Apr 10, 2024
1 parent 6e3dc16 commit 9e15c44
Show file tree
Hide file tree
Showing 10 changed files with 394 additions and 525 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# Change Log
All notable changes to this project will be documented in this file.

3.1.0 - 2024-04-10
==================

### Changed
- Add IP address to html report (column 2) (#200)


3.0.0 - 2024-04-02
==================

Expand Down
Binary file modified sample/SampleHtmlOutput.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
232 changes: 115 additions & 117 deletions sample/duckduckgo.com.json

Large diffs are not rendered by default.

660 changes: 259 additions & 401 deletions sample/google.com.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions sample/summary.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#Host,Grade,HasWarnings,Cert Expiry,Chain Status,Forward Secrecy,Heartbeat ext,Vuln Beast,Vuln Drown,Vuln Heartbleed,Vuln FREAK,Vuln openSsl Ccs,Vuln openSSL LuckyMinus20,Vuln POODLE,Vuln POODLE TLS,Support RC4,RC4 with modern protocols,RC4 Only,TLS 1.3,TLS 1.2,TLS 1.1,TLS 1.0,SSL 3.0 INSECURE,SSL 2.0 INSECURE
duckduckgo.com,A+,False,2024-11-05,none,Yes (with most browsers) ROBUST,False,False,None,False,False,False,False,False,False,False,False,False,Yes,Yes,No,No,No,No
google.com,B,False,2024-05-27,none,With modern browsers,False,True,None,False,False,False,False,False,False,False,False,False,Yes,Yes,Yes,Yes,No,No
google.com,B,False,2024-05-27,none,With modern browsers,False,True,None,False,False,False,False,False,False,False,False,False,Yes,Yes,Yes,Yes,No,No
#Host,IP,Grade,HasWarnings,Cert Expiry,Chain Status,Forward Secrecy,Heartbeat ext,Vuln Beast,Vuln Drown,Vuln Heartbleed,Vuln FREAK,Vuln openSsl Ccs,Vuln openSSL LuckyMinus20,Vuln POODLE,Vuln POODLE TLS,Support RC4,RC4 with modern protocols,RC4 Only,TLS 1.3,TLS 1.2,TLS 1.1,TLS 1.0,SSL 3.0 INSECURE,SSL 2.0 INSECURE
duckduckgo.com,52.250.42.157,A+,False,2024-11-05,none,Yes (with most browsers) ROBUST,False,False,None,False,False,False,False,False,False,False,False,False,Yes,Yes,No,No,No,No
google.com,142.250.72.174,B,False,2024-05-27,none,With modern browsers,False,True,None,False,False,False,False,False,False,False,False,False,Yes,Yes,Yes,Yes,No,No
google.com,2607:f8b0:4007:815:0:0:0:200e,B,False,2024-05-27,none,With modern browsers,False,True,None,False,False,False,False,False,False,False,False,False,Yes,Yes,Yes,Yes,No,No
4 changes: 4 additions & 0 deletions sample/summary.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ <h1>SSL Labs Analysis Summary Report</h1>
<table class="tftable" border="1">
<tr>
<th>#Host</th>
<th>IP</th>
<th>Grade</th>
<th>HasWarnings</th>
<th>Cert Expiry</th>
Expand All @@ -37,6 +38,7 @@ <h1>SSL Labs Analysis Summary Report</h1>
</tr>
<tr class="A">
<td>duckduckgo.com</td>
<td>52.250.42.157</td>
<td>A+</td>
<td>False</td>
<td>2024-11-05</td>
Expand All @@ -63,6 +65,7 @@ <h1>SSL Labs Analysis Summary Report</h1>
</tr>
<tr class="B">
<td>google.com</td>
<td>142.250.72.174</td>
<td>B</td>
<td>False</td>
<td>2024-05-27</td>
Expand All @@ -89,6 +92,7 @@ <h1>SSL Labs Analysis Summary Report</h1>
</tr>
<tr class="B">
<td>google.com</td>
<td>2607:f8b0:4007:815:0:0:0:200e</td>
<td>B</td>
<td>False</td>
<td>2024-05-27</td>
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from setuptools import find_packages, setup

__title__ = "ssllabsscan"
__version__ = "3.0.0"
__version__ = "3.1.0"
__author__ = "Kay Hau"
__email__ = "[email protected]"
__uri__ = "https://github.com/kyhau/ssllabs-scan"
Expand Down
2 changes: 1 addition & 1 deletion ssllabsscan/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def output_summary_html(input_csv, output_html):
if row[0].startswith("#"):
data += " <tr>\n\t<th>{}</th>\n </tr>".format('</th>\n\t<th>'.join(row))
else:
data += '\n <tr class="{}">\n\t<td>{}</td>\n </tr>'.format(row[1][:1], '</td>\n\t<td>'.join(row))
data += '\n <tr class="{}">\n\t<td>{}</td>\n </tr>'.format(row[2][:1], '</td>\n\t<td>'.join(row))

# Replace the target string
content = REPORT_HTML
Expand Down
3 changes: 2 additions & 1 deletion ssllabsscan/ssllabs_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
]

SUMMARY_COL_NAMES = [
"Host", "Grade", "HasWarnings", "Cert Expiry", "Chain Status", "Forward Secrecy", "Heartbeat ext"
"Host", "IP", "Grade", "HasWarnings", "Cert Expiry", "Chain Status", "Forward Secrecy", "Heartbeat ext"
] + VULNERABLES + RC4 + PROTOCOLS


Expand Down Expand Up @@ -140,6 +140,7 @@ def append_summary_csv(self, summary_file, host, data):
# see SUMMARY_COL_NAMES
summary = [
host,
ep.get("ipAddress"),
ep["grade"],
ep["hasWarnings"],
na,
Expand Down
1 change: 1 addition & 0 deletions ssllabsscan/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"protocol": "HTTP",
"endpoints": [
{
"ipAddress": "142.250.72.174",
"statusMessage": "Ready",
"grade": "A+",
"hasWarnings": False,
Expand Down

0 comments on commit 9e15c44

Please sign in to comment.