From 84ec2cbf11e6434d1b66bb2dc8e654a8d5fea508 Mon Sep 17 00:00:00 2001 From: FireFart Date: Wed, 25 Sep 2013 23:42:44 +0200 Subject: [PATCH] remove peer methods since it is already defined in Msf::Exploit::Remote::HttpClient --- .../auxiliary/dos/http/novell_file_reporter_heap_bof.rb | 4 ---- modules/auxiliary/gather/coldfusion_pwd_props.rb | 4 ---- modules/auxiliary/gather/eaton_nsm_creds.rb | 4 ---- modules/auxiliary/gather/hp_snac_domain_creds.rb | 4 ---- modules/auxiliary/scanner/http/concrete5_member_list.rb | 4 ---- modules/auxiliary/scanner/http/hp_sys_mgmt_login.rb | 5 ----- modules/auxiliary/scanner/http/joomla_pages.rb | 4 ---- modules/auxiliary/scanner/http/joomla_plugins.rb | 4 ---- modules/auxiliary/scanner/http/joomla_version.rb | 4 ---- .../auxiliary/scanner/http/mediawiki_svg_fileaccess.rb | 8 -------- .../scanner/http/novell_file_reporter_fsfui_fileaccess.rb | 8 -------- .../scanner/http/novell_file_reporter_srs_fileaccess.rb | 8 -------- modules/auxiliary/scanner/http/ntlm_info_enumeration.rb | 4 ---- .../auxiliary/scanner/http/symantec_brightmail_logfile.rb | 6 ------ modules/exploits/multi/http/hp_sys_mgmt_exec.rb | 6 ------ modules/exploits/multi/http/mutiny_subnetmask_exec.rb | 4 ---- modules/exploits/unix/webapp/arkeia_upload_exec.rb | 4 ---- modules/exploits/unix/webapp/havalite_upload_exec.rb | 6 ------ modules/exploits/unix/webapp/joomla_media_upload_exec.rb | 4 ---- modules/exploits/unix/webapp/libretto_upload_exec.rb | 6 ------ modules/exploits/unix/webapp/narcissus_backend_exec.rb | 4 ---- .../exploits/unix/webapp/openemr_sqli_privesc_upload.rb | 4 ---- modules/exploits/unix/webapp/zeroshell_exec.rb | 4 ---- modules/exploits/unix/webapp/zpanel_username_exec.rb | 6 ------ modules/exploits/windows/http/hp_mpa_job_acct.rb | 4 ---- .../windows/http/hp_pcm_snac_update_certificates.rb | 4 ---- .../exploits/windows/http/hp_pcm_snac_update_domain.rb | 4 ---- modules/exploits/windows/http/miniweb_upload_wbem.rb | 4 ---- modules/exploits/windows/http/novell_mdm_lfi.rb | 4 ---- modules/exploits/windows/http/oracle_endeca_exec.rb | 4 ---- .../exploits/windows/novell/file_reporter_fsfui_upload.rb | 4 ---- 31 files changed, 147 deletions(-) diff --git a/modules/auxiliary/dos/http/novell_file_reporter_heap_bof.rb b/modules/auxiliary/dos/http/novell_file_reporter_heap_bof.rb index c644b3efd4..7cd8a3e1af 100644 --- a/modules/auxiliary/dos/http/novell_file_reporter_heap_bof.rb +++ b/modules/auxiliary/dos/http/novell_file_reporter_heap_bof.rb @@ -42,10 +42,6 @@ class Metasploit3 < Msf::Auxiliary datastore['RPORT'] end - def peer - "#{rhost}:#{rport}" - end - def run record = "" record << "SRS47" # Operation diff --git a/modules/auxiliary/gather/coldfusion_pwd_props.rb b/modules/auxiliary/gather/coldfusion_pwd_props.rb index 805b3a90ee..759339d7be 100644 --- a/modules/auxiliary/gather/coldfusion_pwd_props.rb +++ b/modules/auxiliary/gather/coldfusion_pwd_props.rb @@ -50,10 +50,6 @@ class Metasploit3 < Msf::Auxiliary ], self.class) end - def peer - "#{datastore['RHOST']}:#{datastore['RPORT']}" - end - def fingerprint(response) if(response.headers.has_key?('Server') ) diff --git a/modules/auxiliary/gather/eaton_nsm_creds.rb b/modules/auxiliary/gather/eaton_nsm_creds.rb index cfc720ed67..5ff39e7e1f 100644 --- a/modules/auxiliary/gather/eaton_nsm_creds.rb +++ b/modules/auxiliary/gather/eaton_nsm_creds.rb @@ -41,10 +41,6 @@ class Metasploit3 < Msf::Auxiliary ], self.class) end - def peer - "#{rhost}:#{rport}" - end - def execute_php_code(code, opts = {}) param_name = Rex::Text.rand_text_alpha(6) padding = Rex::Text.rand_text_alpha(6) diff --git a/modules/auxiliary/gather/hp_snac_domain_creds.rb b/modules/auxiliary/gather/hp_snac_domain_creds.rb index 7b885b7da6..38bca130cf 100644 --- a/modules/auxiliary/gather/hp_snac_domain_creds.rb +++ b/modules/auxiliary/gather/hp_snac_domain_creds.rb @@ -47,10 +47,6 @@ class Metasploit3 < Msf::Auxiliary ], self.class) end - def peer - "#{rhost}:#{rport}" - end - def get_domain_info(session) res = send_request_cgi({ 'uri' => "/RegWeb/RegWeb/GetDomainControllerServlet", diff --git a/modules/auxiliary/scanner/http/concrete5_member_list.rb b/modules/auxiliary/scanner/http/concrete5_member_list.rb index 8395d7855c..aa209ca6bb 100644 --- a/modules/auxiliary/scanner/http/concrete5_member_list.rb +++ b/modules/auxiliary/scanner/http/concrete5_member_list.rb @@ -39,10 +39,6 @@ class Metasploit4 < Msf::Auxiliary deregister_options('RHOST') end - def peer - "#{rhost}:#{rport}" - end - def run_host(rhost) url = normalize_uri(datastore['URI'], '/index.php/members') diff --git a/modules/auxiliary/scanner/http/hp_sys_mgmt_login.rb b/modules/auxiliary/scanner/http/hp_sys_mgmt_login.rb index 7cf364efb2..59b845a21e 100644 --- a/modules/auxiliary/scanner/http/hp_sys_mgmt_login.rb +++ b/modules/auxiliary/scanner/http/hp_sys_mgmt_login.rb @@ -37,11 +37,6 @@ class Metasploit3 < Msf::Auxiliary ], self.class) end - - def peer - "#{rhost}:#{rport}" - end - def anonymous_access? res = send_request_raw({'uri' => '/'}) return true if res and res.body =~ /username = "hpsmh_anonymous"/ diff --git a/modules/auxiliary/scanner/http/joomla_pages.rb b/modules/auxiliary/scanner/http/joomla_pages.rb index 9bbedcb9c5..3f35411782 100644 --- a/modules/auxiliary/scanner/http/joomla_pages.rb +++ b/modules/auxiliary/scanner/http/joomla_pages.rb @@ -29,10 +29,6 @@ class Metasploit3 < Msf::Auxiliary ], self.class) end - def peer - return "#{rhost}:#{rport}" - end - def run_host(ip) tpath = normalize_uri(target_uri.path) if tpath[-1,1] != '/' diff --git a/modules/auxiliary/scanner/http/joomla_plugins.rb b/modules/auxiliary/scanner/http/joomla_plugins.rb index 4badac907b..e17ba73800 100644 --- a/modules/auxiliary/scanner/http/joomla_plugins.rb +++ b/modules/auxiliary/scanner/http/joomla_plugins.rb @@ -31,10 +31,6 @@ class Metasploit3 < Msf::Auxiliary ], self.class) end - def peer - return "#{rhost}:#{rport}" - end - def run_host(ip) tpath = normalize_uri(target_uri.path) if tpath[-1,1] != '/' diff --git a/modules/auxiliary/scanner/http/joomla_version.rb b/modules/auxiliary/scanner/http/joomla_version.rb index d00ed2b3be..39c9568e54 100644 --- a/modules/auxiliary/scanner/http/joomla_version.rb +++ b/modules/auxiliary/scanner/http/joomla_version.rb @@ -30,10 +30,6 @@ class Metasploit3 < Msf::Auxiliary ], self.class) end - def peer - return "#{rhost}:#{rport}" - end - def os_fingerprint(response) if not response.headers.has_key?('Server') return "Unkown OS (No Server Header)" diff --git a/modules/auxiliary/scanner/http/mediawiki_svg_fileaccess.rb b/modules/auxiliary/scanner/http/mediawiki_svg_fileaccess.rb index 5d08288810..a31cb0e93b 100644 --- a/modules/auxiliary/scanner/http/mediawiki_svg_fileaccess.rb +++ b/modules/auxiliary/scanner/http/mediawiki_svg_fileaccess.rb @@ -56,14 +56,6 @@ class Metasploit4 < Msf::Auxiliary deregister_options('RHOST') end - def rport - datastore['RPORT'] - end - - def peer(rhost) - "#{rhost}:#{rport}" - end - def get_first_session res = send_request_cgi({ 'uri' => normalize_uri(target_uri.to_s, "index.php"), diff --git a/modules/auxiliary/scanner/http/novell_file_reporter_fsfui_fileaccess.rb b/modules/auxiliary/scanner/http/novell_file_reporter_fsfui_fileaccess.rb index a78f0077f9..09c45e8610 100644 --- a/modules/auxiliary/scanner/http/novell_file_reporter_fsfui_fileaccess.rb +++ b/modules/auxiliary/scanner/http/novell_file_reporter_fsfui_fileaccess.rb @@ -46,14 +46,6 @@ class Metasploit4 < Msf::Auxiliary end - def rport - datastore['RPORT'] - end - - def peer - "#{rhost}:#{rport}" - end - def run_host(ip) traversal = "..\\" * datastore['DEPTH'] diff --git a/modules/auxiliary/scanner/http/novell_file_reporter_srs_fileaccess.rb b/modules/auxiliary/scanner/http/novell_file_reporter_srs_fileaccess.rb index 6e81d3614d..7848dee914 100644 --- a/modules/auxiliary/scanner/http/novell_file_reporter_srs_fileaccess.rb +++ b/modules/auxiliary/scanner/http/novell_file_reporter_srs_fileaccess.rb @@ -47,14 +47,6 @@ class Metasploit4 < Msf::Auxiliary deregister_options('RHOST') end - def rport - datastore['RPORT'] - end - - def peer - "#{rhost}:#{rport}" - end - def run_host(ip) record = "SRS4103#{datastore['RFILE']}" diff --git a/modules/auxiliary/scanner/http/ntlm_info_enumeration.rb b/modules/auxiliary/scanner/http/ntlm_info_enumeration.rb index 4561e0835f..23e6761974 100644 --- a/modules/auxiliary/scanner/http/ntlm_info_enumeration.rb +++ b/modules/auxiliary/scanner/http/ntlm_info_enumeration.rb @@ -32,10 +32,6 @@ class Metasploit3 < Msf::Auxiliary ], self.class) end - def peer - return "#{rhost}:#{rport}" - end - def run_host(ip) File.open(datastore['TARGETURIS'], 'rb').each_line do |line| test_uri = line.chomp diff --git a/modules/auxiliary/scanner/http/symantec_brightmail_logfile.rb b/modules/auxiliary/scanner/http/symantec_brightmail_logfile.rb index 1556008cf8..23566ad87a 100644 --- a/modules/auxiliary/scanner/http/symantec_brightmail_logfile.rb +++ b/modules/auxiliary/scanner/http/symantec_brightmail_logfile.rb @@ -51,12 +51,6 @@ class Metasploit3 < Msf::Auxiliary deregister_options('RHOST') end - - def peer - "#{rhost}:#{rport}" - end - - def auth(username, password, sid, last_login) res = send_request_cgi({ 'method' => 'POST', diff --git a/modules/exploits/multi/http/hp_sys_mgmt_exec.rb b/modules/exploits/multi/http/hp_sys_mgmt_exec.rb index cf601dbc20..503a510e31 100755 --- a/modules/exploits/multi/http/hp_sys_mgmt_exec.rb +++ b/modules/exploits/multi/http/hp_sys_mgmt_exec.rb @@ -70,12 +70,6 @@ class Metasploit3 < Msf::Exploit::Remote ], self.class) end - - def peer - "#{rhost}:#{rport}" - end - - def check @cookie = '' diff --git a/modules/exploits/multi/http/mutiny_subnetmask_exec.rb b/modules/exploits/multi/http/mutiny_subnetmask_exec.rb index 7b21059133..e20321aeb9 100644 --- a/modules/exploits/multi/http/mutiny_subnetmask_exec.rb +++ b/modules/exploits/multi/http/mutiny_subnetmask_exec.rb @@ -79,10 +79,6 @@ class Metasploit3 < Msf::Exploit::Remote ], self.class) end - def peer - "#{rhost}:#{rport}" - end - def lookup_lhost() # Get the source address if datastore['SRVHOST'] == '0.0.0.0' diff --git a/modules/exploits/unix/webapp/arkeia_upload_exec.rb b/modules/exploits/unix/webapp/arkeia_upload_exec.rb index 1a3e0771a0..5b212d8bad 100644 --- a/modules/exploits/unix/webapp/arkeia_upload_exec.rb +++ b/modules/exploits/unix/webapp/arkeia_upload_exec.rb @@ -56,10 +56,6 @@ class Metasploit3 < Msf::Exploit::Remote return target_uri.path end - def peer - return "#{rhost}:#{rport}" - end - def check # Check version print_status("#{peer} - Trying to detect installed version") diff --git a/modules/exploits/unix/webapp/havalite_upload_exec.rb b/modules/exploits/unix/webapp/havalite_upload_exec.rb index 0dd186995c..17f5056174 100644 --- a/modules/exploits/unix/webapp/havalite_upload_exec.rb +++ b/modules/exploits/unix/webapp/havalite_upload_exec.rb @@ -53,12 +53,6 @@ class Metasploit3 < Msf::Exploit::Remote ], self.class) end - - def peer - "#{rhost}:#{rport}" - end - - # # Checks if target is running HavaLite CMS 1.1.7 # We only flag 1.1.7 as vulnerable, because we don't have enough information from diff --git a/modules/exploits/unix/webapp/joomla_media_upload_exec.rb b/modules/exploits/unix/webapp/joomla_media_upload_exec.rb index ef9d524fb2..e0bb46ca5a 100644 --- a/modules/exploits/unix/webapp/joomla_media_upload_exec.rb +++ b/modules/exploits/unix/webapp/joomla_media_upload_exec.rb @@ -65,10 +65,6 @@ class Metasploit3 < Msf::Exploit::Remote end - def peer - return "#{rhost}:#{rport}" - end - def check res = get_upload_form diff --git a/modules/exploits/unix/webapp/libretto_upload_exec.rb b/modules/exploits/unix/webapp/libretto_upload_exec.rb index 3ca5daf2a8..9c7f083ae5 100644 --- a/modules/exploits/unix/webapp/libretto_upload_exec.rb +++ b/modules/exploits/unix/webapp/libretto_upload_exec.rb @@ -53,12 +53,6 @@ class Metasploit3 < Msf::Exploit::Remote ], self.class) end - - def peer - "#{rhost}:#{rport}" - end - - def check res = send_request_raw({'uri' => normalize_uri(target_uri.path)}) if not res diff --git a/modules/exploits/unix/webapp/narcissus_backend_exec.rb b/modules/exploits/unix/webapp/narcissus_backend_exec.rb index 3cac9adbdd..32971f4c03 100644 --- a/modules/exploits/unix/webapp/narcissus_backend_exec.rb +++ b/modules/exploits/unix/webapp/narcissus_backend_exec.rb @@ -66,10 +66,6 @@ class Metasploit3 < Msf::Exploit::Remote return uri end - def peer - "#{rhost}:#{rport}" - end - def remote_exe(command) res = send_request_cgi({ 'uri' => "#{base}backend.php", diff --git a/modules/exploits/unix/webapp/openemr_sqli_privesc_upload.rb b/modules/exploits/unix/webapp/openemr_sqli_privesc_upload.rb index e0632fed3d..62d564a5be 100644 --- a/modules/exploits/unix/webapp/openemr_sqli_privesc_upload.rb +++ b/modules/exploits/unix/webapp/openemr_sqli_privesc_upload.rb @@ -52,10 +52,6 @@ class Metasploit3 < Msf::Exploit::Remote ], self.class) end - def peer - return "#{rhost}:#{rport}" - end - def uri return target_uri.path end diff --git a/modules/exploits/unix/webapp/zeroshell_exec.rb b/modules/exploits/unix/webapp/zeroshell_exec.rb index 07251891a0..7436cfa6ac 100644 --- a/modules/exploits/unix/webapp/zeroshell_exec.rb +++ b/modules/exploits/unix/webapp/zeroshell_exec.rb @@ -55,10 +55,6 @@ class Metasploit3 < Msf::Exploit::Remote return target_uri.path end - def peer - return "#{rhost}:#{rport}" - end - def check # Check version print_status("#{peer} - Trying to detect ZeroShell") diff --git a/modules/exploits/unix/webapp/zpanel_username_exec.rb b/modules/exploits/unix/webapp/zpanel_username_exec.rb index a3dc775312..889a21a8a6 100644 --- a/modules/exploits/unix/webapp/zpanel_username_exec.rb +++ b/modules/exploits/unix/webapp/zpanel_username_exec.rb @@ -56,12 +56,6 @@ class Metasploit3 < Msf::Exploit::Remote ], self.class) end - - def peer - "#{rhost}:#{rport}" - end - - def check res = send_request_raw({'uri' => normalize_uri(target_uri.path)}) if not res diff --git a/modules/exploits/windows/http/hp_mpa_job_acct.rb b/modules/exploits/windows/http/hp_mpa_job_acct.rb index cbf47b6e1b..6e105ad234 100644 --- a/modules/exploits/windows/http/hp_mpa_job_acct.rb +++ b/modules/exploits/windows/http/hp_mpa_job_acct.rb @@ -57,10 +57,6 @@ class Metasploit3 < Msf::Exploit::Remote ], self.class) end - def peer - return "#{rhost}:#{rport}" - end - def webfolder_uri begin u = datastore['WRITEWEBFOLDER'] diff --git a/modules/exploits/windows/http/hp_pcm_snac_update_certificates.rb b/modules/exploits/windows/http/hp_pcm_snac_update_certificates.rb index bf1dd3e84d..fe9cd6053e 100644 --- a/modules/exploits/windows/http/hp_pcm_snac_update_certificates.rb +++ b/modules/exploits/windows/http/hp_pcm_snac_update_certificates.rb @@ -116,10 +116,6 @@ class Metasploit3 < Msf::Exploit::Remote return nil end - def peer - return "#{rhost}:#{rport}" - end - def exploit print_status("#{peer} - Getting a valid session...") session = get_session diff --git a/modules/exploits/windows/http/hp_pcm_snac_update_domain.rb b/modules/exploits/windows/http/hp_pcm_snac_update_domain.rb index d24d458f5c..662990ed3a 100644 --- a/modules/exploits/windows/http/hp_pcm_snac_update_domain.rb +++ b/modules/exploits/windows/http/hp_pcm_snac_update_domain.rb @@ -114,10 +114,6 @@ class Metasploit3 < Msf::Exploit::Remote return nil end - def peer - return "#{rhost}:#{rport}" - end - def exploit print_status("#{peer} - Getting a valid session...") session = get_session diff --git a/modules/exploits/windows/http/miniweb_upload_wbem.rb b/modules/exploits/windows/http/miniweb_upload_wbem.rb index e68106abca..93c2446064 100644 --- a/modules/exploits/windows/http/miniweb_upload_wbem.rb +++ b/modules/exploits/windows/http/miniweb_upload_wbem.rb @@ -64,10 +64,6 @@ class Metasploit3 < Msf::Exploit::Remote end - def peer - "#{rhost}:#{rport}" - end - def check begin diff --git a/modules/exploits/windows/http/novell_mdm_lfi.rb b/modules/exploits/windows/http/novell_mdm_lfi.rb index c75a6e128a..0c0f46ef3f 100644 --- a/modules/exploits/windows/http/novell_mdm_lfi.rb +++ b/modules/exploits/windows/http/novell_mdm_lfi.rb @@ -53,10 +53,6 @@ class Metasploit3 < Msf::Exploit::Remote ], self.class) end - def peer - "#{rhost}:#{rport}" - end - def get_version version = nil diff --git a/modules/exploits/windows/http/oracle_endeca_exec.rb b/modules/exploits/windows/http/oracle_endeca_exec.rb index 409a8de3fd..ed66e8350f 100644 --- a/modules/exploits/windows/http/oracle_endeca_exec.rb +++ b/modules/exploits/windows/http/oracle_endeca_exec.rb @@ -55,10 +55,6 @@ class Metasploit3 < Msf::Exploit::Remote ], self.class) end - def peer - return "#{rhost}:#{rport}" - end - def version_soap soap = <<-eos diff --git a/modules/exploits/windows/novell/file_reporter_fsfui_upload.rb b/modules/exploits/windows/novell/file_reporter_fsfui_upload.rb index 241db30104..e5afef18e3 100644 --- a/modules/exploits/windows/novell/file_reporter_fsfui_upload.rb +++ b/modules/exploits/windows/novell/file_reporter_fsfui_upload.rb @@ -92,10 +92,6 @@ class Metasploit3 < Msf::Exploit::Remote end - def peer - "#{rhost}:#{rport}" - end - def exploit # In order to save binary data to the file system the payload is written to a .vbs