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 519eb0c commit f843740Copy full SHA for f843740
modules/exploits/windows/winrm/winrm_powershell.rb
@@ -63,6 +63,10 @@ def check
63
print_error "Login failed!"
64
return Msf::Exploit::CheckCode::Safe
65
end
66
+ unless streams.class == Hash
67
+ print_error "Recieved error while running check"
68
+ return Msf::Exploit::CheckCode::Safe
69
+ end
70
streams = winrm_run_cmd("powershell Get-ExecutionPolicy")
71
if streams['stdout'].include? 'Unrestricted'
72
return Msf::Exploit::CheckCode::Vulnerable
0 commit comments