Skip to content

Commit ac1fb2d

Browse files
author
Tod Beardsley
committed
Just use a straight RPORT, don't sneak 593.
Incidentally, the endmap scanner doesn't appear to work at all for http-rpc-epmap, so no harm done anyway (tested against Windows 2008 server). It looks like a bigger change than it realy is, thanks to the indentaton changes by removing the itertor. Diff this without whitespace changes to get a better idea of what's actually different.
1 parent 4d76e8e commit ac1fb2d

File tree

1 file changed

+9
-15
lines changed

1 file changed

+9
-15
lines changed

lib/msf/core/exploit/dcerpc_epm.rb

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -43,26 +43,20 @@ def dcerpc_endpoint_list
4343
print_status("Connecting to the endpoint mapper service...")
4444
begin
4545
eps = nil
46-
dport = nil
46+
dport = datastore['RPORT'] || 135
4747

48-
[datastore['RPORT'], 135, 593,].uniq.each do |i|
49-
dport = i
50-
begin
51-
eps = Rex::Socket::Tcp.create(
48+
begin
49+
eps = Rex::Socket::Tcp.create(
5250
'PeerHost' => rhost,
5351
'PeerPort' => dport,
5452
'Proxies' => proxies,
5553
'Context' =>
56-
{
57-
'Msf' => framework,
58-
'MsfExploit' => self,
59-
}
60-
)
61-
62-
break
63-
64-
rescue ::Exception
65-
end
54+
{
55+
'Msf' => framework,
56+
'MsfExploit' => self,
57+
}
58+
)
59+
rescue ::Exception
6660
end
6761

6862
if (not eps)

0 commit comments

Comments
 (0)