diff --git a/modules/post/windows/manage/driver_loader.rb b/modules/post/windows/manage/driver_loader.rb index cb23fb60cb..e01c286a77 100644 --- a/modules/post/windows/manage/driver_loader.rb +++ b/modules/post/windows/manage/driver_loader.rb @@ -66,7 +66,7 @@ class Metasploit3 < Msf::Post return end - unless driver =~ /#{Regexp.escape(expand_path("%SYSTEMROOT%"))}/i + unless driver =~ Regexp.new(Regexp.escape(expand_path("%SYSTEMROOT%")), Regexp::IGNORECASE) print_error("The driver must be inside %SYSTEMROOT%.") return end