Closed GoogleCodeExporter closed 9 years ago
Ok, this is most likely caused because the ModuleRegistry will register any
class present in a module once the module's been sourced. This means that the
line:
from volatility.plugins.filescan import FileScan, MutantScan,
DriverScan, PoolScanDriver
puts those classes directly into your module's namespace, causing them to be
re-registered and causing the clash.
Could you please try the following instead:
import volatility.plugins.filescan as filescan
class DriverIRP(filescan.DriverScan):
and let us know whether that works?
Original comment by mike.auty@gmail.com
on 29 Sep 2010 at 2:22
Original comment by mike.auty@gmail.com
on 29 Sep 2010 at 2:22
Yep, that solves the problem - thanks. Another thing, which I can enter
separately if you like (but I figure you might be aware of it) is that plugins
in the contrib directory aren't registering. For example the
contrib/plugins/verinfo.py doesn't show up for me using Rev 483.
Original comment by michael.hale@gmail.com
on 29 Sep 2010 at 2:37
Ok, cool. I think I might leave the bug open a little longer to discuss
whether we should fix this, or whether we're happy telling people they can't
use from...import lines. Scudette, what's your take on this?
Also, would this go away if we changed the dynamic namespaces to path-based
namespaces? My guess is that it won't, in which case we still need to make
this design decision.
Lastly, you're quite right, the contrib plugins won't register, that's by
design. If you want the (highly unsupported, since it's currently just my
horrible verinfo) contrib plugins registered, you'll need to add them using
either --plugins or setting it permanently in ~/.volatilityrc.
Original comment by mike.auty@gmail.com
on 29 Sep 2010 at 2:46
I dont expect the issue will go away if we change the import mechanism. This is
a feature not a bug!
We could remove the restriction on registering the same module twice and that
would make it go away.
Original comment by scude...@gmail.com
on 29 Sep 2010 at 3:06
No, I definitely don't want to remove that restriction. We'd end up with
duplicates, or worse, only let one of them win, and then we'd have to decide
which one. So it sounds like we're going to simply enforce that plugins
authors cannot directly import into their plugins namespace.
I've updated the wiki page on Plugins, and am now marking this as WontFix.
Original comment by mike.auty@gmail.com
on 29 Sep 2010 at 4:01
Original issue reported on code.google.com by
michael.hale@gmail.com
on 29 Sep 2010 at 1:33