updated plugin WPScan
version 1.15.4
This commit is contained in:
@ -14,10 +14,11 @@ defined( 'ABSPATH' ) || exit;
|
||||
*/
|
||||
class Plugin {
|
||||
// Settings.
|
||||
public $OPT_API_TOKEN = 'wpscan_api_token';
|
||||
public $OPT_API_TOKEN = 'wpscan_api_token';
|
||||
public $OPT_SCANNING_INTERVAL = 'wpscan_scanning_interval';
|
||||
public $OPT_SCANNING_TIME = 'wpscan_scanning_time';
|
||||
public $OPT_IGNORE_ITEMS = 'wpscan_ignore_items';
|
||||
public $OPT_SCANNING_TIME = 'wpscan_scanning_time';
|
||||
public $OPT_IGNORE_ITEMS = 'wpscan_ignore_items';
|
||||
public $OPT_DISABLE_CHECKS = 'wpscan_disable_security_checks';
|
||||
|
||||
// Account.
|
||||
public $OPT_ACCOUNT_STATUS = 'wpscan_account_status';
|
||||
@ -52,9 +53,6 @@ class Plugin {
|
||||
// Plugin path.
|
||||
public $plugin_dir = '';
|
||||
|
||||
// Plugin URI.
|
||||
public $plugin_url = '';
|
||||
|
||||
// Page.
|
||||
public $page_hook = 'toplevel_page_wpscan';
|
||||
|
||||
@ -73,7 +71,6 @@ class Plugin {
|
||||
*/
|
||||
public function __construct() {
|
||||
$this->plugin_dir = trailingslashit( str_replace( '\\', '/', dirname( WPSCAN_PLUGIN_FILE ) ) );
|
||||
$this->plugin_url = site_url( str_replace( str_replace( '\\', '/', ABSPATH ), '', $this->plugin_dir ) );
|
||||
|
||||
// Languages.
|
||||
load_plugin_textdomain( 'wpscan', false, $this->plugin_dir . 'languages' );
|
||||
@ -387,7 +384,7 @@ class Plugin {
|
||||
$this->WPSCAN_ROLE,
|
||||
'wpscan',
|
||||
array( $this->classes['report'], 'page' ),
|
||||
$this->plugin_url . 'assets/svg/menu-icon.svg',
|
||||
plugin_dir_url( dirname( __FILE__ ) ) . 'assets/svg/menu-icon.svg',
|
||||
null
|
||||
);
|
||||
}
|
||||
@ -554,18 +551,20 @@ class Plugin {
|
||||
}
|
||||
|
||||
// Security checks.
|
||||
$this->report['security-checks'] = array();
|
||||
if ( get_option( $this->OPT_DISABLE_CHECKS, array() ) !== '1' ) {
|
||||
$this->report['security-checks'] = array();
|
||||
|
||||
foreach ( $this->classes['checks/system']->checks as $id => $data ) {
|
||||
$data['instance']->perform();
|
||||
$this->report['security-checks'][ $id ]['vulnerabilities'] = array();
|
||||
foreach ( $this->classes['checks/system']->checks as $id => $data ) {
|
||||
$data['instance']->perform();
|
||||
$this->report['security-checks'][ $id ]['vulnerabilities'] = array();
|
||||
|
||||
if ( $data['instance']->vulnerabilities ) {
|
||||
$this->report['security-checks'][ $id ]['vulnerabilities'] = $data['instance']->get_vulnerabilities();
|
||||
if ( $data['instance']->vulnerabilities ) {
|
||||
$this->report['security-checks'][ $id ]['vulnerabilities'] = $data['instance']->get_vulnerabilities();
|
||||
|
||||
$this->maybe_fire_issue_found_action( 'security-check', $id, $this->report['security-checks'][ $id ] );
|
||||
$this->maybe_fire_issue_found_action( 'security-check', $id, $this->report['security-checks'][ $id ] );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Caching.
|
||||
$this->report['cache'] = strtotime( current_time( 'mysql' ) );
|
||||
|
Reference in New Issue
Block a user