Agent: Add IFingerprinter

This commit is contained in:
Mike Salvatore 2022-02-07 10:23:28 -05:00
parent 5695808adb
commit 4361aa2325
3 changed files with 31 additions and 2 deletions

View File

@ -9,3 +9,4 @@ from .i_puppet import (
PostBreachData,
UnknownPluginError,
)
from .i_fingerprinter import IFingerprinter

View File

@ -0,0 +1,27 @@
from abc import abstractmethod
from typing import Dict
from . import FingerprintData, PingScanData, PortScanData
class IFingerprinter:
@abstractmethod
def get_host_fingerprint(
self,
host: str,
ping_scan_data: PingScanData,
port_scan_data: Dict[int, PortScanData],
options: Dict,
) -> FingerprintData:
"""
Attempts to gather detailed information about a host and its services
:param str host: The domain name or IP address of a host
:param PingScanData ping_scan_data: Data retrieved from the target host via ICMP
:param Dict[int, PortScanData] port_scan_data: Data retrieved from the target host via a TCP
port scan
:param Dict options: A dictionary containing options that modify the behavior of the
fingerprinter
:return: Detailed information about the target host
:rtype: FingerprintData
"""
pass

View File

@ -86,7 +86,8 @@ class IPuppet(metaclass=abc.ABCMeta):
options: Dict,
) -> FingerprintData:
"""
Runs a fingerprinter against a remote host
Runs a specific fingerprinter to attempt to gather detailed information about a host and its
services
:param str name: The name of the fingerprinter to run
:param str host: The domain name or IP address of a host
:param PingScanData ping_scan_data: Data retrieved from the target host via ICMP
@ -94,7 +95,7 @@ class IPuppet(metaclass=abc.ABCMeta):
port scan
:param Dict options: A dictionary containing options that modify the behavior of the
fingerprinter
:return: The data collected by running the fingerprinter on the specified host
:return: Detailed information about the target host
:rtype: FingerprintData
"""