Ejemplo n.º 1
0
 /**
  * Check core.
  */
 protected function check_current_wordpress_version()
 {
     $response = $this->client->wordpresses(get_bloginfo('version'));
     $vulnerabilities = $response->vulnerabilities_by_version();
     if (!empty($vulnerabilities)) {
         $this->vulnerabilities = array_merge($this->vulnerabilities, $vulnerabilities);
     }
 }
Ejemplo n.º 2
0
 /**
  * Check a version of WordPress for vulnerabilities.
  *
  * ## OPTIONS
  *
  * <version>
  * : The version of WordPress to check.
  *
  * @alias check-wp
  * @subcommand check-wordpress
  *
  * @param array $args Positional args.
  */
 public function check_wordpress($args)
 {
     $version = $args[0];
     $client = new Client();
     $response = $client->wordpresses($version);
     $vulnerabilities = $response->vulnerabilities_by_version();
     $formatter = new Text();
     $formatter->display_results($vulnerabilities);
 }