Package rekall :: Module session :: Class Session
[frames] | no frames]

Class Session

source code


Base session.

This session contains the bare minimum to use rekall.

Nested Classes
  __metaclass__
Automatic Plugin Registration through metaclasses.
  top_level_class
Base session.
Instance Methods
 
__init__(self, **kwargs)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
__enter__(self) source code
 
__exit__(self, exc_type, exc_value, trace) source code
 
Reset(self) source code
 
__getattr__(self, attr)
This will only get called if the attribute does not exist.
source code
 
HasParameter(self, item)
Returns if the session has the specified parameter set.
source code
 
GetParameter(self, item, default=<None Object>, cached=True)
Retrieves a stored parameter.
source code
 
SetCache(self, item, value, volatile=True)
Store something in the cache.
source code
 
SetParameter(self, item, value)
Sets a session parameter.
source code
 
RunPlugin(self, plugin_obj, *args, **kwargs)
Launch a plugin and its render() method automatically.
source code
 
LoadProfile(self, name, use_cache=True)
Try to load a profile directly by its name.
source code
 
__unicode__(self) source code
 
report_progress(self, message=' %(spinner)s', *args, **kwargs)
Called by the library to report back on the progress.
source code
 
GetRenderer(self, output=None)
Get a renderer for this session.
source code
 
clone(self, **kwargs) source code
 
register_flush_hook(self, owner, hook, args=())
This hook will run when the session is closed.
source code
 
remove_flush_hook(self, owner)
Removes the flush hooks set by the owner.
source code
 
Flush(self)
Destroy this session.
source code

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

Class Methods
 
ImplementationByClass(self, name) source code
 
ImplementationByName(self, name) source code
Class Variables
  SERIALIZABLE_STATE_PARAMETERS = [('ept', u'IntParser'), ('prof...
  session_id = 0
  privileged = False
  classes = {'InteractiveSession': <class 'rekall.session.Intera...
  classes_by_name = {None: [<class 'rekall.session.Session'>, <c...
  plugin_feature = 'Session'
Properties
  logging
  volatile
  repository_managers
The IO managers that are used to fetch profiles from the profile repository.
  default_address_space
  address_resolver
A convenience accessor for the address resolver implementation.
  physical_address_space
  profile

Inherited from object: __class__

Method Details

__init__(self, **kwargs)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

HasParameter(self, item)

source code 

Returns if the session has the specified parameter set.

If False, a call to GetParameter() might trigger autodetection.

GetParameter(self, item, default=<None Object>, cached=True)

source code 

Retrieves a stored parameter.

Parameters are managed by the Rekall session in two layers. The state containers contains those parameters which are deliberately set by the user.

Some parameters are calculated by plugins and are used in order to speed up further calculations. These are cached in the state as well.

It is important to never override a user selection by the cached results. Since the user must be allowed to override all parameters - for example through the GUI or the command line. Therefore when resolving a parameter, we first check in the state, and only if the parameter does not exist, we check the cache.

SetParameter(self, item, value)

source code 

Sets a session parameter.

NOTE! This method should only be used for setting user provided data. It must not be used to set cached data - use SetCache() instead. Parameters set with this method are not cleared as part of session.Reset() and are copied to cloned sessions.

RunPlugin(self, plugin_obj, *args, **kwargs)

source code 
Launch a plugin and its render() method automatically.

We use the pager specified in session.GetParameter("pager").

Args:
  plugin_obj: A string naming the plugin, or the plugin instance itself.
  *pos_args: Args passed to the plugin if it is not an instance.
  **kwargs: kwargs passed to the plugin if it is not an instance.

LoadProfile(self, name, use_cache=True)

source code 
Try to load a profile directly by its name.

Args:

  name: A string which represents the canonical name for the profile. We
      ask all repositories in the repository_path to resolve this name
      into a profile.

Returns:
  a Profile() instance or a NoneObject()

GetRenderer(self, output=None)

source code 

Get a renderer for this session.

If a renderer is currently active we just reuse it, otherwise we instantiate the renderer specified in self.GetParameter("format").

remove_flush_hook(self, owner)

source code 

Removes the flush hooks set by the owner.

Returns the hooks so they can be called if needed.

Flush(self)

source code 

Destroy this session.

This should be called when the session is destroyed.


Class Variable Details

SERIALIZABLE_STATE_PARAMETERS

Value:
[('ept', u'IntParser'),
 ('profile', u'FileName'),
 ('filename', u'FileName'),
 ('pagefile', u'FileName'),
 ('session_name', u'String'),
 ('timezone', u'TimeZone')]

classes

Value:
{'InteractiveSession': <class 'rekall.session.InteractiveSession'>,
 'Session': <class 'rekall.session.Session'>}

classes_by_name

Value:
{None: [<class 'rekall.session.Session'>,
        <class 'rekall.session.InteractiveSession'>]}

Property Details

logging

Get Method:
unreachable.logging(self)

volatile

Get Method:
unreachable.volatile(self)

repository_managers

The IO managers that are used to fetch profiles from the profile repository.

Get Method:
unreachable.repository_managers(self) - The IO managers that are used to fetch profiles from the profile repository.

default_address_space

Get Method:
unreachable.default_address_space(self)

address_resolver

A convenience accessor for the address resolver implementation.

Note that the correct address resolver implementation depends on the profile. For example, windows has its own address resolver, while Linux and OSX have a different one.

Get Method:
unreachable.address_resolver(self) - A convenience accessor for the address resolver implementation.

physical_address_space

Get Method:
unreachable.physical_address_space(self)
Set Method:
unreachable.physical_address_space(self, value)

profile

Get Method:
unreachable.profile(self)
Set Method:
unreachable.profile(self, value)