tking2 / volatility

Automatically exported from code.google.com/p/volatility
GNU General Public License v2.0
0 stars 1 forks source link

Deconflicting Options (with basic patch) #341

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run volatility in a scripting environment like iPython
2. Attempt to run an assorted number of commands with similar options

eg.:

What is the expectation? 
Volatility will be able to deconflict options (long/short), which already 
reside in the self.optparser instance

What version of the product are you using? On what operating system?
2.2- Alpha

Please provide any additional information below.

I have provided a temporary fix for this issue.  I have basically added a 
manual check to see if the normalized or short option already exist in the 
self.optparser instance.  If they do, the currently configured command's option 
is booted out.

I think this could have implications on commands that perform activities in a 
multithreaded context.  For example, 'dllist' is being used in one thread and 
gets configured, and at exactly the moment after dlllist is configured, 
'consoles' is also configured.  These two commands share a similar short 
option, so dlllist will lose.  Thus, when dlllist.calculate is called it will 
fail (because its option was removed).

At the moment, I am not too certain how a good fix would go, because I am not 
entirely familiar with the overall configuration scheme.  One approach may be 
to use separate options parsers for each command, as they are instantiated.  
This helps alleviate in potential for a command stomping over another commands 
environment variables and it helps remove the problem of conflicting options. 

I had a few thoughts about how to approach this issue with a cleaner fix, but I 
am not well versed in how the configuration works, so I am not sure if my 
proposals will work.  Ping me and let me know.

Original issue reported on code.google.com by adam.pri...@thecoverofnight.com on 1 Sep 2012 at 6:41

Attachments:

GoogleCodeExporter commented 9 years ago
*e.g. --- Script is attached.

Original comment by adam.pri...@thecoverofnight.com on 1 Sep 2012 at 6:42

GoogleCodeExporter commented 9 years ago

Original comment by michael.hale@gmail.com on 6 Sep 2012 at 9:56

GoogleCodeExporter commented 9 years ago
Current volatility trunk can not be used in multithreaded environments for a 
variety of reasons. We will be using argparse in future over optparser if only 
because optparser is deprecated since python 2.7.

Original comment by scude...@gmail.com on 7 Sep 2012 at 2:21

GoogleCodeExporter commented 9 years ago

Original comment by michael.hale@gmail.com on 1 Feb 2013 at 4:26

GoogleCodeExporter commented 9 years ago

Original comment by michael.hale@gmail.com on 7 Mar 2014 at 9:20

GoogleCodeExporter commented 9 years ago

Original comment by mike.auty@gmail.com on 18 Feb 2015 at 6:54