Commit Graph
99 Commits
Author SHA1 Message Date
Mike Auty b74eb68c04 Pull the check on layer names out so that DataLayerInterface types get it as well. 2018-08-22 09:33:47 +01:00
Mike Auty 4897b7ab81 Fix up some typing errors. 2018-07-22 13:19:20 +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 f72e39d558 Fix up small but significant typo.
When asking for data with padding, the padding was guaranteed to always
be at the end without spaces between pages.
2018-05-29 00:42:52 +01:00
Mike Auty 67239002bc Attempt to fix an intel read issue spotted by imhlv2
The length value inside the read method of the TranslationLayer base class
would potentially get overwritten by the inner loop which also defined a
length value.
2018-05-28 23:25:49 +01:00
Mike Auty 61bf1d40b0 Fix scan_iterator parameter type. 2018-05-15 00:06:43 +01:00
Mike Auty 037ac28534 Move around the scanning functions and create an API for the iterators. 2018-05-14 01:03:43 +01:00
Mike Auty a07691b04f Ensure scanners don't return duplicates in the overlap. 2018-05-13 20:55:54 +01:00
Mike Auty ffe2907fa0 Minor typing fix. 2018-05-01 21:22:26 +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 623180ddbd Make many typing fixes, based on mypy-0.590. 2018-04-22 20:45:59 +01:00
Mike Auty d8f497eb71 Allow unpickling of PrimitiveObjects. 2018-04-08 22:25:46 +01:00
Mike Auty ac12098317 Add type-annotations for reamining layer files. 2017-12-13 20:48:52 +00:00
Mike Auty f40fae197d Convert to python3.5 syntax (no local type-annotations). 2017-12-13 20:48:52 +00:00
Mike Auty 21b4506b7b Add in type-annotations for the remaining interfaces. 2017-12-13 20:48:52 +00:00
Mike Auty e43ca15630 Improve the logging for scan failures. 2017-11-24 00:39:28 +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 671f65ed56 Centralize the ISF locating code.
This might benefit from a recache of the linux banners, although it
should continue to work no recache is performed.

We're now in a position to add support for loading symbols directly from
zip files by altering the ResourceAccessor and adding code to the
symbol finder.
2017-11-05 15:18:20 +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 9346e220ed Add more detailed information for non-threaded scanners. 2017-08-31 01:02:42 +01:00
Mike Auty d32fc223e2 Fix up additional imports inconsistent with the coding style.
Note: also remove interfaces_configuration where ever possible
(this is not possible in the interfaces directory itself
because it would cause an import loop).
2017-08-09 22:32:44 +01:00
Mike Auty f0d7dbdf68 Add in translate method for TranslationLayers. 2017-08-08 17:45:36 +01:00
Mike Auty b8f7433dba Ensure that non-multiprocessing does not use multiprocessing. 2017-07-30 22:40:33 +01:00
Mike Auty c0a8ddd9a3 Improve the progress messages. 2017-07-20 19:35:12 +01:00
Mike Auty 469afc800b Revert "Change the behaviour of multithreaded scans to return results as soon as possible (at the cost of ordering)."
This reverts commit 8c4bdc8c61.
2017-07-20 11:09:42 +01:00
Mike Auty 8c4bdc8c61 Change the behaviour of multithreaded scans to return results as soon as possible (at the cost of ordering). 2017-07-14 01:16:30 +01:00
Mike Auty a4bb297db7 Improve the progress calculator for multithreaded progress. 2017-07-13 01:31:47 +01:00
Mike Auty df527d2f00 Convert from abstractproperty which was deprecated in python-3.3. 2017-06-20 15:14:13 +01:00
Mike Auty 0675350346 Fix up minor logical error in multithreaded scanning global flag. 2017-06-03 17:49:56 +01:00
Mike Auty c862f38917 Add in flag to forcibly disable all multithreaded scanning. 2017-06-03 17:48:32 +01:00
Mike Auty 93a6efd666 Ensure we don't get name confusion when dealing with variables. 2017-06-03 17:44:13 +01:00
Mike Auty c0dfe48c05 Remove configurability of architecture, the translation layer should define the architecture internally. 2017-02-13 22:36:40 +00:00
Mike Auty 0d1dd2d2cd Fix silly typo. 2017-02-13 21:30:23 +00:00
Mike Auty d6728fc2b4 Add in attributes and appropriate validation of TranslationLayers based on those attributes. 2017-02-10 13:57:44 +00:00
Mike Auty d75c1fc808 Update layer interface documentation. 2016-12-30 02:29:22 +00:00
Mike Auty e56e61eac5 Remove the need for ctypes by using a single-letter code instead. 2016-12-27 22:32:06 +00:00
Mike Auty bab71d4358 Refactor the progress_callback so it can be used in automagics.
Refactored the location of the progress_callback so that the UI can
specify it and ensure it is used by the automagics process as well as
the plugins themselves.

The progress_callback function has also had an optional description parameter
added, so that it can differentiated in case two scans happen
simultaneously.
2016-12-26 23:45:47 +00:00
Mike Auty 2680bba785 Fix up lack of logging object in layers interface. 2016-12-26 23:24:14 +00:00
Mike Auty 627bdd74a5 Allow developers to see when an exception has occurred with their scanner. 2016-12-25 17:43:10 +00:00
Mike Auty 34b3f75b99 Fix up the physical layer scanner appropriately. 2016-12-25 17:39:56 +00:00
Mike Auty f03f99e64c Ensure the non-multithreaded scanner works the same way as the multithreaded one. 2016-12-25 17:26:06 +00:00
Mike Auty a4f27e73f4 Refactor the scanners to allow multithreaded searching. 2016-12-25 17:01:05 +00:00
Mike Auty 1c85db0c31 Add in multi-processing on TranslationLayer scan method. 2016-12-25 13:45:08 +00:00
Mike Auty 70314386c8 Fix a rather critical issue with the end condition for a scanned range (and reduce the overlap if it's unnecessarily large). 2016-12-22 15:41:00 +00:00
Mike Auty 591d9eba27 Add in better bounds checking for the scan call. 2016-12-21 02:20:47 +00:00
Mike Auty 56388fc903 Fix up the incorrect scanning boundaries. 2016-12-21 01:45:44 +00:00
Mike Auty 555f587b15 Ensure the progress value for translation layer scanning is correct. 2016-12-08 12:08:42 +00:00
Mike Auty 797e51608e Move the masking code into the data layer. 2016-12-07 09:50:59 +00:00