Fix single user/pass usage
git-svn-id: file:///home/svn/framework3/trunk@8576 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
865969e059
commit
a2383611c2
|
@ -56,15 +56,15 @@ class Metasploit3 < Msf::Auxiliary
|
|||
print_status("Starting host #{ip}")
|
||||
if (datastore["SMBUser"] and not datastore["SMBUser"].empty?)
|
||||
# then just do this user/pass
|
||||
try_user_pass(datastore["SMBUser"], datastore["SMBPass"])
|
||||
try_user_pass(datastore["SMBUser"], datastore["SMBPass"], [datastore["SMBUser"],ip,rport].join(":"))
|
||||
else
|
||||
begin
|
||||
each_user_pass { |user, pass|
|
||||
each_user_pass do |user, pass|
|
||||
this_cred = [user,ip,rport].join(":")
|
||||
next if self.credentials_tried[this_cred] == pass || self.credentials_good[this_cred]
|
||||
self.credentials_tried[this_cred] = pass
|
||||
try_user_pass(user, pass, this_cred)
|
||||
}
|
||||
end
|
||||
rescue ::Rex::ConnectionError
|
||||
nil
|
||||
end
|
||||
|
@ -74,7 +74,6 @@ class Metasploit3 < Msf::Auxiliary
|
|||
def try_user_pass(user, pass, this_cred)
|
||||
datastore["SMBUser"] = user
|
||||
datastore["SMBPass"] = pass
|
||||
#$stdout.puts("#{user} : #{pass}")
|
||||
|
||||
# Connection problems are dealt with at a higher level
|
||||
connect()
|
||||
|
|
Loading…
Reference in New Issue