diff --git a/modules/post/linux/gather/enum_cron.rb b/modules/post/linux/gather/enum_cron.rb index 5284e2c3cd..600dd19a08 100644 --- a/modules/post/linux/gather/enum_cron.rb +++ b/modules/post/linux/gather/enum_cron.rb @@ -35,7 +35,7 @@ class Metasploit3 < Msf::Post ], 'Version' => '$Revision$', 'Platform' => [ 'linux' ], - 'SessionTypes' => [ "shell" ] + 'SessionTypes' => [ "shell", "meterpreter" ] )) register_options( @@ -56,7 +56,8 @@ class Metasploit3 < Msf::Post cron_data += execute("crontab -u #{user} -l") + "\n\n" end else - user = execute("/usr/bin/whomai") + user = execute("/usr/bin/whoami") + user.strip! if user print_status("Enumerating as #{user}") cron_data = "***** Listing cron jobs for #{user} *****\n\n" cron_data += execute("crontab -l")