khalilasharen

python bot clicker

Nov 11th, 2012
650
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.71 KB | None | 0 0
  1. #!/usr/bin/python
  2. # This code is just for educational only ;)
  3. # coder by jimmyromanticdevil
  4. # code for tutorial Python [ Membuat Bot Auto Clicker ]
  5. import urllib2
  6. import urllib
  7. import sys
  8. import time
  9. import random
  10. import re
  11. import os
  12. proxylisttext = "proxylist.txt"
  13. useragent = ['Mozilla/4.0 (compatible; MSIE 5.0; SunOS 5.10 sun4u; X11)',
  14. 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.2pre) Gecko/20100207 Ubuntu/9.04 (jaunty) Namoroka/3.6.2pre',
  15. 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Avant Browser;',
  16. 'Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)',
  17. 'Mozilla/4.0 (compatible; MSIE 7.0b; Windows NT 5.1)',
  18. 'Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.6)',
  19. 'Microsoft Internet Explorer/4.0b1 (Windows 95)',
  20. 'Opera/8.00 (Windows NT 5.1; U; en)',
  21. 'amaya/9.51 libwww/5.4.0',
  22. 'Mozilla/4.0 (compatible; MSIE 5.0; AOL 4.0; Windows 95; c_athome)',
  23. 'Mozilla/4.0 (compatible; MSIE 5.5; Windows NT)',
  24. 'Mozilla/5.0 (compatible; Konqueror/3.5; Linux) KHTML/3.5.5 (like Gecko) (Kubuntu)',
  25. 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; ZoomSpider.net bot; .NET CLR 1.1.4322)',
  26. 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; QihooBot 1.0 [email protected])',
  27. 'Mozilla/4.0 (compatible; MSIE 5.0; Windows ME) Opera 5.11 [en]']
  28.  
  29. referer = ['http://google.com','http://bing.com','http://facebook.com','http://twitter.com']
  30. link_invation= 'http://target.com/ref.php?page=act/ref&invcod=90386'
  31.  
  32. def Autoclicker(proxy1):
  33. try:
  34. proxy = proxy1.split(":")
  35. print 'Auto Click Using proxy :',proxy1
  36. proxy_set = urllib2.ProxyHandler({"http" : "%s:%d" % (proxy[0], int(proxy[1]))})
  37. opener = urllib2.build_opener(proxy_set, urllib2.HTTPHandler)
  38. opener.addheaders = [('User-agent', random.choice(useragent)),
  39. ('Referer', random.choice(referer))]
  40. urllib2.install_opener(opener)
  41. f = urllib2.urlopen(link_invation)
  42. if "target.com" in f.read():
  43. print "[*] Link invation was clicked..."
  44. else:
  45. print "[*] Link invation not clicked !"
  46. print "[!] Proxy failed"
  47.  
  48. except:
  49. print "[!] Proxy Error "
  50. pass
  51.  
  52. def loadproxy():
  53. try:
  54. get_file = open(proxylisttext, "r")
  55. proxylist = get_file.readlines()
  56. count = 0
  57. proxy = []
  58. while count < len(proxylist):
  59. proxy.append(proxylist[count].strip())
  60. count += 1
  61. for i in proxy:
  62. Autoclicker(i)
  63. except IOError:
  64. print "\n[-] Error: Check your proxylist path\n"
  65. sys.exit(1)
  66.  
  67. def main():
  68. print """
  69. #################################
  70. Simulation Bot Autoclicker
  71. coder : jimmyromanticdevil
  72. #################################
  73. """
  74. loadproxy()
  75. if __name__ == '__main__':
  76. main()
Advertisement
Add Comment
Please, Sign In to add comment