CoreyD97 / Burp-Montoya-Utilities

A collection of utilities for building extensions using Burp's Montoya API
GNU Affero General Public License v3.0
46 stars 9 forks source link

Feature/name manager collision detection #13

Closed CrazyKidJack closed 8 months ago

CrazyKidJack commented 8 months ago

This PR should only be considered AFTER this other PR (12), because this PR's commit history is based on the other's. If the other PR gets rejected, I will refactor this PR's code to not depend on it.


This change:

This change allows each Persisted* and PreferenceFactory to have their own instance of Preferences without sacrificing the benefit of key collision detection if you were to use a single shared Preferences instance. This in turn allows Persisted*s and PreferenceFactorys to have their own IGsonProviders allowing for flexible and contextually customizable serialization / deserialization with an API that is consistent with GSON's own API.

Example Usage

A sample Burp Extension that uses these features can be found here.

Please note that it also uses some other features for which I have submitted PRs but that may not yet have been pulled into this repo. A working version of a fork of this repo with all features used by the sample extension can be found here (tag 1.1.0-beta.0.2.1).

If you trust them, I have created releases with jars that you can load and run to save you the trouble of building: