Commit Graph
65 Commits
Author SHA1 Message Date
Mike Auty 1f0e81a898 layers: Stackers are sorted by stack_order not layer priorities. 2019-11-16 12:53:56 +00:00
Mike Auty b99ace86fb Tidy up exceptions to be more accurate. 2019-11-13 19:58:14 +00: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 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 3d87b06c36 Add in documentation to all the constants. 2019-08-18 18:55:57 +01:00
Mike Auty 86a60985ec Revert "Add in poor man's lru_caching to see if it's the caching or lru_cache itself."
This reverts commit 48826a9051.
2019-05-11 20:52:45 +01:00
Mike Auty 48826a9051 Add in poor man's lru_caching to see if it's the caching or lru_cache itself. 2019-05-11 20:33:18 +01:00
Mike Auty 2d939a7ddb Fix syntax error. 2019-05-11 20:32:21 +01:00
Mike Auty 9378c445db lru_cache just seems to break file reading. 2019-05-09 01:56:17 +01:00
Mike Auty 488b9be2ba Attempt to apply lru_cache but without using staticmethod. 2019-05-09 01:43:00 +01:00
Mike Auty a87d3c0dad Make sure the separation of read isn't the issue. 2019-05-09 01:05:34 +01:00
Mike Auty df4c81a7c0 Trade off memory for disk reads (take 2). 2019-05-09 00:49:36 +01:00
Mike Auty d0ff961ed1 Revert "Trade off memory for disk reads."
This reverts commit 20c609b180.
2019-05-09 00:06:07 +01:00
Mike Auty 20c609b180 Trade off memory for disk reads. 2019-05-08 23:47:02 +01:00
Mike Auty cc3a9ea4d8 Fix locking type issue. 2019-04-05 14:50:22 +01:00
Mike Auty 7c9696def9 Minor fixes for typing and imports. 2019-03-02 22:45:39 +00:00
Mike Auty 33a9db6b9f Make parallelism options more well defined. 2019-03-02 18:52:02 +00:00
Mike Auty 9fadee1a17 Add locking for threaded operation. 2019-03-02 18:07:48 +00: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 fdc6efc4ad Add in the LICENSE and the README. 2018-12-19 23:55:03 +00:00
Mike Auty 7f973f9e3e Refactor the ResourceAccessor so it can be used by layers. 2018-12-17 19:38:18 +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 7a52ac9deb Fix a large number of typing issues.
There are several instances where mypy didn't detect

if blah is not None:
    blah = thing

and so were rewritten as:

blah = blah or thing
2018-06-04 01:25:02 +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 556fa29ada Deprecate/remove 'provides' attribute. 2018-04-26 12:31:33 +01:00
Mike Auty ac12098317 Add type-annotations for reamining layer files. 2017-12-13 20:48:52 +00:00
Mike Auty 917829d87f Reduce the number of times a ResourceAccessor is created, and use all handlers. 2017-11-24 22:27:36 +00:00
Mike Auty b6d932f4a5 Refactor the ResourceAccessor because it isn't an interface.
It's not strictly limited to layers either, but I don't really want to
create a whole extra generic file to put this in, so layers will do.
2017-11-05 21:27:56 +00:00
Mike Auty a4b4a8eed3 Improve the error handling with automagics. 2017-11-04 18:45:08 +00:00
Mike Auty 4b7543f2f4 Unify the resource opening. 2017-11-02 21:46:39 +00:00
Mike Auty c6724a538a Initial support for compressed files. 2017-08-11 01:12:50 +01:00
Mike Auty 5e15d522bd Remove automatic IDE-inserted attributions.
They weren't consistent and they show just remind me how slowly
I've been getting vol 3 written!  5:S

There's git commits to track all of that stuff if we need it.
2017-05-14 11:40:49 +01:00
Mike Auty 3aec66333e Allow the vmware stacker to ask the FileLayer it's on top of what filename it had. 2016-12-29 15:10:21 +00:00
Mike Auty 60bf657895 Allow pickling of FileLayers by unsetting the file (it'll be reopened as soon as a read happens). 2016-12-25 00:02:42 +00:00
Mike Auty 3dc161f9b4 Rework Translation Layers to tie more closely to configurations
This change is quite signficant, and requires that TranslationLayers
get all additional parameters that they need through their requirements.

These are now automatically enumerated and populated on object
construction based on the requirements, so should not require lots of
repetitive filling out of fields.

It does come with the downside that TranslationLayers can only be
contructed with a context (and appropiate config), but TLs in particular
always require a context (to contain the base layer) and blank configs
can be constructed relatively easily (convenience functions can be added
if necessary).

This allows configuration trees to be built up, and their configs
spliced into an existing config (as if it were being loaded from a
file).

Not all ConstructableRequirements use this method, since SymbolTables
(for example) do not have access to the context or config_path in order
to get to any parameters stored in the context's config.  They therefore
are still passed their requirement values as __init__ parameters
instead.
2016-08-22 02:20:10 +01:00
Mike Auty d3e63fbc1a Rename update_configuration to build_configuration and return a standalone config. 2016-08-22 02:18:23 +01:00
Mike Auty ca61cf10b9 Refactor the context back into the ConfigurableInterface.
This also adds support for manually constructed configurables to
populate the config tree in the current context.

I'm still toying around with this though, I need to figure out
what to do with optional values and think the whole thing through
to make sure it's worthwhile.
2016-08-14 21:28:43 +01:00
Mike Auty 8089a03f81 Convert the private file attribute to a property to allow for cloning. 2016-08-14 01:09:36 +01:00
Mike Auty e02feed16e Python 3 has a sane super() implementation (no arguments), so convert to using that. 2016-08-14 00:55:02 +01:00
Mike Auty bb2dd859d5 Refactor the get_schema call to make more sense. 2016-07-29 02:56:20 +01:00
Mike Auty 5290baf73d Make InvalidAddress exceptions more useful. 2016-07-02 13:31:36 +01:00
Mike Auty d882f93fee Move the length check, and require a non-zero length to protect is_valid. 2016-05-22 19:23:15 +01:00
Mike Auty 9faa13820a Since we're a forensics program, make sure we only read unless we know the user REALLY wants to write. 2016-05-22 19:21:24 +01:00
Mike Auty 03cb131260 Add a priority ordering for testing layers (high priority trumps lower priority). 2016-01-21 00:06:39 +01:00
Mike Auty 139a6b610e Add in an appropriate requirement for BufferLayers. 2016-01-16 22:20:10 +00:00
Mike Auty 00660f2a2b Refactor requirements to their own file. 2016-01-16 21:04:41 +00:00