Created
December 31, 2017 13:22
-
-
Save samduy/4567ac7bbe90efa129f5fdc51fef7eda to your computer and use it in GitHub Desktop.
Send HTTP Message
This file contains 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
from scapy.all import * | |
# Add iptables rule to block attack box from sending RSTs | |
# Create web.txt with entire GET/POST packet data | |
fileweb = open("web.txt",'r') | |
data = fileweb.read() | |
ip = IP(dst="<ip>") | |
SYN=ip/TCP(rport=RandNum(6000,7000),dport=80,flags="S",seq=4) | |
SYNACK = sr1(SYN) | |
ACK=ip/TCP(sport=SYNACK.dport,dport=80,flags="A",seq=SYNACK.ack,ack=SYNACK.seq+1)/data | |
reply,error = sr(ACK) | |
print reply.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment