Halberd ::
clues ::
file ::
ClueDir ::
Class ClueDir
|
|
Class ClueDir
source code
Stores clues hierarchically using the underlying filesystem.
ClueDir tries to be as portable as possible but requires the host
operating system to be able to create long filenames (and directories, of
course).
This is an example layout:
http___www_microsoft_com/
http___www_microsoft_com/207_46_134_221.clu
http___www_microsoft_com/207_46_156_220.clu
http___www_microsoft_com/207_46_156_252.clu
.
.
.
|
|
|
_sanitize(self,
url)
Filter out potentially dangerous chars. |
source code
|
|
|
|
|
|
Initializes ClueDir object.
- Parameters:
root (str ) - Root folder where to start creating sub-folders.
|
Creates a directory to store clues.
If the directory already exists it won't complain about that.
|
Hierarchically write clues.
- Parameters:
url (url ) - URL scanned (will be used as a directory name).
addr (str ) - Address of the target.
clues (list ) - Clues to be stored.
- Raises:
OSError - If the directories can't be created.
IOError - If the file can't be stored successfully.
|