Land #6392, @wchen-r7's 'def peer' cleanup, fixing #6362

bug/bundler_fix
Jon Hart 2015-12-24 08:53:32 -08:00
commit efdb6a8885
No known key found for this signature in database
GPG Key ID: 2FA9F0A3AFA8E9D3
34 changed files with 7 additions and 145 deletions

View File

@ -31,10 +31,6 @@ module Msf
)
end
def peer
"#{rhost}:#{rport}"
end
def read_timeout
datastore['READ_TIMEOUT']
end

View File

@ -51,12 +51,6 @@ module Msf
datastore['RPORT']
end
# Returns the RMI server peer
#
# @return [String]
def peer
"#{rhost}:#{rport}"
end
# Sends a RMI header stream
#

View File

@ -82,6 +82,11 @@ module Exploit::Remote::Tcp
)
end
# Returns the rhost:rport
def peer
"#{rhost}:#{rport}"
end
#
# Establishes a TCP connection to the specified RHOST/RPORT
#

View File

@ -190,10 +190,6 @@ class Metasploit3 < Msf::Auxiliary
response
end
def peer
"#{rhost}:#{rport}"
end
def protocol
datastore['PROTOCOL']
end

View File

@ -134,9 +134,6 @@ class Metasploit3 < Msf::Auxiliary
return nil
end
def peer
return "#{rhost}:#{rport}"
end
def fingerprint_endian
begin

View File

@ -89,10 +89,6 @@ class Metasploit3 < Msf::Auxiliary
end
end
def peer
"#{rhost}:#{rport}"
end
def get_username
# Setup query to check for database username
clue_start = Rex::Text.rand_text_alpha(8 + rand(4))

View File

@ -40,10 +40,6 @@ class Metasploit3 < Msf::Auxiliary
], self.class)
end
def peer
"#{rhost}:#{rport}"
end
def smb_delete_files
vprint_status("#{peer}: Connecting to the server...")
connect()

View File

@ -40,10 +40,6 @@ class Metasploit3 < Msf::Auxiliary
], self.class)
end
def peer
"#{rhost}:#{rport}"
end
def smb_download
vprint_status("#{peer}: Connecting...")
connect()

View File

@ -47,10 +47,6 @@ class Metasploit3 < Msf::Auxiliary
end
def peer
"#{rhost}:#{rport}"
end
def run_host(_ip)
begin
vprint_status("#{peer}: Connecting to the server...")

View File

@ -116,10 +116,6 @@ class Metasploit3 < Msf::Auxiliary
end
def peer
"#{rhost}:#{rport}"
end
def dos_user
length = 12000 # enough to overflow the end of allocated memory
msg = create_message(length)

View File

@ -42,10 +42,6 @@ class Metasploit3 < Msf::Auxiliary
], self.class)
end
def peer
"#{rhost}:#{rport}"
end
def get_response(size = 72)
connect
response = sock.get_once(size)

View File

@ -31,10 +31,6 @@ class Metasploit3 < Msf::Auxiliary
], self.class)
end
def peer
"#{rhost}:#{rport}"
end
def run_host(ip)
vprint_status("#{peer} - Querying indices...")
begin

View File

@ -36,10 +36,6 @@ class Metasploit3 < Msf::Auxiliary
], self.class)
end
def peer
"#{rhost}:#{rport}"
end
def extract_words(wordfile)
return [] unless wordfile && File.readable?(wordfile)
begin

View File

@ -43,10 +43,6 @@ class Metasploit3 < Msf::Auxiliary
res
end
def peer
"#{rhost}:#{rport}"
end
def run_host(ip)
vprint_status("#{peer} - Login...")

View File

@ -124,9 +124,6 @@ class Metasploit3 < Msf::Auxiliary
"\x02\xf0\x80\x38"
end
def peer
"#{rhost}:#{rport}"
end
def check_rdp_vuln
# check if rdp is open

View File

@ -56,10 +56,6 @@ class Metasploit3 < Msf::Auxiliary
)
end
def peer
"#{rhost}:#{rport}"
end
def read_timeout
datastore['READ_TIMEOUT']
end

View File

@ -38,10 +38,6 @@ class Metasploit3 < Msf::Auxiliary
], self.class)
end
def peer
"#{rhost}:#{rport}"
end
def run_host(ip)
begin
connect

View File

@ -37,10 +37,6 @@ class Metasploit3 < Msf::Auxiliary
)
end
def peer
"#{rhost}:#{rport}"
end
def timeout
datastore['TIMEOUT'] <= 0 ? DEFAULT_TIMEOUT : datastore['TIMEOUT']
end

View File

