From dc125d1dc5473eb7309a549496e971c6691e5611 Mon Sep 17 00:00:00 2001 From: Brendan Coles Date: Sat, 1 Dec 2018 05:20:47 +0000 Subject: [PATCH] return hostname --- lib/msf/core/post/linux/system.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/msf/core/post/linux/system.rb b/lib/msf/core/post/linux/system.rb index f1f03afef6..9f672d6a69 100644 --- a/lib/msf/core/post/linux/system.rb +++ b/lib/msf/core/post/linux/system.rb @@ -167,7 +167,7 @@ module System def get_hostname hostname = cmd_exec('uname -n').to_s report_host({:host => rhost, :name => hostname}) - + hostname rescue raise 'Unable to retrieve hostname' end