Trees | Indices | Help |
|
---|
|
1 # Rekall Memory Forensics 2 # Copyright (C) 2012 Michael Cohen 3 # Copyright 2014 Google Inc. All Rights Reserved. 4 # 5 # This program is free software; you can redistribute it and/or modify 6 # it under the terms of the GNU General Public License as published by 7 # the Free Software Foundation; either version 2 of the License, or (at 8 # your option) any later version. 9 # 10 # This program is distributed in the hope that it will be useful, but 11 # WITHOUT ANY WARRANTY; without even the implied warranty of 12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 # General Public License for more details. 14 # 15 # You should have received a copy of the GNU General Public License 16 # along with this program; if not, write to the Free Software 17 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 # 19 20 """This module implements a pass-through renderer. 21 22 The renderer in this module just passes table rows along as it received them. 23 """ 24 25 from rekall.ui import renderer as renderer_module 26 2729 columns = None 30 plugin_name = None 31 rows = None 328434 super(IdentityRenderer, self).__init__(session=kwargs.get("session")) 35 self.rows = [] 36 self.delegated_renderer = self.session.GetRenderer()37 40 43 4648 self.delegated_renderer.flush()4951 super(IdentityRenderer, self).start(plugin_name=plugin_name, **_) 52 self.plugin_name = plugin_name 53 return self5456 self.columns = [] 57 for column in columns: 58 if isinstance(column, dict): 59 self.columns.append(column) 60 elif isinstance(column, tuple): 61 self.columns.append(dict(name=column[0], 62 formatstring=column[2])) 63 else: 64 raise TypeError("Column spec must be dict or tuple. Got %r." 65 % column)6668 column = self.columns[idx] 69 if isinstance(column, tuple): 70 return column[1] 71 72 return column["name"]7375 row = dict() 76 for idx, value in enumerate(values): 77 name = self._get_column_name(idx) 78 row[name] = value 79 80 self.rows.append(row)8183 return self.delegated_renderer.open(**kwargs)
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Mon Oct 9 03:29:41 2017 | http://epydoc.sourceforge.net |