Package Halberd :: Package clues :: Module Clue :: Class Clue |
[show private | hide private]
[frames | no frames]

## Class Clue

A clue is what we use to tell real servers behind a virtual IP.

Clues are gathered during several connections to a web server and they allow us to try to identify patterns in its responses. Those patterns could allow us to find out which real servers are behind a VIP

Method Summary
| `__init__(self)`
| `__eq__(self, other)`
| `__ne__(self, other)`
| `__repr__(self)`
`int`. | ``getCount`(self)` Retrieve the number of times the clue has been found
| ``incCount`(self, num)` Increase the times this clue has been found.
`str` | ``normalize`(name)` Normalize string. (Static method)
| ``parse`(self, headers)` Extracts all relevant information from the MIME headers replied by the target.
| ``setTimestamp`(self, timestamp)` Sets the local clock attribute.

Instance Method Details

### getCount(self) Retrieve the number of times the clue has been found Returns: Number of hits. (type=`int`.)

### incCount(self, num=1) Increase the times this clue has been found. Parameters: `num` - A positive non-zero number of hits to increase. (type=`int`) Raises: `ValueError` - in case `num` is less than or equal to zero.

### parse(self, headers) Extracts all relevant information from the MIME headers replied by the target. Parameters: `headers` - A set of MIME headers (a string as replied by the webserver or a previously parsed sequence of name, value tuples). (type=`str`, `list` or `tuple`) Raises: `TypeError` - If headers is neither a string nor a sequence.

### setTimestamp(self, timestamp) Sets the local clock attribute. Parameters: `timestamp` - The local time (expressed in seconds since the Epoch) when the connection to the target was successfully completed. (type=`int`)

Static Method Details

### normalize(name) Normalize string. This method takes a string coming out of mime-fields and transforms it into a valid Python identifier. That's done by removing invalid non-alphanumeric characters and also numeric ones placed at the beginning of the string. Parameters: `name` - String to be normalized. (type=`str`) Returns: Normalized string. (type=`str`)

Generated by Epydoc 2.1 on Thu Aug 24 19:08:32 2006 | http://epydoc.sf.net