id int64 0 458k | file_name stringlengths 4 119 | file_path stringlengths 14 227 | content stringlengths 24 9.96M | size int64 24 9.96M | language stringclasses 1
value | extension stringclasses 14
values | total_lines int64 1 219k | avg_line_length float64 2.52 4.63M | max_line_length int64 5 9.91M | alphanum_fraction float64 0 1 | repo_name stringlengths 7 101 | repo_stars int64 100 139k | repo_forks int64 0 26.4k | repo_open_issues int64 0 2.27k | repo_license stringclasses 12
values | repo_extraction_date stringclasses 433
values |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
41,100 | plugin_base.py | nabla-c0d3_sslyze/sslyze/plugins/plugin_base.py | """Main abstract plugin classes from which all the plugins should inherit.
"""
from abc import ABC, abstractmethod
from concurrent.futures import ThreadPoolExecutor
from dataclasses import dataclass
from typing import (
List,
Callable,
Any,
Optional,
TYPE_CHECKING,
Tuple,
ClassVar,
Di... | 5,744 | Python | .py | 130 | 37.630769 | 120 | 0.708184 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,101 | scan_commands.py | nabla-c0d3_sslyze/sslyze/plugins/scan_commands.py | from enum import Enum
from typing import Dict, Type, TYPE_CHECKING, Set
from sslyze.plugins.elliptic_curves_plugin import SupportedEllipticCurvesImplementation
from sslyze.plugins.certificate_info.implementation import CertificateInfoImplementation
from sslyze.plugins.compression_plugin import CompressionImplementat... | 3,599 | Python | .py | 67 | 49.626866 | 99 | 0.814541 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,102 | early_data_plugin.py | nabla-c0d3_sslyze/sslyze/plugins/early_data_plugin.py | from dataclasses import dataclass
from typing import List, Optional
import socket
from nassl._nassl import OpenSSLError
from nassl.ssl_client import OpenSslEarlyDataStatusEnum, SslClient
from sslyze.json.pydantic_utils import BaseModelWithOrmModeAndForbid
from sslyze.json.scan_attempt_json import ScanCommandAttemptAs... | 5,309 | Python | .py | 107 | 42.242991 | 116 | 0.723898 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,103 | session_renegotiation_plugin.py | nabla-c0d3_sslyze/sslyze/plugins/session_renegotiation_plugin.py | import socket
from dataclasses import dataclass
from enum import Enum
from typing import List, Optional, Tuple
from nassl._nassl import OpenSSLError
from nassl.legacy_ssl_client import LegacySslClient
from sslyze.json.pydantic_utils import BaseModelWithOrmModeAndForbid
from sslyze.json.scan_attempt_json import ScanCo... | 9,886 | Python | .py | 190 | 43.1 | 119 | 0.700508 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,104 | fallback_scsv_plugin.py | nabla-c0d3_sslyze/sslyze/plugins/fallback_scsv_plugin.py | from dataclasses import dataclass
from typing import List, Optional
from nassl import _nassl
from nassl.legacy_ssl_client import LegacySslClient
from sslyze.json.pydantic_utils import BaseModelWithOrmModeAndForbid
from sslyze.json.scan_attempt_json import ScanCommandAttemptAsJson
from sslyze.plugins.plugin_base impor... | 4,896 | Python | .py | 94 | 45.744681 | 118 | 0.750419 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,105 | elliptic_curves_plugin.py | nabla-c0d3_sslyze/sslyze/plugins/elliptic_curves_plugin.py | from dataclasses import dataclass, asdict
from operator import attrgetter
from typing import List, Optional, Any
from pydantic import BaseModel, ConfigDict, model_validator
from nassl._nassl import OpenSSLError
from nassl.ephemeral_key_info import OpenSslEcNidEnum, EcDhEphemeralKeyInfo, _OPENSSL_NID_TO_SECG_ANSI_X9_62... | 10,767 | Python | .py | 210 | 42.661905 | 117 | 0.703496 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,106 | compression_plugin.py | nabla-c0d3_sslyze/sslyze/plugins/compression_plugin.py | from dataclasses import dataclass
from nassl.legacy_ssl_client import LegacySslClient
from nassl.ssl_client import ClientCertificateRequested
from sslyze.json.pydantic_utils import BaseModelWithOrmModeAndForbid
from sslyze.json.scan_attempt_json import ScanCommandAttemptAsJson
from sslyze.plugins.plugin_base import (... | 4,782 | Python | .py | 89 | 47.449438 | 119 | 0.75638 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,107 | heartbleed_plugin.py | nabla-c0d3_sslyze/sslyze/plugins/heartbleed_plugin.py | import socket
import types
from dataclasses import dataclass
from typing import List, Optional
from nassl._nassl import WantReadError
from sslyze.json.pydantic_utils import BaseModelWithOrmModeAndForbid
from sslyze.json.scan_attempt_json import ScanCommandAttemptAsJson
from sslyze.plugins.plugin_base import (
Sca... | 9,039 | Python | .py | 177 | 42.864407 | 119 | 0.711759 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,108 | http_headers_plugin.py | nabla-c0d3_sslyze/sslyze/plugins/http_headers_plugin.py | import logging
from http.client import HTTPResponse
from dataclasses import dataclass, asdict
from traceback import TracebackException
from urllib.parse import urlsplit
from pydantic import BaseModel, model_validator
# TODO: Fix type annotations in nassl
from nassl._nassl import SslError # type: ignore
from sslyze... | 12,626 | Python | .py | 241 | 43.759336 | 119 | 0.700276 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,109 | openssl_ccs_injection_plugin.py | nabla-c0d3_sslyze/sslyze/plugins/openssl_ccs_injection_plugin.py | import socket
import types
from dataclasses import dataclass
from typing import List, Optional
from nassl._nassl import WantReadError
from sslyze.json.pydantic_utils import BaseModelWithOrmModeAndForbid
from sslyze.json.scan_attempt_json import ScanCommandAttemptAsJson
from sslyze.plugins.plugin_base import (
Sca... | 9,795 | Python | .py | 188 | 42.718085 | 119 | 0.694029 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,110 | cipher_suites.py | nabla-c0d3_sslyze/sslyze/plugins/openssl_cipher_suites/cipher_suites.py | from dataclasses import field
from typing import Dict, Set
from dataclasses import dataclass
from nassl.legacy_ssl_client import LegacySslClient
from nassl.ssl_client import OpenSslVersionEnum, SslClient
from sslyze.server_connectivity import TlsVersionEnum
@dataclass(frozen=True)
class CipherSuite:
name: str
... | 35,064 | Python | .py | 631 | 50.141046 | 114 | 0.676395 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,111 | _cli_connector.py | nabla-c0d3_sslyze/sslyze/plugins/openssl_cipher_suites/_cli_connector.py | from typing import List, TYPE_CHECKING, ClassVar
from nassl.ephemeral_key_info import EcDhEphemeralKeyInfo, DhEphemeralKeyInfo
from sslyze.plugins.openssl_cipher_suites._test_cipher_suite import CipherSuiteAcceptedByServer
from sslyze.plugins.plugin_base import ScanCommandCliConnector
from sslyze.server_connectivity ... | 3,791 | Python | .py | 71 | 42.028169 | 120 | 0.647408 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,112 | json_output.py | nabla-c0d3_sslyze/sslyze/plugins/openssl_cipher_suites/json_output.py | from base64 import b64encode
from typing import List, Optional, Any
from nassl.ephemeral_key_info import EphemeralKeyInfo, EcDhEphemeralKeyInfo, NistEcDhKeyExchangeInfo, DhEphemeralKeyInfo
from pydantic import model_validator
from sslyze.json.pydantic_utils import BaseModelWithOrmMode, StrFromEnumValueName
from sslyze... | 3,187 | Python | .py | 74 | 36.540541 | 120 | 0.737354 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,113 | implementation.py | nabla-c0d3_sslyze/sslyze/plugins/openssl_cipher_suites/implementation.py | from operator import attrgetter
from dataclasses import dataclass
from sslyze.connection_helpers.tls_connection import NoCiphersAvailableBugInSSlyze
from sslyze.plugins.openssl_cipher_suites._cli_connector import _CipherSuitesCliConnector
from sslyze.plugins.openssl_cipher_suites._test_cipher_suite import (
conne... | 6,860 | Python | .py | 136 | 43.455882 | 117 | 0.728062 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,114 | _test_cipher_suite.py | nabla-c0d3_sslyze/sslyze/plugins/openssl_cipher_suites/_test_cipher_suite.py | from dataclasses import dataclass
from typing import Optional, Union
from nassl.ephemeral_key_info import EphemeralKeyInfo
from nassl.legacy_ssl_client import LegacySslClient
from nassl.ssl_client import ClientCertificateRequested, SslClient, BaseSslClient
from sslyze.errors import (
ServerRejectedTlsHandshake,
... | 4,126 | Python | .py | 75 | 49.066667 | 118 | 0.765377 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,115 | _tls12_workaround.py | nabla-c0d3_sslyze/sslyze/plugins/openssl_cipher_suites/_tls12_workaround.py | from nassl.ssl_client import OpenSslVerifyEnum
from nassl.ssl_client import OpenSslVersionEnum
from nassl.legacy_ssl_client import LegacySslClient
class WorkaroundForTls12ForCipherSuites:
"""Helper to figure out which version of OpenSSL to use for a given TLS 1.2 cipher suite.
The nassl module supports using... | 1,237 | Python | .py | 18 | 62.555556 | 120 | 0.76112 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,116 | _resumption_with_id.py | nabla-c0d3_sslyze/sslyze/plugins/session_resumption/_resumption_with_id.py | from enum import Enum
from typing import Optional, Tuple
import nassl
from sslyze.errors import ServerRejectedTlsHandshake
from sslyze.server_connectivity import ServerConnectivityInfo, TlsVersionEnum
class TlsResumptionSupportEnum(str, Enum):
"""The result of attempting to resume TLS sessions with the server.
... | 4,516 | Python | .py | 91 | 43.21978 | 116 | 0.721628 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,117 | json_output.py | nabla-c0d3_sslyze/sslyze/plugins/session_resumption/json_output.py | from typing import Optional
from sslyze import SessionResumptionSupportExtraArgument, SessionResumptionSupportScanResult, TlsResumptionSupportEnum
from sslyze.json.pydantic_utils import BaseModelWithOrmModeAndForbid
from sslyze.json.scan_attempt_json import ScanCommandAttemptAsJson
class SessionResumptionSupportExtr... | 1,245 | Python | .py | 19 | 62.210526 | 118 | 0.877265 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,118 | implementation.py | nabla-c0d3_sslyze/sslyze/plugins/session_resumption/implementation.py | from dataclasses import dataclass
from typing import List, Optional, Dict, Any, Tuple, Union
from sslyze.plugins.plugin_base import (
ScanCommandResult,
ScanCommandImplementation,
ScanCommandExtraArgument,
ScanJob,
ScanCommandCliConnector,
OptParseCliOption,
ScanJobResult,
)
from sslyze.plu... | 11,155 | Python | .py | 211 | 43.57346 | 118 | 0.698863 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,119 | _resumption_with_ticket.py | nabla-c0d3_sslyze/sslyze/plugins/session_resumption/_resumption_with_ticket.py | from typing import Tuple
import nassl
from sslyze.plugins.session_resumption._resumption_with_id import retrieve_tls_session, _ScanJobResultEnum
from sslyze.server_connectivity import ServerConnectivityInfo
def resume_with_tls_ticket(
server_info: ServerConnectivityInfo,
) -> Tuple[_ScanJobResultEnum, bool]:
... | 1,776 | Python | .py | 34 | 46.617647 | 114 | 0.742643 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,120 | implementation.py | nabla-c0d3_sslyze/sslyze/plugins/robot/implementation.py | from dataclasses import dataclass
from typing import Optional, List, Dict
from sslyze.json.pydantic_utils import BaseModelWithOrmModeAndForbid
from sslyze.json.scan_attempt_json import ScanCommandAttemptAsJson
from sslyze.plugins.plugin_base import (
ScanCommandResult,
ScanCommandImplementation,
ScanComman... | 4,253 | Python | .py | 84 | 43.261905 | 120 | 0.730101 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,121 | _robot_tester.py | nabla-c0d3_sslyze/sslyze/plugins/robot/_robot_tester.py | import socket
import types
from enum import Enum
from typing import Optional, List, Dict
import binascii
import math
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives.asymmetric.rsa import RSAPublicKey, RSAPublicNumbers
from cryptography.x509 import load_pem_x509_certificate
... | 19,802 | Python | .py | 362 | 46.320442 | 120 | 0.701744 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,122 | _symantec.py | nabla-c0d3_sslyze/sslyze/plugins/certificate_info/_symantec.py | import binascii
from datetime import datetime, timezone
from enum import Enum
from typing import List, Optional
from cryptography.x509 import Certificate
from sslyze.plugins.certificate_info._certificate_utils import get_public_key_sha256
class SymantecDistrustTimelineEnum(Enum):
MARCH_2018 = 1
SEPTEMBER_20... | 7,093 | Python | .py | 111 | 55.333333 | 105 | 0.813343 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,123 | _cli_connector.py | nabla-c0d3_sslyze/sslyze/plugins/certificate_info/_cli_connector.py | import binascii
from pathlib import Path
from typing import List, Union, Dict, Optional, Tuple, TYPE_CHECKING
from cryptography import x509
from cryptography.hazmat.primitives import hashes
from cryptography.hazmat.primitives.asymmetric.ec import EllipticCurvePublicKey
from cryptography.hazmat.primitives.asymmetric.rs... | 15,820 | Python | .py | 278 | 44.884892 | 120 | 0.640349 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,124 | _cert_chain_analyzer.py | nabla-c0d3_sslyze/sslyze/plugins/certificate_info/_cert_chain_analyzer.py | from dataclasses import dataclass
from typing import Optional, List, cast
import cryptography
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives import hashes
from cryptography.hazmat.primitives.serialization import Encoding
from cryptography.x509 import ExtensionNotFound, Ex... | 13,840 | Python | .py | 229 | 49.484716 | 120 | 0.68872 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,125 | json_output.py | nabla-c0d3_sslyze/sslyze/plugins/certificate_info/json_output.py | from base64 import b64encode
from datetime import datetime
from pathlib import Path
from typing import Any, List, Optional
from pydantic import BaseModel, model_validator
from cryptography.hazmat.primitives import hashes
from cryptography.hazmat.primitives.asymmetric.rsa import RSAPublicKey
from cryptography.hazmat.... | 9,161 | Python | .py | 202 | 38.524752 | 111 | 0.732396 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,126 | _certificate_utils.py | nabla-c0d3_sslyze/sslyze/plugins/certificate_info/_certificate_utils.py | from dataclasses import dataclass
from hashlib import sha256
from typing import List, cast
from cryptography.hazmat.primitives.serialization import Encoding, PublicFormat
from cryptography.x509 import (
ExtensionOID,
DNSName,
ExtensionNotFound,
NameOID,
DuplicateExtension,
IPAddress,
Certif... | 2,054 | Python | .py | 46 | 38.978261 | 118 | 0.743615 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,127 | _get_cert_chain.py | nabla-c0d3_sslyze/sslyze/plugins/certificate_info/_get_cert_chain.py | from pathlib import Path
from typing import List, Optional, Tuple
import nassl
from nassl.ssl_client import ClientCertificateRequested
from sslyze.server_connectivity import ServerConnectivityInfo, TlsVersionEnum
ArgumentsToGetCertificateChain = Tuple[ServerConnectivityInfo, Optional[Path], Optional[TlsVersionEnum],... | 1,401 | Python | .py | 27 | 46.666667 | 119 | 0.769062 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,128 | implementation.py | nabla-c0d3_sslyze/sslyze/plugins/certificate_info/implementation.py | from dataclasses import dataclass
from pathlib import Path
from typing import Optional, List, Dict, Tuple
import nassl
from sslyze.errors import TlsHandshakeFailed
from sslyze.plugins.certificate_info._cert_chain_analyzer import (
CertificateDeploymentAnalyzer,
CertificateDeploymentAnalysisResult,
)
from ssly... | 7,213 | Python | .py | 120 | 51.341667 | 120 | 0.719179 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,129 | trust_store.py | nabla-c0d3_sslyze/sslyze/plugins/certificate_info/trust_stores/trust_store.py | from dataclasses import dataclass
import datetime
from pathlib import Path
from cryptography.x509 import Certificate
from cryptography.x509 import ExtensionNotFound, CertificatePolicies
from cryptography.x509 import ObjectIdentifier
from cryptography.x509 import ExtensionOID
from typing import List, cast
from typing i... | 4,276 | Python | .py | 79 | 46.240506 | 118 | 0.716543 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,130 | trust_store_repository.py | nabla-c0d3_sslyze/sslyze/plugins/certificate_info/trust_stores/trust_store_repository.py | import tarfile
import shutil
from enum import Enum
from pathlib import Path
from tempfile import mkdtemp
from urllib.request import urlretrieve
import inspect
import sys
from os.path import realpath
from cryptography.x509 import ObjectIdentifier
from sslyze.plugins.certificate_info.trust_stores.trust_store import T... | 6,262 | Python | .py | 148 | 34.844595 | 105 | 0.625144 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,131 | mozilla_config_checker.py | nabla-c0d3_sslyze/sslyze/mozilla_tls_profile/mozilla_config_checker.py | import json
from enum import Enum
from pathlib import Path
from typing import Optional, Set, Dict
import pydantic
from cryptography.hazmat.primitives.asymmetric.ec import EllipticCurvePublicKey
from cryptography.hazmat.primitives.asymmetric.rsa import RSAPublicKey
from nassl.ephemeral_key_info import EcDhEphemeralKeyI... | 15,079 | Python | .py | 301 | 41.913621 | 120 | 0.698288 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,132 | markers.py | nabla-c0d3_sslyze/tests/markers.py | import pytest
from tests.openssl_server import ModernOpenSslServer
can_only_run_on_linux_64 = pytest.mark.skipif(
condition=not ModernOpenSslServer.is_platform_supported(), reason="The test suite it not being run on Linux 64"
)
| 234 | Python | .py | 5 | 44.6 | 115 | 0.810573 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,133 | connectivity_utils.py | nabla-c0d3_sslyze/tests/connectivity_utils.py | from typing import Optional
from sslyze import ServerNetworkLocation, ServerNetworkConfiguration
from sslyze.server_connectivity import ServerConnectivityInfo, check_connectivity_to_server
def check_connectivity_to_server_and_return_info(
server_location: ServerNetworkLocation,
network_configuration: Optiona... | 867 | Python | .py | 17 | 45.705882 | 102 | 0.798817 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,134 | factories.py | nabla-c0d3_sslyze/tests/factories.py | from traceback import TracebackException
from typing import Optional, Set, Dict
from uuid import uuid4
from faker import Faker
from faker.providers import internet
from sslyze.cli.server_string_parser import InvalidServerStringError
from sslyze.cli.command_line_parser import ParsedCommandLine
from sslyze.errors impor... | 9,007 | Python | .py | 199 | 35.643216 | 120 | 0.693756 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,135 | test_main.py | nabla-c0d3_sslyze/tests/test_main.py | import sys
from unittest import mock
import pytest
from sslyze import SslyzeOutputAsJson
from sslyze.__main__ import main
class TestMain:
def test(self):
# Given a command line to launch the sslyze CLI
command_line = ["sslyze", "--quiet", "--compression", "www.google.com"]
# When runnin... | 1,600 | Python | .py | 33 | 40 | 98 | 0.654884 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,136 | test_json_output.py | nabla-c0d3_sslyze/tests/json_tests/test_json_output.py | from datetime import datetime
from pathlib import Path
from sslyze.json.json_output import SslyzeOutputAsJson, ServerScanResultAsJson
from sslyze.plugins.compression_plugin import CompressionScanResult
from sslyze import ScanCommandErrorReasonEnum, ServerScanStatusEnum, ScanCommandAttemptStatusEnum
from sslyze.scanner... | 5,087 | Python | .py | 99 | 42.181818 | 118 | 0.697104 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,137 | scan_localhost.py | nabla-c0d3_sslyze/tests/web_servers/scan_localhost.py | """Script designed to scan a server running on localhost:443.
This is used in CI to ensure SSLyze is able to scan specific web servers (Apache2, IIS, etc.) running on localhost:443
with client authentication required.
.
See ./.github/workflows and https://github.com/nabla-c0d3/sslyze/issues/472 for more details.
$ PY... | 9,890 | Python | .py | 171 | 45.859649 | 119 | 0.664193 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,138 | test_mozilla_config_checker.py | nabla-c0d3_sslyze/tests/test_mozilla_tls_profile/test_mozilla_config_checker.py | import pytest
from sslyze import Scanner, ServerScanRequest, ServerNetworkLocation
from sslyze.mozilla_tls_profile.mozilla_config_checker import (
MozillaTlsConfigurationChecker,
MozillaTlsConfigurationEnum,
ServerNotCompliantWithMozillaTlsConfiguration,
ServerScanResultIncomplete,
)
from tests.factor... | 6,936 | Python | .py | 114 | 51.54386 | 114 | 0.726912 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,139 | test_server_string_parser.py | nabla-c0d3_sslyze/tests/cli_tests/test_server_string_parser.py | from sslyze.cli.server_string_parser import CommandLineServerStringParser
class TestCommandLineServerStringParser:
def test(self):
server_string = "www.google.com"
hostname, ip_address, port = CommandLineServerStringParser.parse_server_string(server_string)
assert "www.google.com" == hostn... | 2,666 | Python | .py | 50 | 45.1 | 101 | 0.68738 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,140 | test_console_output.py | nabla-c0d3_sslyze/tests/cli_tests/test_console_output.py | from io import StringIO
from sslyze.cli.console_output import ObserverToGenerateConsoleOutput
from sslyze.plugins.compression_plugin import CompressionScanResult
from sslyze import ScanCommandErrorReasonEnum, ScanCommandAttemptStatusEnum
from sslyze.scanner.models import CompressionScanAttempt
from sslyze.server_conne... | 8,135 | Python | .py | 153 | 43.620915 | 104 | 0.710083 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,141 | test_heartbleed_plugin.py | nabla-c0d3_sslyze/tests/plugins_tests/test_heartbleed_plugin.py | from sslyze.plugins.heartbleed_plugin import HeartbleedImplementation, HeartbleedScanResultAsJson
from sslyze.server_setting import ServerNetworkLocation
from tests.connectivity_utils import check_connectivity_to_server_and_return_info
from tests.markers import can_only_run_on_linux_64
from tests.openssl_server import... | 4,746 | Python | .py | 73 | 55.39726 | 120 | 0.722055 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,142 | test_early_data_plugin.py | nabla-c0d3_sslyze/tests/plugins_tests/test_early_data_plugin.py | from sslyze.plugins.early_data_plugin import EarlyDataScanResult, EarlyDataImplementation, EarlyDataScanResultAsJson
from sslyze.server_setting import ServerNetworkLocation
from tests.connectivity_utils import check_connectivity_to_server_and_return_info
from tests.markers import can_only_run_on_linux_64
from tests.ope... | 2,857 | Python | .py | 47 | 51.191489 | 116 | 0.715868 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,143 | test_elliptic_curves_plugin.py | nabla-c0d3_sslyze/tests/plugins_tests/test_elliptic_curves_plugin.py | from sslyze import ServerNetworkLocation
from sslyze.plugins.elliptic_curves_plugin import (
SupportedEllipticCurvesScanResult,
SupportedEllipticCurvesImplementation,
SupportedEllipticCurvesScanResultAsJson,
)
from tests.connectivity_utils import check_connectivity_to_server_and_return_info
from tests.marke... | 2,435 | Python | .py | 40 | 53.225 | 118 | 0.755975 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,144 | test_session_renegotiation_plugin.py | nabla-c0d3_sslyze/tests/plugins_tests/test_session_renegotiation_plugin.py | from nassl.ssl_client import ClientCertificateRequested
from sslyze.plugins.session_renegotiation_plugin import (
SessionRenegotiationImplementation,
SessionRenegotiationScanResult,
SessionRenegotiationScanResultAsJson,
)
from sslyze.server_setting import (
ServerNetworkLocation,
ClientAuthenticat... | 4,519 | Python | .py | 76 | 49.921053 | 118 | 0.729779 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,145 | test_http_headers_plugin.py | nabla-c0d3_sslyze/tests/plugins_tests/test_http_headers_plugin.py | from dataclasses import dataclass
from http.client import HTTPResponse
from typing import Dict
import pytest
from nassl.ssl_client import ClientCertificateRequested
from sslyze.plugins.http_headers_plugin import (
HttpHeadersImplementation,
HttpHeadersScanResult,
_detect_http_redirection,
HttpHeadersS... | 8,651 | Python | .py | 171 | 41.356725 | 118 | 0.6899 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,146 | test_compression_plugin.py | nabla-c0d3_sslyze/tests/plugins_tests/test_compression_plugin.py | import pytest
from sslyze.plugins.compression_plugin import (
CompressionImplementation,
CompressionScanResult,
CompressionScanResultAsJson,
)
from sslyze.server_setting import ServerNetworkLocation
from tests.connectivity_utils import check_connectivity_to_server_and_return_info
from tests.markers import ... | 2,216 | Python | .py | 40 | 47.725 | 94 | 0.745035 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,147 | test_scan_commands.py | nabla-c0d3_sslyze/tests/plugins_tests/test_scan_commands.py | from sslyze.plugins.scan_commands import ScanCommandsRepository
class TestScanCommands:
def test_all_commands_are_implemented(self):
for scan_command in ScanCommandsRepository.get_all_scan_commands():
assert ScanCommandsRepository.get_implementation_cls(scan_command)
| 294 | Python | .py | 5 | 52.6 | 78 | 0.797909 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,148 | test_session_resumption_plugin.py | nabla-c0d3_sslyze/tests/plugins_tests/test_session_resumption_plugin.py | import pytest
from nassl.ssl_client import ClientCertificateRequested
from sslyze import TlsResumptionSupportEnum
from sslyze.plugins.session_resumption.implementation import (
SessionResumptionSupportImplementation,
SessionResumptionSupportScanResult,
SessionResumptionSupportExtraArgument,
)
from sslyze.p... | 6,648 | Python | .py | 108 | 52.148148 | 120 | 0.739411 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,149 | test_fallback_scsv_plugin.py | nabla-c0d3_sslyze/tests/plugins_tests/test_fallback_scsv_plugin.py | from nassl.ssl_client import ClientCertificateRequested
from sslyze.plugins.fallback_scsv_plugin import (
FallbackScsvScanResult,
FallbackScsvImplementation,
FallbackScsvScanResultAsJson,
)
from sslyze.server_setting import (
ServerNetworkLocation,
ServerNetworkConfiguration,
ClientAuthenticat... | 4,046 | Python | .py | 72 | 46.805556 | 118 | 0.717029 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,150 | test_robot_plugin.py | nabla-c0d3_sslyze/tests/plugins_tests/test_robot_plugin.py | from nassl.ssl_client import ClientCertificateRequested
from sslyze.plugins.robot.implementation import RobotImplementation, RobotScanResult, RobotScanResultAsJson
from sslyze.plugins.robot._robot_tester import RobotScanResultEnum
from sslyze.server_setting import ServerNetworkLocation
from tests.connectivity_utils im... | 2,197 | Python | .py | 36 | 53.222222 | 107 | 0.747212 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,151 | test_openssl_ccs_injection_plugin.py | nabla-c0d3_sslyze/tests/plugins_tests/test_openssl_ccs_injection_plugin.py | from sslyze.plugins.openssl_ccs_injection_plugin import (
OpenSslCcsInjectionImplementation,
OpenSslCcsInjectionScanResultAsJson,
)
from sslyze.server_setting import ServerNetworkLocation
from tests.connectivity_utils import check_connectivity_to_server_and_return_info
from tests.markers import can_only_run_on_... | 4,910 | Python | .py | 76 | 55.236842 | 120 | 0.726007 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,152 | test_cipher_suites.py | nabla-c0d3_sslyze/tests/plugins_tests/openssl_cipher_suites/test_cipher_suites.py | from sslyze.plugins.openssl_cipher_suites.cipher_suites import CipherSuitesRepository
from sslyze.server_connectivity import TlsVersionEnum
class TestCipherSuiteMappings:
def test_names_mapping_legacy_ssl_client(self):
for tls_version, expected_cipher_suites_count in [
(TlsVersionEnum.SSL_2_0,... | 923 | Python | .py | 18 | 40.388889 | 89 | 0.657807 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,153 | test_openssl_cipher_suites_plugin.py | nabla-c0d3_sslyze/tests/plugins_tests/openssl_cipher_suites/test_openssl_cipher_suites_plugin.py | import random
import pytest
from nassl.ephemeral_key_info import EcDhEphemeralKeyInfo
from sslyze.connection_helpers.opportunistic_tls_helpers import ProtocolWithOpportunisticTlsEnum
from sslyze.plugins.openssl_cipher_suites.implementation import (
Sslv20ScanImplementation,
CipherSuitesScanResult,
Sslv30S... | 19,909 | Python | .py | 344 | 48.09593 | 116 | 0.69555 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,154 | test_cli_connector.py | nabla-c0d3_sslyze/tests/plugins_tests/openssl_cipher_suites/test_cli_connector.py | from sslyze.plugins.openssl_cipher_suites.implementation import Tlsv12ScanImplementation
from sslyze.server_setting import ServerNetworkLocation
from tests.connectivity_utils import check_connectivity_to_server_and_return_info
class TestCipherSuitesCliConnector:
def test(self):
# Given a completed scan fo... | 787 | Python | .py | 12 | 59.333333 | 106 | 0.786269 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,155 | test_trust_store.py | nabla-c0d3_sslyze/tests/plugins_tests/certificate_info/test_trust_store.py | from datetime import datetime
from sslyze import TrustStore
from sslyze.plugins.certificate_info.trust_stores.trust_store_repository import TrustStoresRepository
GOOGLE_DOT_COM_CERT_CHAIN_ON_11_2022 = [
# www.google.com
"""-----BEGIN CERTIFICATE-----
MIIEhjCCA26gAwIBAgIRAIGnSAxq9cl3Enfafpo9aMEwDQYJKoZIhvcNAQ... | 8,918 | Python | .py | 150 | 55.62 | 113 | 0.87127 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,156 | test_certificate_info_plugin.py | nabla-c0d3_sslyze/tests/plugins_tests/certificate_info/test_certificate_info_plugin.py | from pathlib import Path
from cryptography.x509.ocsp import OCSPResponseStatus
from sslyze.plugins.certificate_info.implementation import CertificateInfoImplementation, CertificateInfoExtraArgument
from sslyze.server_setting import ServerNetworkLocation
from tests.connectivity_utils import check_connectivity_to_serv... | 10,526 | Python | .py | 155 | 58.787097 | 118 | 0.736531 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,157 | test_certificate_utils.py | nabla-c0d3_sslyze/tests/plugins_tests/certificate_info/test_certificate_utils.py | from pathlib import Path
from cryptography.hazmat.backends import default_backend
from cryptography.x509 import load_pem_x509_certificate
from sslyze.plugins.certificate_info._certificate_utils import (
get_common_names,
parse_subject_alternative_name_extension,
get_public_key_sha256,
)
from sslyze.plugin... | 1,242 | Python | .py | 23 | 49.347826 | 107 | 0.741536 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,158 | test_symantec.py | nabla-c0d3_sslyze/tests/plugins_tests/certificate_info/test_symantec.py | from cryptography.hazmat.backends import default_backend
from cryptography.x509.base import load_pem_x509_certificate
from sslyze.plugins.certificate_info._symantec import SymantecDistructTester, SymantecDistrustTimelineEnum
class TestSymantecDistrust:
def test_good(self):
# Given a certificate chain una... | 15,505 | Python | .py | 268 | 53.921642 | 118 | 0.895186 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,159 | test_json.py | nabla-c0d3_sslyze/tests/plugins_tests/certificate_info/test_json.py | from sslyze.plugins.certificate_info.implementation import CertificateInfoImplementation
from sslyze.plugins.certificate_info.json_output import CertificateInfoScanResultAsJson
from sslyze.server_setting import ServerNetworkLocation
from tests.connectivity_utils import check_connectivity_to_server_and_return_info
cla... | 1,035 | Python | .py | 17 | 54.176471 | 104 | 0.775913 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,160 | test_trust_store_repository.py | nabla-c0d3_sslyze/tests/plugins_tests/certificate_info/test_trust_store_repository.py | from sslyze.plugins.certificate_info.trust_stores.trust_store_repository import TrustStoresRepository
class TestTrustStoresRepository:
def test_get_default(self):
repo = TrustStoresRepository.get_default()
assert repo.get_main_store()
assert len(repo.get_all_stores()) == 5
def test_up... | 478 | Python | .py | 10 | 40.9 | 101 | 0.71828 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,161 | test_cli_connector.py | nabla-c0d3_sslyze/tests/plugins_tests/certificate_info/test_cli_connector.py | from sslyze.plugins.certificate_info.implementation import CertificateInfoImplementation
from sslyze.server_setting import ServerNetworkLocation
from tests.connectivity_utils import check_connectivity_to_server_and_return_info
class TestCertificateInfoCliConnector:
def test(self):
# Given a completed scan... | 805 | Python | .py | 12 | 60.833333 | 111 | 0.792405 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,162 | test_certificate_algorithms.py | nabla-c0d3_sslyze/tests/plugins_tests/certificate_info/test_certificate_algorithms.py | from pathlib import Path
from unittest import mock
from unittest.mock import PropertyMock
import cryptography
import pytest
from sslyze.plugins.certificate_info.json_output import CertificateInfoScanResultAsJson
from tests.connectivity_utils import check_connectivity_to_server_and_return_info
from tests.markers impor... | 4,925 | Python | .py | 80 | 51.8 | 113 | 0.715381 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,163 | test_via_http_proxy.py | nabla-c0d3_sslyze/tests/server_connectivity_tests/test_via_http_proxy.py | import threading
import pytest
from sslyze.json.json_output import _ServerTlsProbingResultAsJson
from sslyze.server_connectivity import check_connectivity_to_server
from sslyze.server_setting import ServerNetworkLocation, HttpProxySettings, ServerNetworkConfiguration
from sslyze.errors import (
ConnectionToHttpPr... | 4,648 | Python | .py | 96 | 38.208333 | 110 | 0.68254 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,164 | test_direct_connection.py | nabla-c0d3_sslyze/tests/server_connectivity_tests/test_direct_connection.py | import socket
import pytest
from sslyze.json.json_output import _ServerTlsProbingResultAsJson
from tests.openssl_server import LegacyOpenSslServer
from sslyze.server_connectivity import TlsVersionEnum, check_connectivity_to_server
from sslyze.server_setting import ServerNetworkLocation, ServerNetworkConfiguration
fr... | 8,032 | Python | .py | 151 | 43.284768 | 114 | 0.697885 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,165 | test_opportunistic_tls.py | nabla-c0d3_sslyze/tests/server_connectivity_tests/test_opportunistic_tls.py | import pytest
from sslyze.json.json_output import _ServerTlsProbingResultAsJson
from sslyze.server_connectivity import check_connectivity_to_server
from sslyze.server_setting import ServerNetworkLocation, ServerNetworkConfiguration
from sslyze.errors import ServerRejectedOpportunisticTlsNegotiation
from sslyze.connect... | 2,996 | Python | .py | 55 | 45.109091 | 115 | 0.716672 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,166 | tiny_proxy.py | nabla-c0d3_sslyze/tests/server_connectivity_tests/tiny_proxy.py | __doc__ = """Tiny HTTP Proxy.
This module implements GET, HEAD, POST, PUT and DELETE methods
on BaseHTTPServer, and behaves as an HTTP proxy. The CONNECT
method is also implemented experimentally, but has not been
tested yet.
Any help will be greatly appreciated. SUZUKI Hisao
Ported to Python 3 and modified for ss... | 4,089 | Python | .py | 109 | 26.550459 | 120 | 0.548208 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,167 | test_client_authentication.py | nabla-c0d3_sslyze/tests/server_connectivity_tests/test_client_authentication.py | import pytest
from sslyze.json.json_output import _ServerTlsProbingResultAsJson
from sslyze.server_connectivity import ClientAuthRequirementEnum, check_connectivity_to_server
from sslyze.server_setting import ServerNetworkLocation, ServerNetworkConfiguration
from tests.markers import can_only_run_on_linux_64
from test... | 3,897 | Python | .py | 63 | 52.031746 | 110 | 0.734154 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,168 | conftest.py | nabla-c0d3_sslyze/tests/scanner_tests/conftest.py | from dataclasses import dataclass
from typing import Optional, List, Tuple
from unittest import mock
import pytest
from sslyze.plugins.plugin_base import (
ScanCommandImplementation,
ScanCommandExtraArgument,
ScanJob,
ScanJobResult,
ScanCommandResult,
)
from sslyze.plugins.scan_commands import Sca... | 2,403 | Python | .py | 53 | 38.735849 | 117 | 0.720582 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,169 | test_scanner.py | nabla-c0d3_sslyze/tests/scanner_tests/test_scanner.py | from unittest import mock
from sslyze import (
Scanner,
ServerScanRequest,
ServerScanStatusEnum,
ServerScanResult,
ServerTlsProbingResult,
ServerNetworkLocation,
ScanCommand,
ScanCommandAttemptStatusEnum,
ScanCommandErrorReasonEnum,
)
from sslyze.errors import ConnectionToServerFail... | 6,115 | Python | .py | 119 | 41.806723 | 110 | 0.688997 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,170 | test_models.py | nabla-c0d3_sslyze/tests/scanner_tests/test_models.py | from pathlib import Path
import pytest
from sslyze import (
ServerScanRequest,
ServerNetworkLocation,
ScanCommandsExtraArguments,
CertificateInfoExtraArgument,
ScanCommand,
)
from sslyze.scanner.models import get_scan_command_attempt_cls
class TestServerScanRequest:
def test_default_values(s... | 1,779 | Python | .py | 39 | 36.666667 | 106 | 0.690173 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,171 | test_mass_connectivity_tester.py | nabla-c0d3_sslyze/tests/scanner_tests/test_mass_connectivity_tester.py | from sslyze import ServerNetworkLocation, ServerScanRequest, ServerTlsProbingResult
from sslyze.errors import ConnectionToServerFailed
from sslyze.scanner._mass_connectivity_tester import MassConnectivityTester
class TestMassConnectivityTester:
def test(self):
# Given a bunch of servers to scan
# ... | 2,716 | Python | .py | 50 | 44.94 | 115 | 0.711488 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,172 | test_jobs_worker_thread.py | nabla-c0d3_sslyze/tests/scanner_tests/test_jobs_worker_thread.py | from queue import Queue
from uuid import uuid4
from sslyze import ScanCommand
from sslyze.scanner._jobs_worker_thread import JobsWorkerThread, WorkerThreadNoMoreJobsSentinel, QueuedScanJob
class TestJobsWorkerThread:
def test(self):
# Given a worker thread that's waiting for jobs to process
jobs_... | 2,926 | Python | .py | 65 | 34.846154 | 110 | 0.633907 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,173 | test_mass_scanner.py | nabla-c0d3_sslyze/tests/scanner_tests/test_mass_scanner.py | import threading
from pathlib import Path
from queue import Queue
from typing import Optional, List
from unittest import mock
from sslyze import (
ScanCommand,
ServerConnectivityStatusEnum,
ServerScanStatusEnum,
ScanCommandAttemptStatusEnum,
ScanCommandsExtraArguments,
CertificateInfoExtraArgum... | 19,967 | Python | .py | 346 | 45.930636 | 120 | 0.677827 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,174 | __init__.py | nabla-c0d3_sslyze/tests/openssl_server/__init__.py | import shlex
import subprocess
from abc import ABC, abstractmethod
from enum import Enum
from pathlib import Path
from platform import architecture
from sys import platform
import logging
import time
from threading import Thread
from typing import Optional, List, IO
class NotOnLinux64Error(EnvironmentError):
""... | 10,991 | Python | .py | 240 | 35.816667 | 120 | 0.624065 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,175 | running-a-scan-in-python.rst | nabla-c0d3_sslyze/docs/running-a-scan-in-python.rst |
Running a Scan in Python
########################
Overview
********
SSLyze's Python API can be used to run scans and process results in an automated fashion.
Every SSLyze class has typing annotations, which allows IDEs such as VS Code and PyCharms to auto-import modules
and auto-complete field names. Make sure to l... | 3,618 | Python | .pyt | 70 | 48.428571 | 155 | 0.734246 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,176 | running-a-scan-in-python.html | nabla-c0d3_sslyze/docs/documentation/running-a-scan-in-python.html | <!DOCTYPE html>
<html lang="en" data-content_root="./">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
<title>Running a Scan in Python — SSLyze 6.0.0 docum... | 80,195 | Python | .pyt | 613 | 127.616639 | 2,014 | 0.697921 | nabla-c0d3/sslyze | 3,226 | 445 | 30 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,177 | theHiveKEYS.py.sample | CIRCL_AIL-framework/configs/keys/theHiveKEYS.py.sample | #!/usr/bin/env python
# -*- coding: utf-8 -*-
the_hive_url = 'http://10.1.0.145:9000'
the_hive_key = 'KfiPGz3Bi8E5styWbC2eU4WiTKDGdf22' # The Hive auth key can be found on the The Hive web interface under the User Management
the_hive_verifycert = True
| 253 | Python | .py | 5 | 49.4 | 138 | 0.740891 | CIRCL/AIL-framework | 1,299 | 282 | 102 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,178 | virusTotalKEYS.py.sample | CIRCL_AIL-framework/configs/keys/virusTotalKEYS.py.sample | #!/usr/bin/env python
# -*- coding: utf-8 -*-
vt_key = 'YOUR_API_KEY' #virus total API key
| 92 | Python | .py | 3 | 29.333333 | 44 | 0.636364 | CIRCL/AIL-framework | 1,299 | 282 | 102 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,179 | mispKEYS.py.sample | CIRCL_AIL-framework/configs/keys/mispKEYS.py.sample | #!/usr/bin/env python
# -*- coding: utf-8 -*-
misp_url = 'https://10.1.0.143'
misp_key = 'c5VRXJahYVux3rkPULbbILTNmAwlXU8Eas9zvl36' # The MISP auth key can be found on the MISP web interface under the automation section
misp_verifycert = True
| 244 | Python | .py | 5 | 47.6 | 141 | 0.752101 | CIRCL/AIL-framework | 1,299 | 282 | 102 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,180 | Update-conf.py | CIRCL_AIL-framework/bin/Update-conf.py | #!/usr/bin/env python3
# -*-coding:UTF-8 -*
import os
import sys
import configparser
def print_message(message_to_print, verbose):
if verbose:
print(message_to_print)
def update_config(config_file, config_file_sample, config_file_backup=False):
verbose = True
# Check if confile file exist
i... | 3,480 | Python | .py | 73 | 36.849315 | 113 | 0.617404 | CIRCL/AIL-framework | 1,299 | 282 | 102 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,181 | Update.py | CIRCL_AIL-framework/bin/Update.py | #!/usr/bin/env python3
# -*-coding:UTF-8 -*
"""
Update AIL
============================
Update AIL clone and fork
"""
import configparser
import os
import sys
import argparse
import subprocess
sys.path.append(os.environ['AIL_BIN'])
##################################
# Import Project packages
#####################... | 20,242 | Python | .py | 417 | 36.992806 | 138 | 0.532703 | CIRCL/AIL-framework | 1,299 | 282 | 102 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,182 | update-background.py | CIRCL_AIL-framework/bin/update-background.py | #!/usr/bin/env python3
# -*-coding:UTF-8 -*
"""
Update AIL
============================
Update AIL in the background
"""
import os
import logging
import logging.config
import sys
import subprocess
sys.path.append(os.environ['AIL_BIN'])
##################################
# Import Project packages
##################... | 2,188 | Python | .py | 63 | 25.952381 | 65 | 0.574468 | CIRCL/AIL-framework | 1,299 | 282 | 102 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,183 | AIL_Init.py | CIRCL_AIL-framework/bin/AIL_Init.py | #!/usr/bin/env python3
# -*-coding:UTF-8 -*
"""
AIL Init
============================
Init DB + Clear Stats
"""
import os
import sys
import logging.config
sys.path.append(os.environ['AIL_BIN'])
##################################
# Import Project packages
##################################
from lib import ail_core
f... | 694 | Python | .py | 25 | 25.68 | 64 | 0.626888 | CIRCL/AIL-framework | 1,299 | 282 | 102 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,184 | WebHookExporter.py | CIRCL_AIL-framework/bin/exporter/WebHookExporter.py | #!/usr/bin/env python3
# -*-coding:UTF-8 -*
"""
Importer Class
================
Import Content
"""
import json
import logging
import os
import requests
import sys
from abc import ABC
sys.path.append(os.environ['AIL_BIN'])
#################################
# Import Project packages
#################################
... | 2,029 | Python | .py | 59 | 25.169492 | 100 | 0.524272 | CIRCL/AIL-framework | 1,299 | 282 | 102 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,185 | TheHiveExporter.py | CIRCL_AIL-framework/bin/exporter/TheHiveExporter.py | #!/usr/bin/env python3
# -*-coding:UTF-8 -*
"""
Importer Class
================
Import Content
"""
import os
import sys
import uuid
from abc import ABC
from thehive4py.api import TheHiveApi
from thehive4py.models import Alert, AlertArtifact, Case, CaseObservable
import thehive4py.exceptions
from urllib3 import disa... | 8,678 | Python | .py | 214 | 30.373832 | 202 | 0.576809 | CIRCL/AIL-framework | 1,299 | 282 | 102 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,186 | MISPExporter.py | CIRCL_AIL-framework/bin/exporter/MISPExporter.py | #!/usr/bin/env python3
# -*-coding:UTF-8 -*
"""
Importer Class
================
Import Content
"""
import os
import datetime
import sys
import uuid
from abc import ABC
from pymisp import MISPEvent, PyMISP, PyMISPError
from urllib3 import disable_warnings as urllib3_disable_warnings
sys.path.append('../../configs/k... | 13,053 | Python | .py | 310 | 32.906452 | 202 | 0.602555 | CIRCL/AIL-framework | 1,299 | 282 | 102 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,187 | abstract_exporter.py | CIRCL_AIL-framework/bin/exporter/abstract_exporter.py | #!/usr/bin/env python3
# -*-coding:UTF-8 -*
"""
Importer Class
================
Import Content
"""
import os
import sys
from abc import ABC, abstractmethod
# sys.path.append(os.environ['AIL_BIN'])
##################################
# Import Project packages
##################################
# from ConfigLoader im... | 908 | Python | .py | 34 | 22 | 63 | 0.559028 | CIRCL/AIL-framework | 1,299 | 282 | 102 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,188 | MailExporter.py | CIRCL_AIL-framework/bin/exporter/MailExporter.py | #!/usr/bin/env python3
# -*-coding:UTF-8 -*
"""
Importer Class
================
Import Content
"""
import os
import logging
import logging.config
import sys
from abc import ABC
from ssl import create_default_context
import smtplib
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
... | 5,297 | Python | .py | 128 | 32.117188 | 114 | 0.598213 | CIRCL/AIL-framework | 1,299 | 282 | 102 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,189 | relationships_engine.py | CIRCL_AIL-framework/bin/lib/relationships_engine.py | #!/usr/bin/env python3
# -*-coding:UTF-8 -*
import json
import os
import sys
sys.path.append(os.environ['AIL_BIN'])
##################################
# Import Project packages
##################################
from lib.ConfigLoader import ConfigLoader
config_loader = ConfigLoader()
r_rel = config_loader.get_db_conn... | 9,824 | Python | .py | 227 | 36.674009 | 202 | 0.597276 | CIRCL/AIL-framework | 1,299 | 282 | 102 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,190 | regex_helper.py | CIRCL_AIL-framework/bin/lib/regex_helper.py | #!/usr/bin/env python3
# -*-coding:UTF-8 -*
"""
Regex Helper
"""
import os
import logging.config
import re
import sys
import uuid
from multiprocessing import Process as Proc
sys.path.append(os.environ['AIL_BIN'])
##################################
# Import Project packages
##################################
from li... | 6,932 | Python | .py | 188 | 28.101064 | 104 | 0.590308 | CIRCL/AIL-framework | 1,299 | 282 | 102 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,191 | Language.py | CIRCL_AIL-framework/bin/lib/Language.py | #!/usr/bin/env python3
# -*-coding:UTF-8 -*
import os
import re
import sys
import html2text
import gcld3
from lexilang.detector import detect as lexilang_detect
from libretranslatepy import LibreTranslateAPI
sys.path.append(os.environ['AIL_BIN'])
##################################
# Import Project packages
#########... | 18,992 | Python | .py | 544 | 28.03125 | 143 | 0.576339 | CIRCL/AIL-framework | 1,299 | 282 | 102 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,192 | ail_updates.py | CIRCL_AIL-framework/bin/lib/ail_updates.py | #!/usr/bin/env python3
# -*-coding:UTF-8 -*
import datetime
import os
import sys
sys.path.append(os.environ['AIL_BIN'])
##################################
# Import Project packages
##################################
from lib.ConfigLoader import ConfigLoader
config_loader = ConfigLoader()
r_db = config_loader.get_db_... | 7,021 | Python | .py | 193 | 29.715026 | 109 | 0.565018 | CIRCL/AIL-framework | 1,299 | 282 | 102 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,193 | module_extractor.py | CIRCL_AIL-framework/bin/lib/module_extractor.py | #!/usr/bin/env python3
# -*-coding:UTF-8 -*
import json
import logging
import os
import sys
import yara
from hashlib import sha256
from operator import itemgetter
sys.path.append(os.environ['AIL_BIN'])
##################################
# Import Project packages
##################################
from lib.ail_users ... | 12,397 | Python | .py | 276 | 35.876812 | 200 | 0.584713 | CIRCL/AIL-framework | 1,299 | 282 | 102 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,194 | Duplicate.py | CIRCL_AIL-framework/bin/lib/Duplicate.py | #!/usr/bin/env python3
# -*-coding:UTF-8 -*
import os
import ssdeep
import sys
import time
import tlsh
import datetime
sys.path.append(os.environ['AIL_BIN'])
##################################
# Import Project packages
##################################
from lib.ConfigLoader import ConfigLoader
config_loader = Conf... | 3,904 | Python | .py | 95 | 36.831579 | 111 | 0.669046 | CIRCL/AIL-framework | 1,299 | 282 | 102 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,195 | btc_ail.py | CIRCL_AIL-framework/bin/lib/btc_ail.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
import logging
import os
import sys
import requests
sys.path.append(os.environ['AIL_BIN'])
logger = logging.getLogger()
blockchain_all = 'https://blockchain.info/rawaddr'
# pre-alpha script
# default nb_transactions = 50
def get_bitcoin_info(bitcoin_addres... | 1,873 | Python | .py | 50 | 31.02 | 88 | 0.635008 | CIRCL/AIL-framework | 1,299 | 282 | 102 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,196 | ail_files.py | CIRCL_AIL-framework/bin/lib/ail_files.py | #!/usr/bin/env python3
# -*-coding:UTF-8 -*
import datetime
import logging.config
import magic
import os
import sys
from werkzeug.utils import secure_filename
sys.path.append(os.environ['AIL_BIN'])
##################################
# Import Project packages
##################################
from lib import ail_log... | 5,396 | Python | .py | 168 | 29.636905 | 118 | 0.586577 | CIRCL/AIL-framework | 1,299 | 282 | 102 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,197 | ail_users.py | CIRCL_AIL-framework/bin/lib/ail_users.py | #!/usr/bin/env python3
# -*-coding:UTF-8 -*
import bcrypt
import os
import pyotp
import re
import secrets
import sys
import segno
from base64 import b64encode
from datetime import datetime
from flask_login import UserMixin
from io import BytesIO
from uuid import uuid4
sys.path.append(os.environ['AIL_BIN'])
#########... | 26,049 | Python | .py | 631 | 35.26149 | 167 | 0.617743 | CIRCL/AIL-framework | 1,299 | 282 | 102 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,198 | Tag.py | CIRCL_AIL-framework/bin/lib/Tag.py | #!/usr/bin/env python3
# -*-coding:UTF-8 -*
import time
import redis
import datetime
import os
import json
import sys
from glob import glob
sys.path.append(os.environ['AIL_BIN'])
##################################
# Import Project packages
##################################
from lib.ConfigLoader import ConfigLoader... | 56,763 | Python | .py | 1,417 | 32.552576 | 149 | 0.58085 | CIRCL/AIL-framework | 1,299 | 282 | 102 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |
41,199 | chats_viewer.py | CIRCL_AIL-framework/bin/lib/chats_viewer.py | #!/usr/bin/python3
"""
Chats Viewer
===================
"""
import os
import sys
import time
import uuid
from datetime import datetime
sys.path.append(os.environ['AIL_BIN'])
##################################
# Import Project packages
##################################
from lib.ail_core import generate_uuid
from l... | 36,538 | Python | .py | 800 | 38.25 | 248 | 0.611177 | CIRCL/AIL-framework | 1,299 | 282 | 102 | AGPL-3.0 | 9/5/2024, 5:15:54 PM (Europe/Amsterdam) |