fernleafsystems / apiwrappers-wpvulndb
There is no license information available for the latest version (3.0.2) of this package.
3.0.2
2023-03-19 21:42 UTC
Requires
- php: >=7.4
- fernleafsystems/apiwrappers-base: ^2.1
- symfony/polyfill-php80: ^1.0
README
API Wrapper for the WP VulnDB API
Uses the newer v3 API. Register with WP Vuln DB to obtain API Key/Token https://wpvulndb.com/users/sign_up
Example:
use FernleafSystems\ApiWrappers\WpVulnDb\WPScan; $conn = new WPScan\Connection(); $conn->api_key = 'abc123'; // Get this when you register $pluginVuln = ( new WPScan\Plugins\Retrieve() ) ->setConnection( $conn ) ->filterByVersion( '5.1' ) ->filterBySlug( 'wp-simple-firewall' ) ->retrieve();
- When a vulnerability is found they can be enumerated from the array returned from
$oPluginVuln->getVulns()
null
will be returned if there are no vulnerabilities found for the particular slug and version so care must be taken to use the result of the request safely.- It is not necessary to filter by version. If you omit this, then all available vulnerabilities will be returned.