Closed GoogleCodeExporter closed 9 years ago
Original comment by jamie.l...@gmail.com
on 23 Apr 2013 at 1:26
Hello,
So if you use the idt/gdt plugins via vol.py it prints the error message as
expected, and gracefully exits:
$ python vol.py -f mem.dmp --profile=Win7SP1x64 idt
Volatile Systems Volatility Framework 2.3_alpha
CPU Index Selector Value Module Section
------ ------ ------------------ ------------------ --------------------
------------
ERROR : volatility.plugins.malware.idt: This command does not support the
selected profile.
The difference between vol.py and your test_memory.py script is that we catch
the SystemExit exception. If you wanted to take special actions when a "fatal"
error like this is encountered in your script, I'd suggest enclosing the
potentially offending lines in a try/except that catches SystemExit and then
does whatever you want.
Alternately, since you are writing your own script, you can check if the plugin
is going to exit before you call calculate(). For example:
{{{
import volatility.plugins.malware.idt as idt
.....
if idt.IDT.is_valid_profile(my_address_space.profile):
# call idt.calculate()
else:
print "sorry, not running this plugin"
}}}
I'm going to assume one of those options will work for you and close this issue
out. If you have other thoughts, feel free to re-open.
Original comment by michael.hale@gmail.com
on 27 Apr 2013 at 4:07
Original issue reported on code.google.com by
mikespec...@gmail.com
on 22 Apr 2013 at 6:40