get_vulnerabilities(); $file = ABSPATH . 'wp-content/debug.log'; if ( file_exists( $file ) ) { $url = esc_url( get_site_url() . '/' . str_replace( ABSPATH, '', $file ) ); $response = wp_remote_head( $url, array( 'timeout' => 5 ) ); $code = wp_remote_retrieve_response_code( $response ); if ( 200 === $code ) { $this->add_vulnerability( __( 'A publicly accessible debug.log file was found in', 'wpscan' ) . " $url.", 'high', sanitize_title( $file ), 'https://blog.wpscan.com/2021/03/18/wordpress-debug-log-files.html' ); } } } }