Skip to content

Commit a5cb03e

Browse files
committed
Copy Meterpreter return hash
Dont add a key if no value is found
1 parent 6e197ce commit a5cb03e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/msf/core/post/common.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,8 @@ def get_envs(*envs)
176176
when /shell/
177177
result = {}
178178
envs.each do |env|
179-
result[env] = get_env(env)
179+
res = get_env(env)
180+
result[env] = res unless res.blank?
180181
end
181182

182183
return result

0 commit comments

Comments
 (0)