Argh! So close! Needed to pass the _config! Should've known! Thanks MHL - all working now :)
On 4 May 2016 at 16:26, Michael Ligh <[email protected]> wrote: > Hey Adam, > > First you'd need to create an instance of the plugin class, and pass it > the config object. Then you can call its calculate() method. For example: > > import volatility.plugins.gui.messagehooks as messagehooks > plugin = messagehooks.MessageHooks(self._config) > for x in plugin.calculate(): > print x > > We do this a lot in other plugins, but one in particular that you can > consult for examples is the truecrypt plugin: > > > https://github.com/volatilityfoundation/volatility/blob/master/volatility/plugins/tcaudit.py#L466 > > Cheers, > MHL > > On 5/4/16 4:32 AM, Bridgey theGeek wrote: > > Hi all, > > > > I'm trying to access the data that's exposed by the messagehooks plugin, > > specifically: > > volatility.plugins.gui.messagehooks.MessageHooks().calculate() > > > > I want to be able to work with the window_stations and atom_tables that > > are yielded by the method. > > > > I tried making a new instance of the class and manually calling: > > mh = messagehooks.MessageHooks(atoms.Atoms, sessions.SessionsMixin) > > for x in mh.calculate(): > > print x > > > > However when run, I get an attribute error: > > File "plugin.py", line 81, in calculate() > > for x in mh.calculate(): > > File ".../messagehooks.py", line 68, in calculate > > in atoms.Atoms(self._config).calculate()) > > File ".../messagehooks.py", line 6, in <genexpr> > > atom_tables = dict((atom_table, winsta) > > File ".../atoms.py", line 153, in calculate > > for wndsta in windowstations.WndScan(self._config).calculate(): > > File ".../common.py", line 45, in __init__ > > config.add_option("VIRTUAL", short_option = "V", default = False, > > AttributeError: type object 'Atoms' has no attribute 'add_option' > > > > Is there a better/correct way of getting at the data normally yielded by > > a plugin's calculate method? > > > > Thank you, > > Adam > > > > > > _______________________________________________ > > Vol-users mailing list > > [email protected] > > http://lists.volatilesystems.com/mailman/listinfo/vol-users > > > >
_______________________________________________ Vol-users mailing list [email protected] http://lists.volatilesystems.com/mailman/listinfo/vol-users
