diff --git a/modules/exploits/unix/webapp/wp_wpdiscuz_unauthenticated_file_upload.rb b/modules/exploits/unix/webapp/wp_wpdiscuz_unauthenticated_file_upload.rb index 8ab6f1fe4f..3a16bb2eec 100644 --- a/modules/exploits/unix/webapp/wp_wpdiscuz_unauthenticated_file_upload.rb +++ b/modules/exploits/unix/webapp/wp_wpdiscuz_unauthenticated_file_upload.rb @@ -69,7 +69,7 @@ class MetasploitModule < Msf::Exploit::Remote def find_wmusecurity_id res = send_request_cgi({ 'uri' => normalize_uri(target_uri.path, blogpath) }) - wmusecurity_id = res.body.match(/wmuSecurity":"(\w+)/)&.captures + wmusecurity_id = res&.body.match(/wmuSecurity":"(\w+)/)&.captures unless wmusecurity_id fail_with(Failure::NotFound, 'Failed to retrieve the wmusecurity id') end