Skip to content

Commit f843740

Browse files
David MaloneyDavid Maloney
authored andcommitted
more fixes
1 parent 519eb0c commit f843740

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

modules/exploits/windows/winrm/winrm_powershell.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ def check
6363
print_error "Login failed!"
6464
return Msf::Exploit::CheckCode::Safe
6565
end
66+
unless streams.class == Hash
67+
print_error "Recieved error while running check"
68+
return Msf::Exploit::CheckCode::Safe
69+
end
6670
streams = winrm_run_cmd("powershell Get-ExecutionPolicy")
6771
if streams['stdout'].include? 'Unrestricted'
6872
return Msf::Exploit::CheckCode::Vulnerable

0 commit comments

Comments
 (0)