honeypots package


honeypots.honeypot module

class honeypots.honeypot.Honeypot(address, scan_os=False, verbose_scan=True)[source]

Bases: object

Holds all data known about one Honeypot. Used for decoupling the acquisition of the data from its usages.

__init__(address, scan_os=False, verbose_scan=True)[source]
  • address – ip address of the target
  • scan_os – scan for Operating System information (requires elevated privileges)
  • verbose_scan – print progress bars and stats when running a scan
css = []

Returns all open ports on the honeypot :param protocol: ‘tcp’ / ‘udp’ :return: list of ports

get_banner(port, protocol='tcp')[source]

Grab banner on specified port :param port: port number :param protocol: ‘tcp’ / ‘udp’ :return: banner as string :raises: ScanFailure

get_service_name(port, protocol)[source]

Get name of service running on requested port :param port: target port :param protocol: ‘tcp’ or ‘udp’ :return: service name

get_service_ports(service_name, protocol)[source]

Checks if the Honeypot has a certain service available. :param service_name: name of the service to search for :param protocol: ‘tcp’ or ‘udp’ :return: list of port numbers (a certain service can run on multiple ports)

get_service_product(protocol, port)[source]

Get the product description for a certain port :param protocol: ‘tcp’ / ‘udp’ :param port: port number :return: description string


Gets websites for all active web servers found on the target :return: list of website content strings


Gets website stylesheet for all active web servers found on the target :return: list of stylesheet strings


Checks if the Honeypot has a certain port open. :param port_number: port number :return: port status boolean

run_nmap_script(script, port, protocol='tcp')[source]

Runs a .nse script on the specified port range :param script: <script_name>.nse :param port: port / port range :param protocol: ‘tcp’/’udp’ :return: script output as string :raises: ScanFailure

scan(port_range=None, fast=False)[source]

Runs a scan on this Honeypot for data acquisition.

scan_id = 0
websites = []
exception honeypots.honeypot.ScanFailure(*report)[source]

Bases: Exception

Raised when one of the data gathering methods fails

Parameters:report – description of the error

Module contents