diff --git a/modules/auxiliary/parser/unattend.rb b/modules/auxiliary/parser/unattend.rb index 72e07221f5..47e0b4018d 100644 --- a/modules/auxiliary/parser/unattend.rb +++ b/modules/auxiliary/parser/unattend.rb @@ -30,7 +30,7 @@ class Metasploit3 < Msf::Auxiliary )) register_options([ - OptPath.new('PATH', [true, 'Directory to parse.']), + OptPath.new('PATH', [true, 'Directory or file to parse.']), OptBool.new('RECURSIVE', [true, 'Recursively check for files', false]), ]) end @@ -42,7 +42,12 @@ class Metasploit3 < Msf::Auxiliary ext = "/*.xml" end - filepath = File.join(datastore['PATH'], ext) + if datastore['PATH'].ends_with('.xml') + filepath = datastore['PATH'] + else + filepath = File.join(datastore['PATH'], ext) + end + Dir.glob(filepath) do |item| print_status "Processing #{item}" file = File.read(item)