@ -111,10 +111,6 @@ class Metasploit3 < Msf::Auxiliary
], self.class)
end
def peer
"#{rhost}:#{rport}"
end
def response_timeout
datastore['RESPONSE_TIMEOUT']
end

View File

@ -170,10 +170,6 @@ class Metasploit3 < Msf::Auxiliary
end
def peer
"#{rhost}:#{rport}"
end
#
# Main methods
#

View File

@ -33,7 +33,7 @@ class Metasploit4 < Msf::Exploit::Remote
['CVE', '2013-2028'],
['OSVDB', '93037'],
['URL', 'http://nginx.org/en/security_advisories.html'],
['URL', 'http://packetstormsecurity.com/files/121560/Nginx-1.3.9-1.4.0-Stack-Buffer-Overflow.html']
['PACKETSTORM', '121560']
],
'Privileged' => false,
'Payload' =>
@ -73,9 +73,6 @@ class Metasploit4 < Msf::Exploit::Remote
end
def peer
"#{rhost}:#{rport}"
end
def check
begin

View File

@ -54,10 +54,6 @@ class Metasploit3 < Msf::Exploit::Remote
], self.class)
end
def peer
"#{rhost}:#{rport}"
end
def exploit
unless vulnerable?
fail_with(Failure::Unknown, "#{peer} - Jenkins is not vulnerable, aborting...")

View File

@ -129,10 +129,6 @@ class Metasploit3 < Msf::Exploit::Remote
end
end
def peer
"#{rhost}:#{rport}"
end
def build_pkt(fields)
data = "\xff\xfe" # BOM Unicode
fields.each do |v|

View File

@ -147,10 +147,6 @@ class Metasploit3 < Msf::Exploit::Remote
end
def peer
"#{rhost}:#{rport}"
end
def default_timeout
datastore['RESPONSE_TIMEOUT']
end

View File

@ -106,10 +106,6 @@ class Metasploit3 < Msf::Exploit::Remote
end
end
def peer
"#{rhost}:#{rport}"
end
def primer
connect

View File

@ -87,9 +87,6 @@ class Metasploit3 < Msf::Exploit::Remote
Exploit::CheckCode::Detected
end
def peer
"#{rhost}:#{rport}"
end
def get_fingerprint
ommni = connect

View File

@ -105,9 +105,6 @@ class Metasploit3 < Msf::Exploit::Remote
end
end
def peer
"#{rhost}:#{rport}"
end
def build_pkt(fields)
data = "\xff\xfe" # BOM Unicode

View File

@ -101,10 +101,6 @@ class Metasploit3 < Msf::Exploit::Remote
register_file_for_cleanup("wbem\\mof\\good\\#{mof_name}")
end
def peer
"#{rhost}:#{rport}"
end
def build_pkt(fields)
data = "\xff\xfe" # BOM Unicode
fields.each do |v|

View File

@ -66,10 +66,6 @@ class Metasploit3 < Msf::Exploit::Remote
], self.class)
end
def peer
"#{rhost}:#{rport}"
end
#
# Check
#

View File

@ -59,10 +59,6 @@ class Metasploit3 < Msf::Exploit::Remote
return Exploit::CheckCode::Safe
end
def peer
"#{rhost}:#{rport}"
end
def query(q)
rows = []

View File

@ -64,10 +64,6 @@ class Metasploit3 < Msf::Exploit::Remote
Exploit::CheckCode::Safe
end
def peer
"#{rhost}:#{rport}"
end
def query(q)
rows = []

View File

@ -31,11 +31,6 @@ class Metasploit3 < Msf::Post
], self.class)
end
def peer
"#{session.session_host}:#{session.session_port}"
end
#
# The OSX version uses an apple script to do this
#

View File

@ -58,11 +58,6 @@ class Metasploit3 < Msf::Post
version
end
def peer
"#{session.session_host}:#{session.session_port}"
end
#
# Converts LastSession.plist to xml, and then read it
# @param filename [String] The path to LastSession.plist

View File

@ -38,22 +38,6 @@ class Metasploit3 < Msf::Post
))
end
def r_host
if session.type =~ /meterpreter/
session.sock.peerhost
else
session.session_host
end
end
def peer
if session.type =~ /meterpreter/
"#{r_host} (#{sysinfo['Computer']})"
else
r_host
end
end
#
# Decrypt DES encrypted password string
#
@ -215,7 +199,7 @@ class Metasploit3 < Msf::Post
print_good "#{peer} - Found Username: '#{user}' Password: '#{pass}'"
report_cred(
ip: r_host,
ip: rhost,
port: port,
service_name: 'http',
user: user,