Use DNS names

bug/bundler_fix
Meatballs 2014-12-10 22:25:44 +00:00
parent 86ae104580
commit c813c117db
No known key found for this signature in database
GPG Key ID: 5380EAF01F2F8B38
1 changed files with 9 additions and 2 deletions

View File

@ -59,8 +59,9 @@ class Metasploit3 < Msf::Exploit::Local
]), ]),
OptString.new("NAME", [ false, "Service name on each target in RHOSTS (Default: random)" ]), OptString.new("NAME", [ false, "Service name on each target in RHOSTS (Default: random)" ]),
OptString.new("DISPNAME", [ false, "Service display name (Default: random)" ]), OptString.new("DISPNAME", [ false, "Service display name (Default: random)" ]),
OptEnum.new("TECHNIQUE", [ true, "Technique to use", 'SMB', ['PSH', 'SMB'] ]), OptEnum.new("TECHNIQUE", [ true, "Technique to use", 'PSH', ['PSH', 'SMB'] ]),
OptAddressRange.new("RHOSTS", [ false, "Target address range or CIDR identifier" ]), OptAddressRange.new("RHOSTS", [ false, "Target address range or CIDR identifier" ]),
OptBool.new("KERBEROS", [ true, "Authenticate via Kerberos, dont resolve hostnames", false ])
]) ])
end end
@ -102,7 +103,13 @@ class Metasploit3 < Msf::Exploit::Local
end end
begin begin
Rex::Socket::RangeWalker.new(datastore["RHOSTS"]).each do |server| if datastore['KERBEROS']
targets = datastore['RHOSTS'].split(', ').map{ |a| a.split(' ') }.flatten
else
targets = Rex::Socket::RangeWalker.new(datastore["RHOSTS"])
end
targets.each do |server|
begin begin
print_status("#{server.ljust(16)} Creating service #{name}") print_status("#{server.ljust(16)} Creating service #{name}")