style compliance fixes

git-svn-id: file:///home/svn/framework3/trunk@10758 4d416f70-5f16-0410-b530-b9f4589650da
unstable
Joshua Drake 2010-10-19 22:54:19 +00:00
parent c27749db8e
commit 04858c69fc
7 changed files with 26 additions and 26 deletions

View File

@ -47,12 +47,12 @@ class Metasploit3 < Msf::Auxiliary
def run_batch(hosts)
print_status("IPv4 Hosts Discovery")
shost = datastore['SHOST']
shost = datastore['SHOST']
smac = datastore['SMAC']
addrs = []
open_pcap({'SNAPLEN' => 68, 'FILTER' => "arp[6:2] == 0x0002"})
open_pcap({'SNAPLEN' => 68, 'FILTER' => "arp[6:2] == 0x0002"})
begin
hosts.each do |dhost|
@ -86,19 +86,19 @@ class Metasploit3 < Msf::Auxiliary
close_pcap()
end
neighbor_discovery(addrs)
neighbor_discovery(addrs)
end
def map_neighbor(nodes, adv)
def map_neighbor(nodes, adv)
nodes.each do |node|
ipv4_addr, mac_addr = node
next if not adv[:eth].src_mac.eql? mac_addr
ipv4_addr, mac_addr = node
next if not adv[:eth].src_mac.eql? mac_addr
ipv6_addr = Racket::L3::Misc.long2ipv6(adv[:ipv6].src_ip)
ipv6_addr = Racket::L3::Misc.long2ipv6(adv[:ipv6].src_ip)
return {:eth => mac_addr, :ipv4 => ipv4_addr, :ipv6 => ipv6_addr}
end
end
nil
end
@ -107,10 +107,10 @@ class Metasploit3 < Msf::Auxiliary
def neighbor_discovery(neighs)
print_status("IPv6 Neighbor Discovery")
smac = datastore['SMAC']
open_pcap({'SNAPLEN' => 68, 'FILTER' => "icmp6"})
smac = datastore['SMAC']
open_pcap({'SNAPLEN' => 68, 'FILTER' => "icmp6"})
begin
begin
neighs.each do |neigh|
host, dmac = neigh
@ -121,7 +121,7 @@ class Metasploit3 < Msf::Auxiliary
capture.inject(probe)
while(adv = getadvertisement())
while(adv = getadvertisement())
next if not adv[:icmpv6]
addr = map_neighbor(neighs, adv)
@ -212,7 +212,7 @@ class Metasploit3 < Msf::Auxiliary
return if not eth.ethertype == 0x86dd
ipv6 = Racket::L3::IPv6.new(eth.payload)
return if not ipv6.nhead == 0x3a
return if not ipv6.nhead == 0x3a
icmpv6 = Racket::L4::ICMPv6.new(ipv6.payload)
return if not icmpv6.type == Racket::L4::ICMPv6::ICMPv6_TYPE_NEIGHBOR_ADVERTISEMENT

View File

View File

@ -146,7 +146,7 @@ class Metasploit3 < Msf::Auxiliary
ret = nil
while this_attempt <=3 and (ret.nil? or ret == :connection_error or ret == :connection_disconnect)
if this_attempt > 0
select(nil,nil,nil,2**this_attempt)
select(nil,nil,nil,2**this_attempt)
vprint_error "#{rhost}:#{rport} SSH - Retrying '#{user}':'#{pass}' due to connection error"
end
ret,proof = do_login(ip,user,pass,rport)

View File

@ -85,11 +85,11 @@ class Metasploit3 < Msf::Auxiliary
def try_user_pass(user, pass)
vprint_status "#{rhost}:#{rport} Telnet - Attempting: '#{user}':'#{pass}'"
this_attempt ||= 0
this_attempt ||= 0
ret = nil
while this_attempt <=3 and (ret.nil? or ret == :refused)
while this_attempt <=3 and (ret.nil? or ret == :refused)
if this_attempt > 0
select(nil,nil,nil,2**this_attempt)
select(nil,nil,nil,2**this_attempt)
vprint_error "#{rhost}:#{rport} Telnet - Retrying '#{user}':'#{pass}' due to reset"
end
ret = do_login(user,pass)
@ -171,7 +171,7 @@ class Metasploit3 < Msf::Auxiliary
recvd_sample = @recvd.dup
# Allow for slow echos
1.upto(10) do
recv_telnet(self.sock, 0.10) unless @recvd.nil? or @recvd[/#{@password_prompt}/]
recv_telnet(self.sock, 0.10) unless @recvd.nil? or @recvd[/#{@password_prompt}/]
end
vprint_status("#{rhost}:#{rport} Prompt: #{@recvd.gsub(/[\r\n\e\b\a]/, ' ')}")

View File

@ -68,7 +68,7 @@ class Metasploit3 < Msf::Exploit::Remote
fname = '../../../../../../../Progra~1/Novell/Tomcat/webapps/ROOT/'
fname << page
dbl = Rex::MIME::Message.new
dbl = Rex::MIME::Message.new
dbl.add_part(payload.encoded, "application/octet-stream", nil, "form-data; name=\"MODULE_FILE\"; filename=\"#{fname}\"")
data = dbl.to_s
# For some unknown reason, the service is unhappy with an extra EOL.

View File

@ -35,7 +35,7 @@ module Metasploit3
'Offsets' =>
{
# Disabled since it MUST be ExitProcess to work on WoW64 unless we add EXITFUNK support (too big right now)
# 'EXITFUNC' => [ 290, 'V' ],
# 'EXITFUNC' => [ 290, 'V' ],
'LPORT' => [ 190, 'v' ], # Not a typo, really little endian
},
'Payload' =>
@ -80,7 +80,7 @@ module Metasploit3
def wfs_delay
20
end
#
# Generate the first stage
#
@ -95,7 +95,7 @@ module Metasploit3
p[i, u.length] = u
p + datastore['LHOST'].to_s + "\x00"
end
#
# Generate the second stage
#

View File

@ -81,9 +81,9 @@ module Metasploit3
# If the target process is threaded, this means the thread
# will exit. exit_group() will try to close the process down
# completely.. and if we do that, it may not be reaped
# correctly.
#
# completely.. and if we do that, it may not be reaped
# correctly.
#
# Plus, depending on the vuln, we might get multiple shots at
# owning a finite amount of threads.
@ -104,7 +104,7 @@ module Metasploit3
# Patch in debug options
midstager = midstager.sub("Y", [ datastore['DebugOptions'] ].pack('C'))
# Patch entry point
# Patch entry point
midstager = midstager.sub("ZZZZ", [ elf_ep(payload) ].pack('V'))
# Maybe in the future patch in base.