# Path: sslscan.py



from datetime import datetime
from sslscan import modules
from sslscan.module.scan import BaseScan
from flextls.exception import NotEnoughData
from flextls.field import CipherSuiteField
from flextls.protocol.handshake import Handshake, ServerHello
from flextls.protocol.record import SSLv3Record
from flextls.protocol.alert import Alert
import flextls
import six
    import socket
        protocol_versions = self._scanner.get_enabled_versions()
        protocol_versions.reverse()
        scsv_status = None
        kb.set("server.security.scsv", None)
        for protocol_version in protocol_versions:
            if protocol_version != flextls.registry.version.SSLv2:
                cipher_suites = flextls.registry.tls.cipher_suites.get_ids()
                scsv_cur_status = None
                try:
                    scsv_cur_status = self._connect_with_scsv(
                        protocol_version,
                        cipher_suites
                    )
                except Timeout:
                    continue

                if scsv_cur_status is None:
                    continue
                
                if scsv_cur_status is True:
                    kb.set("server.security.scsv", True)
                    break

                if scsv_status is False and  scsv_cur_status is False:
                    kb.set("server.security.scsv", False)
                    break

                scsv_status = scsv_cur_status



# Path: sslscan.py



# Path: sslscan/module/scan/server_scsv.py
from datetime import datetime
from sslscan import modules
from sslscan.module.scan import BaseScan
from flextls.exception import NotEnoughData
from flextls.field import CipherSuiteField
from flextls.protocol.handshake import Handshake, ServerHello
from flextls.protocol.record import SSLv3Record
from flextls.protocol.alert import Alert
import flextls
import six
    import socket

        protocol_versions = self._scanner.get_enabled_versions()
        protocol_versions.reverse()
        scsv_status = None
        kb.set("server.security.scsv", None)
        for protocol_version in protocol_versions:
            if protocol_version != flextls.registry.version.SSLv2:
                cipher_suites = flextls.registry.tls.cipher_suites.get_ids()
                scsv_cur_status = None
                try:
                    scsv_cur_status = self._connect_with_scsv(
                        protocol_version,
                        cipher_suites
                    )
                except Timeout:
                    continue

                if scsv_cur_status is None:
                    continue
                
                if scsv_cur_status is True:
                    kb.set("server.security.scsv", True)
                    break

                if scsv_status is False and  scsv_cur_status is False:
                    kb.set("server.security.scsv", False)
                    break

                scsv_status = scsv_cur_status



modules.register(ServerSCSV)