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 9f299f4 commit 2a9f813Copy full SHA for 2a9f813
lib/rex/post/meterpreter/ui/console/command_dispatcher/powershell.rb
@@ -105,10 +105,12 @@ def cmd_powershell_import(*args)
105
}
106
107
result = client.powershell.import_file(opts)
108
- if !result.blank? && result != false
109
- print_good("File successfully imported. Result:\n#{result}")
110
- else
+ if result.nil? || result == false
111
print_error("File failed to load.")
+ elsif result.empty?
+ print_good("File successfully imported. No result was returned.")
112
+ else
113
+ print_good("File successfully imported. Result:\n#{result}")
114
end
115
116
0 commit comments