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

Module Halberd.clientlib

HTTP/HTTPS client module.
Classes
HTTPClient Special-purpose HTTP client.
HTTPSClient Special-purpose HTTPS client.

Exceptions
ConnectionRefused Unable to reach webserver
HTTPError Generic HTTP exception
HTTPSError Generic HTTPS exception
InvalidURL Invalid or unsupported URL
TimedOut Operation timed out
UnknownReply The remote host didn't return an HTTP reply

Function Summary
class clientFactory(scantask)
HTTP/HTTPS client factory.

Variable Summary
int default_bufsize: Default number of bytes to try to read from the network.
str default_template: Request template, must be filled by HTTPClient
float default_timeout: Default timeout for socket operations.

Function Details

clientFactory(scantask)

HTTP/HTTPS client factory.
Parameters:
scantask - Object describing where the target is and how to reach it.
           (type=instanceof(ScanTask))
Returns:
The appropriate client class for the specified URL.
           (type=class)

Variable Details

default_bufsize

Default number of bytes to try to read from the network.
Type:
int
Value:
1024                                                                  

default_template

Request template, must be filled by HTTPClient
Type:
str
Value:
'''GET %(request)s HTTP/1.1\r
Host: %(hostname)s%(port)s\r
Pragma: no-cache\r
Cache-control: no-cache\r
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.7) Gecko/20\
050414 Firefox/1.0.3\r
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, applicati\
on/x-shockwave-flash, */*\r
...                                                                    

default_timeout

Default timeout for socket operations.
Type:
float
Value:
2                                                                     

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