Add ./ to cmd_use for paths and simplify cases

Don't accommodate typos.
bug/bundler_fix
William Vu 2017-08-23 10:24:11 -05:00
parent 4c285c0129
commit 100afaf251
1 changed files with 4 additions and 4 deletions

View File

@ -573,11 +573,11 @@ module Msf
mod_name = args[0]
# Ensure we have a reference name and not a path
if mod_name.start_with?('modules/', '/')
mod_name.sub!(/^(?:modules)?\//, '')
if mod_name.start_with?('./', 'modules/')
mod_name.sub!(/^(?:\.\/)?modules\//, '')
end
if mod_name.end_with?('.', '.r', '.rb')
mod_name.sub!(/\.(?:rb?)?$/, '')
if mod_name.end_with?('.rb')
mod_name.sub!(/\.rb$/, '')
end
begin