diff --git a/lib/rex/post/meterpreter/ui/console/command_dispatcher/priv/timestomp.rb b/lib/rex/post/meterpreter/ui/console/command_dispatcher/priv/timestomp.rb index b5441755b3..4f03027552 100644 --- a/lib/rex/post/meterpreter/ui/console/command_dispatcher/priv/timestomp.rb +++ b/lib/rex/post/meterpreter/ui/console/command_dispatcher/priv/timestomp.rb @@ -52,12 +52,21 @@ class Console::CommandDispatcher::Priv::Timestomp # def cmd_timestomp(*args) if (args.length < 2) - print_line("\nUsage: timestomp file_path OPTIONS\n" + + print_line("\nUsage: timestomp OPTIONS file_path\n" + @@timestomp_opts.usage) return end - file_path = args.shift + file_path = nil + args.each { |a| file_path = a unless a[0] == "-" } + + if file_path.nil? + print_line("\nNo filepath specified.") + return + end + + args.delete(file_path) + modified = nil accessed = nil creation = nil