[TIP] Generating 1024 Macs/vlan(urgent help)
Jishnu Banerjee (jbanerje)
jbanerje at cisco.com
Sun Mar 21 20:51:18 PDT 2010
Hi Folks,
I am new to this forum and a novice in Python/Scapy.
Can anybody help me out with a script which will generate 1024 MACs/vlan
spanning over 32 vlans.
I have done this:
scmac = '00:20:11:11:22:'
lastbyte = 1
eth = sys.argv[1]
destmac = '00:0D:03:00:00:01'
r=0
while (r<80):
print 'r='
print r
srcmac = scmac + str(r)
print srcmac
p =
(scapy.Ether(dst=destmac,src=srcmac)/scapy.IP(dst="2.2.2.2",src="2.2.2.1
"))
scapy.sendp(p,iface=eth)
r= r+1
It seems to me that my above script is not generating Unique MACs, I am
yet to capture those packets.
Any help is sppreciated.
Regards,
Jishnu
More information about the testing-in-python
mailing list