Commit Graph
64 Commits
Author SHA1 Message Date
Mike Auty 8e420cbe62 Core: Multiple typing fixes across the tree 2020-08-16 22:22:24 +01:00
Mike Auty 79d44edd37 Automagic: Don't hide errors from manual stacker setting 2020-07-16 11:17:29 +01:00
Mike Auty 4cccbc2f69 Automagic: Fix os_chooser method
Two issues found:
* the plugin hierarchy always start volatility.plugins, so we need
to go to index 2.
* the layers weren't loaded at the time the stacker list was generated
so all other stackers failed.
2020-07-02 19:33:32 +01:00
Mike Auty 55dd1c6c2c Automagic: Fix bad default parameter 2020-07-02 19:33:32 +01:00
Mike Auty 16c2ddb837 Automagic: Change stackers to including an exclusion list 2020-07-02 19:33:32 +01:00
Mike Auty 33d1c696e5 Automagic: Allow stackers to be configurable 2020-07-02 19:33:32 +01:00
Mike Auty 944bf2174f Automagic: Split out the stacker code 2020-07-01 20:30:31 +01:00
Mike Auty 71e082f25f Ensure the layers are loaded on layer stacker run, not just when a layer is stacked. 2019-10-07 01:52:58 +01:00
Mike Auty ae010a2390 Improve log levels and distribution of messages. 2019-09-26 21:16:12 +01:00
Mike Auty e0b9d72c84 Update the license URL and LICENSE.txt 2019-09-25 21:44:05 +01:00
Mike Auty 72567e1c50 Yapf-0.28.0 rerun across the whole codebase. 2019-09-21 21:08:23 +01:00
Mike Auty ffc7682d61 Ensure that layers are automatically imported when needed. 2019-09-08 14:13:28 +01:00
Mike Auty e922cef316 Improve docstrings for all plugins, and reformat all docstrings. 2019-09-07 22:59:54 +01:00
Mike Auty 9cde94bceb Change the license blurb on all files. 2019-08-27 23:11:00 +01:00
Mike Auty 272224a1b0 Refactor all references to Context.memory to Context.layers. 2019-07-07 17:42:51 +01:00
Mike Auty c64ed6a8dd Remove validity checking in favour of static-type checking.
This removes the assertions that checked plugin devs didn't do anything
overly bad in favour of using mypy to ensure appropriate type-checking.

It also moves the ProgressCallback typing information to constants in
order to avoid circular imports (since constants doesn't import
anything).
2019-01-20 02:35:49 +00:00
Mike Auty b13fcb186c Improve typing issues. 2019-01-03 01:13:53 +00:00
Mike Auty fdc6efc4ad Add in the LICENSE and the README. 2018-12-19 23:55:03 +00:00
Mike Auty 7ca5514b83 Remove long-broken convenience code from ConfigurableInterface.
In the dim and distant past, I seemingly thought it a good idea to copy
all the values out of an object's config and into local private
attributes (I guess to avoid config lookups?).  It turns out, it was
always broken because it looking at the root of the config tree, rather
than under the object's specific config settings.

This first turned up as an issue where self._meta_layer was being
overwritten by None in the vmware layer.  Removing this resolved the
issue.
2018-12-17 22:08:24 +00:00
Mike Auty de4fa6df51 Ensure we can see how the stacker is acting. 2018-12-17 17:32:46 +00:00
Mike Auty 19572b6e1e Reformat all python files using yapf with custom volatility style. 2018-12-16 16:50:17 +00:00
Mike Auty 9824538bd9 Numerous pycharm warnings resolved
This includes:

* Better ways of checking empty lists
* Not shadowing builtin functions like filter
* Preventing invalid slash warnings by marking strings as regexps
* Removing unnecessary brackets
* Lowercase variable names
* Adding/updating parameters in docstrings
* Removing unused code (lines not chunks)
* Change in not a member tests
* Changing some methods to static
* Shorting range membership checks
* Missing parameters
* Make some exception handlers more specific
* Don't define a lambda to a variable
* A few more instance checks to help type checkers
2018-12-16 13:21:06 +00:00
Mike Auty 29d41470a4 Mass reformat of typing imports
Relented on the strict import of direct objects/classes for the typing
module only.  Typing module components can be directly imported because
it makes the code really painful to read and write otherwise.

