Exscript.protocols.osguesser module

class Exscript.protocols.osguesser.OsGuesser[source]

Bases: future.types.newobject.newobject

The OsGuesser monitors everything that happens on a Protocol, and attempts to collect data out of the network activity. It watches for specific patterns in the network traffic to decide what operating system a connected host is running. It is completely passive, and attempts no changes on the protocol adapter. However, the protocol adapter may request information from the OsGuesser, and perform changes based on the information provided.

__init__()[source]

x.__init__(…) initializes x; see help(type(x)) for signature

data_received(data, app_authentication_done)[source]
get(key, confidence=0)[source]

Returns the info with the given key, if it has at least the given confidence. Returns None otherwise.

protocol_info(data)[source]
reset(auth_buffer='')[source]
set(key, value, confidence=100)[source]

Defines the given value with the given confidence, unless the same value is already defined with a higher confidence level.

set_from_match(key, regex_list, string)[source]

Given a list of functions or three-tuples (regex, value, confidence), this function walks through them and checks whether any of the items in the list matches the given string. If the list item is a function, it must have the following signature:

func(string) : (string, int)

Where the return value specifies the resulting value and the confidence of the match. If a match is found, and the confidence level is higher than the currently defined one, the given value is defined with the given confidence.