drozer
drozer copied to clipboard
Unbreak `PackageManagerProxy.installedPackages()`
At some point, installedPackages()
got modified from
https://github.com/WithSecureLabs/drozer/blob/8a7a2853fb01d3500794e982a5b4963e9428e995/src/drozer/modules/common/package_manager.py#L106-L111
to
https://github.com/WithSecureLabs/drozer/blob/a9018a2f15000bec1d598174a4076125652fe21e/src/drozer/modules/common/package_manager.py#L105-L110
This means that every time we call getPackages()
with flags other than GET_META_DATA
, those flags get ignored. This is very bad, because a fair few modules request these flags. This immediately breaks at least 2 modules:
-
app.provider.info
(when run without specifying a single package - either on all packages or with a filter) -
auxiliary.webcontentresolver
(when trying to generate a list of providers)
It is highly likely that it also broke other modules, and that workarounds may have been implemented to work around it.
What needs to happen:
- Undo that change so we start using flags again
- All modules using
getPackages()
need to get tested for regression- Chances are that the ones which specified flags will still be fine (or happier than they were before), but we should review them
- There are only 3 places that don't specify flags
- Probably worth diffing these against drozer 2 to pick up any unnecessary workarounds