# Path: sslscan.py

# 
# Path: sslscan/kb.py
# class ResultGroup(BaseResult):
#     """Group results"""
# 
#     def __init__(self, **kwargs):
#         BaseResult.__init__(self, **kwargs)
#         self._items = []
# 
#     def __iter__(self):
#         return self._items.__iter__()
# 
#     def append(self, item):
#         self._items.append(item)
# 
#     def get_items(self):
#         return self._items
# 
# class ResultValue(BaseResult):
#     """A single result value"""
# 
#     def __init__(self, name=None, value=None, **kwargs):
#         BaseResult.__init__(self, **kwargs)
#         self.name = name
#         self.value = value


from sslscan import modules
from sslscan.kb import ResultGroup, ResultValue
from sslscan.module.scan import BaseInfoScan
    """
    Extract additional information.

    Perform a IMAP request and extract additional information.
    """

    name = "protocol.imap"
    alias = ("imap",)

    def run(self):
        if self._scanner.handler.name != "imap":
            return

        kb = self._scanner.get_knowledge_base()

        server_info = self._get_server_info()
        if server_info is None:
            return

        kb.set(
            "server.custom.protocol.imap",
            ResultGroup(
                label="IMAP Information"
            )
        )

        banner = server_info.get("banner")
        if banner is not None:
            kb.set(
                "server.custom.protocol.imap.banner",

# Path: sslscan.py

# 
# Path: sslscan/kb.py
# class ResultGroup(BaseResult):
#     """Group results"""
# 
#     def __init__(self, **kwargs):
#         BaseResult.__init__(self, **kwargs)
#         self._items = []
# 
#     def __iter__(self):
#         return self._items.__iter__()
# 
#     def append(self, item):
#         self._items.append(item)
# 
#     def get_items(self):
#         return self._items
# 
# class ResultValue(BaseResult):
#     """A single result value"""
# 
#     def __init__(self, name=None, value=None, **kwargs):
#         BaseResult.__init__(self, **kwargs)
#         self.name = name
#         self.value = value


# Path: sslscan/module/scan/protocol_imap.py
from sslscan import modules
from sslscan.kb import ResultGroup, ResultValue
from sslscan.module.scan import BaseInfoScan

    """
    Extract additional information.

    Perform a IMAP request and extract additional information.
    """

    name = "protocol.imap"
    alias = ("imap",)

    def run(self):
        if self._scanner.handler.name != "imap":
            return

        kb = self._scanner.get_knowledge_base()

        server_info = self._get_server_info()
        if server_info is None:
            return

        kb.set(
            "server.custom.protocol.imap",
            ResultGroup(
                label="IMAP Information"
            )
        )

        banner = server_info.get("banner")
        if banner is not None:
            kb.set(
                "server.custom.protocol.imap.banner",

                ResultValue(