Commit Graph
463 Commits
Author SHA1 Message Date
Mike Auty 64c139095f Renderers: Add in very rudimentary renderer options
This allows the CLI to expose options that the renderers can offer.
These options are limited (string, int, bool and bytes), so no lists
or choices, etc.

Each renderer's options are also global options, meaning they're always
present (although grouped).  There's two ways of handling this:

a) Prefix each option with the renderer's name, duplicate options are
unique
b) Deduplicate options with duplicate names and prefix 'renderer'

The current choice is a) because b) might confuse people that an option
which only applied to one renderer would be available for all, but
comes with the inconvenience that users must adapt the option name for
those that are duplicated with the same meaning.

This is at least functional and extendable in the future but still a bit
clunky.  We could have brought the entire configuration mechanism into
play, but each renderer would require a context and a config_path and
so on, meaning massive overkill and a non-addition-only API change.
2020-11-01 22:51:39 +00:00
Mike Auty ea629591ef Plugins: Make open method clearer to use
This highlights that the FileHandler class can also be seen as a method
similar to open, and it removes unnecessary context managers, allowing
plugins to close files as they wish (they must, however, remember to
close the file for it to be committed).
2020-10-29 09:43:16 +00:00
Mike Auty b703210024 Windows: Refactor names of FileInterfaces 2020-10-29 09:43:16 +00:00
Mike Auty 032c6b0ac7 Windows: Make more use of plugin.open 2020-10-29 09:43:16 +00:00
Mike Auty 7cadbf32d4 Windows: Update dumping code from commit to close 2020-10-29 09:43:16 +00:00
Mike Auty e8fb8c929c Plugins: Introduce FileHandlerInterface 2020-10-29 09:43:16 +00:00
Mike Auty 7e63ed4815 Plugins: Allow None types in the configuration tree as values 2020-10-03 22:02:40 +01:00
Mike Auty 4a8ce9f104 Plugins: Relent on not allow default to be Optional 2020-09-02 11:27:53 +01:00
Mike Auty 96b68b9cdc Plugins: Don't ever insert an invalid value 2020-09-02 11:13:39 +01:00
Mike Auty 613ae30893 Automagic: Heavily refactor pdbscan
This separates out a new PDBUtility class that can take a (contiguous) layer and MZ
offset, and produce identify, download if necessary and load the
appropriate symbol table (if any).
2020-09-01 09:02:13 +01:00
Mike Auty 6caebee079 Plugins: Populate optional defaults in plugin initialization
Fixes issue #324.
2020-08-31 23:10:22 +01:00
Mike Auty 7afc4bfec7 Core: Fix verison typos 2020-08-26 22:04:50 +01:00
Mike Auty 0cbca4c957 Core: Half the memory usage by not storing arguments 2020-08-23 23:34:18 +01:00
Mike Auty 8e420cbe62 Core: Multiple typing fixes across the tree 2020-08-16 22:22:24 +01:00
Mike Auty 03877ef2ec Core: Maintain 3.5.3 compatibility 2020-07-30 22:27:26 +01:00
Mike Auty a5ecae29cc Configuration: Improve the VersionableInterface documentation 2020-07-29 20:18:03 +01:00
Mike Auty 3eb463475b Core: Refactor versioning and associated requirements 2020-07-29 20:18:03 +01:00
Mike Auty 16c2ddb837 Automagic: Change stackers to including an exclusion list 2020-07-02 19:33:32 +01:00
Mike Auty 232fcbe499 Objects: Go back to the *much* quicker exception handling 2020-07-01 20:24:30 +01:00
Mike Auty 51c0b873cc Objects: Reduce duplicated code (thanks @atcuno) 2020-07-01 20:24:30 +01:00
Mike Auty f1613a78b3 Objects: Use contextlib instead of finally 2020-07-01 20:24:30 +01:00
Mike Auty 6f1001f290 Objects: Add in the ability to test for member validity 2020-07-01 20:24:30 +01:00
Mike Auty d28e573c18 Renderers: Fix python deprecation warnings 2020-06-27 18:34:43 +01:00
Hanno Heinrichsandikelos deb2b78312 Clear symbol cache after ASLR computation on Linux. 2020-06-23 16:45:22 +01:00
Mike Auty 80e2117c94 Layers: QEMU add in slow warning 2020-06-10 20:22:35 +01:00
Mike Auty ede5ba07aa Symbols: Apply symbol_masking option to IntermediateSymbolTables 2020-06-10 19:39:20 +01:00
Mike Auty d6741435ef SymbolTables: Clear out the clone method and tidy up inheritance 2020-06-10 19:39:20 +01:00
Mike Auty 573590878a SymbolTable: Rework symbol_shift so it's part of the config 2020-06-10 19:39:20 +01:00
Mike Auty d9ac5300fa Move from using deepcopy to a clone method. 2020-06-10 19:39:20 +01:00
Mike Auty c7ea30b059 Core: Add in framework version check for plugins 2020-06-02 00:08:01 +01:00
Mike Auty 6e91349c73 Documentation: Add in information about creating layers. 2020-05-09 02:07:08 +01:00
Mike Auty 0c43beb42d Core: Apply yapf across all files again. 2020-05-05 22:14:33 +01:00
Mike Auty a745503b72 Layers: Make the linear/non-linear changes minimal 2020-03-04 20:29:42 +00:00
Mike Auty df804928b5 Layers: Alter the decode method to take data directly 2020-03-04 20:29:42 +00:00
Mike Auty e089314898 Layers: Add pad option to the decode/encode steps 2020-03-04 20:29:42 +00:00
Mike Auty ca9d7075d3 Layers: Refactor the decode/encode methods 2020-03-04 20:29:42 +00:00
Mike Auty 77be83edc4 Layers: Change mapping signature to return domain length 2020-03-04 20:29:42 +00:00
Mike Auty 3977a3c356 objects: Fixes for the comments in #159 2020-01-10 12:47:06 +00:00
Mike Auty fba6511486 Objects: Add size to ObjectInfo so it can be statically access later 2020-01-10 12:47:06 +00:00
Mike Auty 83a8afba6b Objects: Simplify get_symbol_table to get_symbol_table_name. 2019-12-04 23:41:27 +00:00
Mike Auty b0b868d79c Typing: General typing fixes across the tree 2019-11-27 11:30:14 +00:00
Mike Auty d29cd776ec Layers: Fixing multiprocessing typing issue. 2019-11-27 11:30:14 +00:00
Mike Auty 0e016797bb Typing: Change signatures to co-variant Mapping from Dict 2019-11-27 11:30:14 +00:00
Mike Auty 31ddbaaa2e Typing: Fix python3 format string/byte output issues 2019-11-27 11:30:14 +00:00
Mike Auty 19d46563ae layers: Fix up the maths around scanning chunks 2019-11-13 21:44:13 +00:00
Mike Auty ca8099e7d7 layers: Improve scanning of layered chunks
Previously, for segmented layers, no chunk larger than a full segment
was scanned.  Now, we combine contiguous segments up to
scanner.chunk_size (or until a non-present segment) in order to scan it.

This may be slightly slower (by concatting the data together) but gives
results of hits across page boundaries (the point of the scanning
capability), whereas previously each page was scanned individually.
2019-11-13 21:44:13 +00:00
Mike Auty b99ace86fb Tidy up exceptions to be more accurate. 2019-11-13 19:58:14 +00:00
Mike Auty 40fcdf9469 exceptions: SymbolErrors now contain specific information 2019-11-13 19:27:00 +00:00
Mike Auty 9b0a910d7e Update typing and documentation on renderers. 2019-10-07 10:35:17 +01:00
Mike Auty 9a17beb77f Ensure consistency of importing interfaces. 2019-10-02 01:18:46 +01:00