diff --git a/lib/msf/core/exploit/mysql.rb b/lib/msf/core/exploit/mysql.rb index 23a26ad7c5..52647dda7d 100644 --- a/lib/msf/core/exploit/mysql.rb +++ b/lib/msf/core/exploit/mysql.rb @@ -162,8 +162,9 @@ module Exploit::Remote::MYSQL end def mysql_drop_and_create_sys_exec(soname) - res = mysql_query("DROP FUNCTION IF EXISTS sys_exec") # Already checked, actually - return false if res.nil? + # Just drop it. MySQL will always say "OK" anyway. + # See #5244 + mysql_query("DROP FUNCTION IF EXISTS sys_exec") res = mysql_query("CREATE FUNCTION sys_exec RETURNS int SONAME '#{soname}'") return false if res.nil?