Skip to content

Commit

Permalink
upgrade sslyze version
Browse files Browse the repository at this point in the history
  • Loading branch information
devl00p committed Mar 5, 2023
1 parent 3615593 commit 9fa59f1
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 34 deletions.
2 changes: 1 addition & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ aiosqlite = "==0.17.0"
loguru = ">=0.5.3"
dnspython = "==2.1.0"
httpcore = "==0.16.3"
sslyze = "==5.0.6"
sslyze = "==5.1.1"
humanize = "==4.4.0"
mitmproxy = "==9.0.0"
typing-extensions = "==4.4.0"
Expand Down
67 changes: 37 additions & 30 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def run_tests(self):
extras_require={
"NTLM": ["httpx-ntlm"],
"sslyze": [
"sslyze==5.0.6",
"sslyze==5.1.1",
"humanize==4.4.0",
"pydantic==1.10.2", # This is to avoid a conflict with sslyze
]
Expand Down
8 changes: 6 additions & 2 deletions wapitiCore/attack/mod_ssl.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@
from os.path import join as path_join
from typing import List, Tuple, Optional
from collections import defaultdict
from itertools import chain

import humanize
from cryptography.hazmat.primitives.asymmetric.ec import EllipticCurvePublicKey
from cryptography import x509
from sslyze.plugins.certificate_info._certificate_utils import get_common_names, extract_dns_subject_alternative_names
from sslyze.plugins.certificate_info._certificate_utils import get_common_names, \
parse_subject_alternative_name_extension
from sslyze.plugins.robot.implementation import RobotScanResultEnum
from sslyze import ServerNetworkLocation, ServerNetworkConfiguration, ScanCommand, Scanner, ServerScanRequest, \
ScanCommandAttemptStatusEnum
Expand Down Expand Up @@ -70,7 +72,9 @@ def process_certificate_info(certinfo_result):
log_blue(message)
yield INFO_LEVEL, message

message = f"Alt. names: {extract_dns_subject_alternative_names(leaf_certificate)}"
alt_names = parse_subject_alternative_name_extension(leaf_certificate)
alt_names = ", ".join(chain(alt_names.dns_names, alt_names.ip_addresses))
message = f"Alt. names: {alt_names}"
log_blue(message)
yield INFO_LEVEL, message

Expand Down

0 comments on commit 9fa59f1

Please sign in to comment.