mirror of
https://github.com/rapid7/metasploit-framework
synced 2024-11-12 11:52:01 +01:00
remove client ip send, remove puts lines, fixes #2329
git-svn-id: file:///home/svn/framework3/trunk@10049 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
parent
621c0e9829
commit
48e91af25d
@ -163,12 +163,9 @@ protected
|
||||
type = buf[0].unpack('C').first
|
||||
if (type != Request)
|
||||
#dlog("Unknown DHCP request type: #{type}")
|
||||
#$stdout.puts "ugh not request - #{type}"
|
||||
return
|
||||
end
|
||||
|
||||
#$stdout.puts "request #{type} found"
|
||||
|
||||
# parse out the members
|
||||
hwtype = buf[1]
|
||||
hwlen = buf[2].unpack("C").first
|
||||
@ -187,7 +184,6 @@ protected
|
||||
|
||||
if (magic != DHCPMagic)
|
||||
#dlog("Invalid DHCP request - bad magic.")
|
||||
#$stdout.puts "ugh bad magic"
|
||||
return
|
||||
end
|
||||
|
||||
@ -210,7 +206,6 @@ protected
|
||||
|
||||
if pxeclient == false && self.servePXE == true
|
||||
#dlog ("No tftp server request; ignoring (probably not PXE client)")
|
||||
#$stdout.puts "ugh pxe"
|
||||
return
|
||||
end
|
||||
|
||||
@ -239,7 +234,6 @@ protected
|
||||
# check if already served based on hw addr (MAC address)
|
||||
if self.serveOnce == true && self.served.has_key?(buf[28..43])
|
||||
#dlog ("Already served; allowing normal boot")
|
||||
#$stdout.puts "ugh already served"
|
||||
return
|
||||
end
|
||||
elsif messageType == DHCPRequest #DHCP Request - send DHCP ACK
|
||||
@ -248,7 +242,6 @@ protected
|
||||
self.served.merge!( buf[28..43] => true )
|
||||
else
|
||||
#dlog("ignoring unknown DHCP request - type #{messageType}")
|
||||
#$stdout.puts "ugh weird type - #{messageType}"
|
||||
return
|
||||
end
|
||||
|
||||
@ -266,11 +259,7 @@ protected
|
||||
|
||||
pkt << ("\x00" * 32) #padding
|
||||
|
||||
if messageType == DHCPRequest
|
||||
send_packet(Rex::Socket.addr_itoa(self.current_ip), pkt)
|
||||
else
|
||||
send_packet(nil, pkt)
|
||||
end
|
||||
send_packet(nil, pkt)
|
||||
end
|
||||
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user