We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f9a804d commit 83a6e82Copy full SHA for 83a6e82
lib/msf/core/post/linux/user.rb
@@ -8,7 +8,7 @@ module User
8
# Returns a string of the user's home directory
9
#
10
def get_home_dir(user)
11
- cmd_exec("/bin/cat /etc/passwd | grep '^#{user}:' | cut -d ':' -f 6").chomp
+ cmd_exec("grep '^#{user}:' /etc/passwd | cut -d ':' -f 6").chomp
12
# could also be: "getent passwd #{user} | cut -d: -f6"
13
end
14
# User
0 commit comments