This is still in-line with the python style guide adopted from Google at
http://google.github.io/styleguide/pyguide.html section 2.2.
2018-12-16 13:04:22 +00:00
Mike Auty 190ffaf28b Refactor where certain types of requirement live (given they're more concrete than interface). 2018-09-20 16:14:57 +01:00
Mike Auty b1d46f843b Convert documentation to napoleon/Google format docstrings. 2018-08-05 15:52:12 +01:00
Mike Auty b9fbf272d1 Add support for filename requirements
At the moment these are no different than strings, but they allow us to
do things like add URI handlers to file names if no scheme is provided,
and eventually do file existence testing.  This also allows the web URI
to allow uploads as a means of passing a file in.

The configuration will only store the filename, because otherwise
someone could add a huge file which would need to be carried around in
the config forever after.  Handling file existence errors is up to the
UI after the volatility library returns a "file not found" type
exception.
2018-05-08 23:54:08 +01:00
Mike Auty 9512cbe9eb Commit metadata changeset.
Layers now accept metadata dictionaries (and chain/stack them on top of
those from lower layers).  Metadata can only be set at construction
time, and the metadata dictionary is readonly.  The hope is this will
make enumerating metadata keys across the codebase simpler.

The current metadata items that layers hold is:

architecture (Unknown | Intel32 | Intel64)
os (Unknown | Windows | Linux)
pae (bool)
page_map_offset (int)

This patchset may develop further to help enumerate all of these
(through a registration/reporting system).
2018-04-26 12:48:14 +01:00
Mike Auty 623180ddbd Make many typing fixes, based on mypy-0.590. 2018-04-22 20:45:59 +01:00
Mike Auty 2e50cde2e7 Fix minor typing issues. 2018-04-11 20:50:11 +01:00
Mike Auty 5938254c3c Add caching to the stack automagic in case it's reused. 2018-04-02 02:13:59 +01:00
Mike Auty 19236199b1 Refactor stacking and move the automagic location to a constant. 2018-04-02 02:09:56 +01:00
Mike Auty 24be045266 Minor fix ups with typing and exceptions. 2018-02-10 22:42:31 +00:00
Mike Auty e23bb65162 Add in better logging. 2017-12-13 20:48:52 +00:00
Mike Auty 50b60c0df6 Add in more interfaces (and fix additional errors now that type information is available). 2017-12-13 20:48:52 +00:00
Mike Auty 2cc456e847 Finish off the automagic directory type annotations. 2017-12-13 20:48:52 +00:00
Mike Auty d7d13eb19c Add type annotations to most of the automagic files. 2017-12-13 20:48:52 +00:00
Mike Auty 9d7d547667 Minor linting. 2017-11-04 18:45:18 +00:00
Mike Auty a4b4a8eed3 Improve the error handling with automagics. 2017-11-04 18:45:08 +00:00
Mike Auty 8166b0cc96 Add better logging around the stacker. 2017-11-04 17:13:01 +00:00
Mike Auty 4b7543f2f4 Unify the resource opening. 2017-11-02 21:46:39 +00:00
Mike Auty dbc73df8f2 Make sure we support windows filenames
Consider refactoring out the various URL openning code into
one that just returns the open file handle.  This would require changing
the config option of "filename" to "location" and rejigging a few other
bits elsewhere, but would centralize and make it more managable.
2017-11-02 11:56:03 +00:00
Mike Auty 06767bd44c Ensure we get a warning of some kind when a bad scheme is provided. 2017-10-05 00:13:45 +01:00
Mike Auty c6724a538a Initial support for compressed files. 2017-08-11 01:12:50 +01:00
Mike Auty b7c8c8a058 Improve the docstrings for automagic. 2017-07-29 12:53:35 +01:00
Mike Auty 8087f86bcf Remove debugging statements. 2017-07-20 00:51:03 +01:00
Mike Auty fbd70438a0 Slightly more error checking. 2017-07-20 00:49:56 +01:00
Mike Auty 03cdd91fbf Add in the capability to merge two config dicts (so that manually set settings aren't overwritten). 2017-07-20 00:49:36 +01:00
Mike Auty ff41d4e5b0 Improve config.json handling, making single_location optional but bypasses the stacker automagic. 2017-04-21 00:53:08 +01:00
Mike Auty 5d3ff13a6e Ensure LayerStacker's default doesn't get accepted blindly. 2017-01-08 18:08:13 +00:00
Mike Auty 149e57afee Change the requirement validation system to return all unsatisfied requirements, to provide more feedback. 2017-01-08 17:26:09 +00:00