Package rekall :: Module io_manager :: Class ZipFileManager
[frames] | no frames]

Class ZipFileManager

source code


An IO Manager which stores files in a zip archive.

Nested Classes
  __metaclass__
Automatic Plugin Registration through metaclasses. (Inherited from rekall.io_manager.IOManager)
  top_level_class
The baseclass for abstracted IO implementations. (Inherited from rekall.io_manager.IOManager)
Instance Methods
 
__init__(self, urn=None, fd=None, **kwargs)
Initialize the IOManager.
source code
 
FlushInventory(self)
Write the inventory to the storage.
source code
 
ListFiles(self)
Returns a generator over all the files in this container.
source code
 
Create(self, name)
Creates a new file in the container.
source code
 
Destroy(self, name)
Destroys the file/directory at name's path.
source code
 
Open(self, name)
Opens a container member for reading.
source code
 
__enter__(self) source code
 
__exit__(self, exc_type, exc_value, traceback) source code
 
Close(self) source code
 
__str__(self)
str(x)
source code
 
CheckInventory(self, path)
Checks the validity of the inventory and if the path exists in it. (Inherited from rekall.io_manager.IOManager)
source code
 
Decoder(self, raw) (Inherited from rekall.io_manager.IOManager) source code
 
Encoder(self, data, **options) (Inherited from rekall.io_manager.IOManager) source code
 
GetData(self, name, raw=False, default=None)
Get the data object stored at container member. (Inherited from rekall.io_manager.IOManager)
source code
 
Metadata(self, path)
Returns metadata about a path. (Inherited from rekall.io_manager.IOManager)
source code
 
SetMetadata(self, name, options) (Inherited from rekall.io_manager.IOManager) source code
 
StoreData(self, name, data, **options)
Stores the data in the named container member. (Inherited from rekall.io_manager.IOManager)
source code
 
ValidateInventory(self) (Inherited from rekall.io_manager.IOManager) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Class Methods
 
ImplementationByClass(self, name) source code
 
ImplementationByName(self, name) source code
Class Variables
  order = 50
  classes = {'CacheDirectoryManager': <class 'rekall.plugins.too... (Inherited from rekall.io_manager.IOManager)
  classes_by_name = {None: [<class 'rekall.io_manager.DirectoryI... (Inherited from rekall.io_manager.IOManager)
  plugin_feature = 'IOManager' (Inherited from rekall.io_manager.IOManager)
Properties
  inventory
We do not really need an inventory for zip files.

Inherited from object: __class__

Method Details

__init__(self, urn=None, fd=None, **kwargs)
(Constructor)

source code 
Initialize the IOManager.

Args:

  urn: The path to the IO manager. This might contain a scheme or
       protocol specific to a certain IO manager implementation.

  mode: Can be "r" or "w".

  session: The session object.

  pretty_print: If specified we dump sorted yaml data - this ends up
  being more compressible in reality.

  version: The required version of the repository. The IOManager is free
       to implement arbitrary storage for different versions if
       required. Versioning the repository allows us to update the
       repository file format transparently without affecting older
       Rekall versions.

Overrides: object.__init__
(inherited documentation)

FlushInventory(self)

source code 

Write the inventory to the storage.

Overrides: IOManager.FlushInventory
(inherited documentation)

ListFiles(self)

source code 

Returns a generator over all the files in this container.

Overrides: IOManager.ListFiles
(inherited documentation)

Create(self, name)

source code 
Creates a new file in the container.

Returns a file like object which should support the context manager
protocol. If the file already exists in the container, overwrite it.

For example:

with self.session.io_manager.Create("foobar") as fd:
   fd.Write("hello world")

Args:
  name: The name of the new file.

Overrides: IOManager.Create
(inherited documentation)

Destroy(self, name)

source code 

Destroys the file/directory at name's path.

Overrides: IOManager.Destroy
(inherited documentation)

Open(self, name)

source code 
Opens a container member for reading.

This should return a file like object which provides read access to
container members.

Raises:
  IOManagerError: If the file is not found.

Overrides: IOManager.Open
(inherited documentation)

__enter__(self)

source code 
Overrides: IOManager.__enter__

__exit__(self, exc_type, exc_value, traceback)

source code 
Overrides: IOManager.__exit__

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)

ImplementationByClass(self, name)
Class Method

source code 
Overrides: IOManager.ImplementationByClass

ImplementationByName(self, name)
Class Method

source code 
Overrides: IOManager.ImplementationByName

Property Details

inventory

We do not really need an inventory for zip files.

We return a fake one based on the zip file's modification time.

Get Method:
unreachable.inventory(self) - We do not really need an inventory for zip files.