-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUDPNormal.py
More file actions
26 lines (21 loc) · 739 Bytes
/
UDPNormal.py
File metadata and controls
26 lines (21 loc) · 739 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/python
#A script to generate packets to destination 10.0.0.9, using the source ip of the sending node using UDP
#you can run this script from any node you want'''
from random import randint
import sys, os
from scapy.all import *
def generatePackets():
if len(sys.argv) != 3:
print "Usage: arping2tex <net>\n eg: arping2text 192.168.1.0/24"
sys.exit(1)
src= sys.argv[1]
dst= sys.argv[2]
#print src, dst
data = "Abdullah Soliman Alshraa"
ip=IP(src= src, dst= dst)
udp=UDP(sport= 2235, dport=5546)#,
pkt = (ip/udp/data)
#x = random.randint(1,10)
send(pkt, count = 100, inter=1./100)
if __name__ == '__main__':
generatePackets()