Commit Graph
151 Commits
Author SHA1 Message Date
Mike Auty 4cde0da8a9 Support passing through functions from specific to generic template. 2019-08-10 00:25:21 +01:00
Mike Auty 272224a1b0 Refactor all references to Context.memory to Context.layers. 2019-07-07 17:42:51 +01:00
Mike Auty 94703d88d8 Fix up enumeration object creation. 2019-06-30 23:05:15 +01:00
Mike Auty e503c3667f Improve enumeration support. 2019-06-30 14:12:43 +01:00
Mike Auty 1c0cd7ddaf Make sure objects.utility is imported automatically. 2019-05-09 00:07:59 +01:00
Mike Auty 5b0f99229c Remove the VolTemplateProxy method proxying to fix the slowdown. 2019-04-18 01:48:56 +01:00
Mike Auty 8c76a25b2d Allow VolTemplateProxies to include additional useful methods. 2019-04-17 23:53:36 +01:00
Mike Auty e5d6cd3d16 Add in Enum ObjectTemplate lookup method. 2019-04-17 23:53:22 +01:00
Mike Auty 9b488f89fd Make the default python-type for Chars an int rather than a bytes. 2019-02-06 21:06:12 +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 b13fcb186c Improve typing issues. 2019-01-03 01:13:53 +00:00
Mike Auty 6bb927ebfa Fix up terminology to ensure we only refer to layers not spaces. 2019-01-03 00:40:13 +00:00
Mike Auty fdc6efc4ad Add in the LICENSE and the README. 2018-12-19 23:55:03 +00:00
Andrew Caseandikelos 8f213a95d7 vol_class -> CPPObject 2018-12-19 00:54:51 +00:00
Mike Auty c5ebf91915 Yapf reformat of the patches. 2018-12-19 00:54:51 +00:00
Andrew Caseandikelos 6aac0571e6 add support for objective C classes in OSX and json format 2018-12-19 00:54:51 +00:00
Mike Auty e65a00894a Minor style tweaks and mass changes across the codebase because of it. 2018-12-17 12:46:14 +00:00
Mike Auty b61ac3bd47 Many more typing fixes. 2018-12-17 01:17:06 +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 f41e3e0453 Completely rework the primitive data format system. 2018-12-13 18:33:42 +00:00
Mike Auty 9949809198 Fix a minor typo. 2018-12-13 18:33:42 +00:00
Mike Auty b533d19f83 Refactor the data extraction for primitive types. 2018-12-13 18:33:42 +00:00
Mike Auty a78452e361 Fix up ugly int128 hack with a slightly nicer hack. 2018-12-13 15:56:24 +00:00
Mike Auty 8acbe8bba3 Refactor conversion code from objects.utility to a conversion module in renderers. 2018-12-12 23:39:10 +00:00
Mike Auty cf95f6e73e Minor typing fix. 2018-12-08 18:41:13 +00:00
Andrew Caseandikelos 3ab654847e Change NotApplicableValue -> UnparsableValue 2018-12-08 17:34:48 +00:00
Andrew Caseandikelos c6e9763e5a Linux - add bash plugin 2018-12-08 17:34:48 +00:00
Mike Auty 90c964905a Fix up a circular import issue. 2018-11-08 00:25:26 +00:00
Mike Auty db7320e426 Bulk lint and a couple of typos fixed. 2018-11-08 00:19:17 +00:00
Mike Auty 001d53e768 Rework some code to help with typing. 2018-11-01 11:17:15 +00:00
Mike Auty 9c101aee91 Ensure pointers are masked based on their native_layer not their instantiated layer. 2018-10-04 02:44:26 +01:00
Mike Auty fa552aa3b0 Add in the native_layer_name concept to ObjectInformation. 2018-09-12 22:45:34 +01:00
Mike Auty 059be517fc Fix up minor typing issues. 2018-08-29 23:29:00 +01:00
Mike Auty 3a6b4ad35c Add in the has_member method for objects and templates. 2018-08-29 22:54:56 +01:00
Mike Auty d08c29ffab Improve style to use default iterators rather than explicit ones. 2018-08-05 16:18:53 +01:00
Mike Auty b1d46f843b Convert documentation to napoleon/Google format docstrings. 2018-08-05 15:52:12 +01:00
Mike Auty 7fc19ef110 Updating typing information. 2018-08-05 15:02:11 +01:00
Mike Auty bca972f28a Remove the python implementation of __getattribute__ for speed.
The __getattribute__ method is called for *all* attribute lookups, and
the python implementation is likely slow.  The only function the python
implementation provided was to check that properties started with
helper_.  Since this only provided a log message, we could add it back
in only if the log level is high enough?  Either way, it's not
significant enough to warrant costing extra time in every attribute
lookup on every object.
2018-07-30 23:58:02 +01:00
Mike Auty 552101b593 Attempt to reduce the amount of time taken in calling templates. 2018-07-30 23:53:00 +01:00
Mike Auty 79d2bab44d A few additional typing fixes. 2018-07-22 13:29:43 +01:00
Mike Auty 4897b7ab81 Fix up some typing errors. 2018-07-22 13:19:20 +01:00
Mike Auty 106a0cb6fd Rework the array_of_pointers utility function.
It now makes use of the original array's symbol table to get the pointer
template, such that the size of the pointer is correct according to the
original table.  Resolves "pointer.size" attribute errors (firing inside
a property and thus throwing off unusual exceptions).
2018-07-18 22:35:13 +01:00
Mike Auty d9ed86bcc5 Ensure we return the correct values for dir(). 2018-06-16 14:29:51 +01:00
Michael LighandMike Auty fb57e2c5f2 wininfo, procdump, dlldump, and json for pe & kdbg 2018-06-12 08:40:21 +01: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 623180ddbd Make many typing fixes, based on mypy-0.590. 2018-04-22 20:45:59 +01:00
Mike Auty 6fdf577058 Fix up another typing warning. 2018-04-12 14:57:10 +01:00
Mike Auty 66af2f16de Fix more typing issues. 2018-04-12 14:09:11 +01:00