fluidasserts.helper.banner module

This module enables banner and fingerprint grabbing for other modules.

class fluidasserts.helper.banner.HTTPService(url, *args, **kwargs)

Bases: object

HTTP Service definition.

Build a new Service object.

get_banner()

Get HTTP Server banner.

Return type

str

get_fingerprint()

Get HTTP fingerprint.

Return type

dict

get_version()

Get version.

Parameters

server – Server to connect to.

Return type

typing.Optional[str]

class fluidasserts.helper.banner.SMTPService(port=25, is_active=False, is_ssl=False, payload=None)

Bases: fluidasserts.helper.banner.Service

SMTP Service definition.

Build a new Service object.

get_version(server)

Get version.

Parameters

server (str) – Server to connect to.

Return type

typing.Optional[str]

class fluidasserts.helper.banner.SSHService(port=22, is_active=False, is_ssl=False, payload=None)

Bases: fluidasserts.helper.banner.Service

SSH Service definition.

Build a new SSHService object.

get_version(server)

Get version.

Parameters

server (str) – Server to connect to.

Return type

typing.Optional[str]

class fluidasserts.helper.banner.Service(port, is_active, is_ssl, payload=None)

Bases: object

Abstract class of service.

Build a new Service object.

Parameters
  • port (int) – Port to connect to.

  • is_active (bool) – Whether server is active.

  • is_ssl (bool) – Whether connection is to be made via SSL.

get_banner(server)

Get the banner of the service on a given port of an IP address.

Parameters

server (str) – Server to connect to.

Return type

str

get_fingerprint(server)

Get fingerprint of the banner.

Parameters

server (str) –

Return type

dict

abstract get_version(server)

Parse the banner.

Return the product and version of the service.

Return type

None