Commit Graph
86 Commits
Author SHA1 Message Date
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
Mike Auty 667014a1fd Attempt to standardize error message display. 2016-10-30 17:51:45 +00:00
Mike Auty 9959697ba5 Move where the rescursion into TranslationLayers happens. 2016-08-24 01:29:11 +01:00
Mike Auty f3bc1d30b3 Refactor the build_configuration in Layers so that even data layers get their requirements populated. 2016-08-24 01:14:34 +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 a1b9be74c7 Refactor several configuration/requirement structures to avoid import loops. 2016-08-22 02:15:54 +01:00
Mike Auty e54505701f Refactor Memory into an interface. 2016-08-21 21:26:21 +01:00
Mike Auty 386e8a34c7 Minor clean-up. 2016-08-21 21:23:29 +01:00
Mike Auty 0fd0fa0d55 Fix up the comment to match the acceptance of returning objects other than just offsets. 2016-08-17 20:05: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 9111f13a8a Get rid of obsolete fulfillment method (now handled by _construct_class in ConstructableRequirementInterface). 2016-08-14 11:44:18 +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 8db3adae05 Update the scanner interface to return all kind of objects.
This one's slightly contencious, in that scanner now don't all return a
uniform value, and therefore nothing can simply run through scanners.

Worst case scenario we make a separate stricter interface that says it
only returns offsets which will then allow things that need it to
dynamically find them, but it's probably too useful to be able to return
arbitrary objects of a type (as long as the objects returned are always
of that type).
2016-07-30 00:38:53 +01:00
Mike Auty 14c0cc262c Significantly rework the configuration system.
So this is where I ripped out the guts of the dependency tree
and made it a little better defined in some ways, and delayed
populating it in others.  The validate function signature has
changed and I'm still up in the air whether to validate with
True/False or throw/catch exceptions.

So now, configurables have a list of requirements, these are
then bundled into a single requirement and can be passed to
automagic.  Automagic runs a set of things over the deptree
to help build/manage it.  These run in order of priority.

The tree is still built from the top down, but now automagic
can build branch from the bottom up and try and splice them
into the tree where appropriate.  Hopefully this will make it
easier to see follow.
2016-07-29 03:24:52 +01:00