Skip to content

Commit 463725e

Browse files
committed
Merge branch 'bug/winrm_poke' of github.com:dmaloney-r7/metasploit-framework into dmaloney-r7-bug/winrm_poke
2 parents 29ad993 + a87e414 commit 463725e

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

lib/msf/core/exploit/winrm.rb

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -35,21 +35,8 @@ def initialize(info = {})
3535
end
3636

3737
def winrm_poke(timeout = 20)
38-
opts = {
39-
'uri' => datastore['URI'],
40-
'data' => Rex::Text.rand_text_alpha(8)
41-
}
42-
c = connect(opts)
43-
to = opts[:timeout] || timeout
44-
ctype = "application/soap+xml;charset=UTF-8"
45-
resp = send_winrm_request(opts.merge({
46-
'uri' => opts['uri'],
47-
'method' => 'POST',
48-
'ctype' => ctype,
49-
'data' => opts['data']
50-
}), to)
51-
return resp
52-
end
38+
send_winrm_request(Rex::Text.rand_text_alpha(8), timeout)
39+
end
5340

5441
def parse_auth_methods(resp)
5542
return [] unless resp and resp.code == 401

0 commit comments

Comments
 (0)