Package Halberd :: Module crew
[show private | hide private]
[frames | no frames]

Module Halberd.crew

Work crew pattern of parallel scanners

Overview

A work crew is instantiated passing a ScanTask object as a parameter, thus defining the target and the way the scanning should be done. After the initialization of the work crew it can be used to scan the target and get the obtained clues back.
>>> crew = WorkCrew(scantask)
>>> clues = crew.scan()

Requirements

These are the features that the WorkCrew must provide:
  1. There are 3 different types of consumers:
  2. We need a way to signal:

Types of scanning threads

The WorkCrew object spawns different kinds of threads. Here's a brief summary of what they do: The following is a diagram showing the way it works:
                                    .--> Manager --.
                                    |              |
                                    +--> Scanner --+
       .----------.   .----------.  |              |   .-------.
IN --> | ScanTask |->-| WorkCrew |--+--> Scanner --+->-| Clues |--> OUT
       `----------'   `----------'  |              |   `-------'
                                    +--> Scanner --+
                                    |              |
                                    `--> Scanner --'

Classes
WorkCrew Pool of scanners working in parallel.
BaseScanner Base class for load balancer scanning threads.
Manager Performs management tasks during the scan.
Scanner Scans the target host from the local machine.
ScanState Shared state among scanner threads.

Generated by Epydoc 2.1 on Thu Aug 17 12:42:15 2006 http://epydoc.sf.net