Created
April 26, 2017 13:44
-
-
Save sofianinho/1504f16adee8bf35013a8ca09a895192 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# for python2 version | |
sudo apt-get install python-scapy | |
#to create dynamic payload | |
sudo pip2 install loremipsum | |
#to forge packets need to be root | |
sudo scapy | |
#python part | |
from loremipsum import get_sentences | |
import datetime | |
sentences_list = get_sentences(10) | |
my_pck = IP(src='10.194.127.246',dst='172.20.31.155')/UDP(sport=5598,dport=5599) | |
for x in range(10): | |
... now=datetime.datetime.now() | |
... my_pck.payload.add_payload(str(now.strftime("%H:%M:%S"))+'.'+str(now.microsecond)+'|messge:'+str(sentences_list[x % 10])) | |
... send(my_pck) | |
... my_pck.payload.remove_payload() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment