Skip to content

Commit b65b299

Browse files
committed
assignment 1
1 parent 43af92c commit b65b299

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎assignment1/send.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ def randomword(length):
1010

1111
def send_random_traffic(num_packets, interface, src_ip, dst_ip):
1212
dst_mac = "00:00:00:00:00:01"
13-
src_mac= "00:00:00:00:00:02"
13+
src_mac= "0c:37:96:5f:89:ec"
1414
total_pkts = 0
1515
port = 1024
1616
for i in range(num_packets):
17-
data = randomword(22)
17+
data = randomword(458)
1818
p = Ether(dst=dst_mac,src=src_mac)/IP(dst=dst_ip,src=src_ip)
19-
p = p/UDP(sport= 50000, dport=port)/Raw(load=data)
19+
p = p/TCP(sport= 5555, dport=port)/Raw(load=data)
2020
sendp(p, iface = interface, inter = 0.01)
2121
# If you want to see the contents of the packet, uncomment the line below
2222
# print(p.show())

0 commit comments

Comments
 (0)