Advertisement
Guest User

.

a guest
Nov 4th, 2017
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.37 KB | None | 0 0
  1. initial = """
  2. $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
  3. $ $
  4. $ /$$$$$$ /$$ $
  5. $ /$$__ $$| $$ $
  6. $ | $$ \__/| $$$$$$$ /$$$$$$ /$$$$$$ /$$ /$$ /$$$$$$ /$$ /$$ /$$ /$$$$$$ $
  7. $ | $$ | $$__ $$ |____ $$ /$$__ $$| $$ | $$ |____ $$| $$ | $$ | $$ /$$__ $$ $
  8. $ | $$ | $$ \ $$ /$$$$$$$| $$ \ $$| $$ | $$ /$$$$$$$| $$ | $$ | $$| $$$$$$$$ $
  9. $ | $$ $$| $$ | $$ /$$__ $$| $$ | $$| $$ | $$ /$$__ $$| $$ | $$ | $$| $$_____/ $
  10. $ | $$$$$$/| $$ | $$| $$$$$$$| $$$$$$$/| $$$$$$/| $$$$$$$| $$$$$/$$$$/| $$$$$$$ $
  11. $ \______/ |__/ |__/ \_______/| $$____/ \______/ \_______/ \_____/\___/ \_______/ $
  12. $ | $$ $
  13. $ | $$ $
  14. $ |__/ $
  15. $ $
  16. $ F4C3B00K B0T CR34T0R $
  17. $ Scripting by Zack Dasti and Colaborators $
  18. $ Credits: Zephirot (Beta Tester) $
  19. $ Version: beta 1.9.2 $
  20. $ $
  21. $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
  22. """
  23. import re
  24. import random
  25. import socket
  26. import urllib2
  27. from time import sleep
  28. from os import system
  29. from tempMail import tempMail
  30. from selenium import webdriver
  31. from optparse import OptionParser
  32. from selenium.webdriver.common.keys import Keys
  33. from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
  34.  
  35. parser = OptionParser()
  36.  
  37. parser.add_option('-c', '--check-proxies', action='store', help="Check a proxy list, for detect live proxies",
  38. type='string', dest='proxyfile')
  39. parser.add_option('-p', '--proxies', action='store', help="The live proxies file to use",
  40. type="string", dest='useproxies')
  41. parser.add_option('-e', '--email', action='store', help="The optional personal email",
  42. type='string', dest='email_use')
  43. parser.add_option('-n', '--names', action='store', help="The names to use file",
  44. type="string", dest='names')
  45. parser.add_option('--custom-name', action='store', help="Set the custom name of a account",
  46. type="string", dest='custom_name')
  47.  
  48. (options, args) = parser.parse_args()
  49.  
  50. def check_proxies(proxiesFile):
  51. file = open(proxiesFile, 'r')
  52. file2 = open('LiveProxies.txt', 'w')
  53. proxies = file.readlines()
  54. proxyFinal = ''
  55.  
  56. for proxy in proxies:
  57. proxyFinal += proxy
  58.  
  59. proxyList = proxyFinal.split('\n')
  60.  
  61. def dead_proxy(address):
  62. try:
  63. proxy_handler = urllib2.ProxyHandler({'http': address})
  64. opener = urllib2.build_opener(proxy_handler)
  65. opener.addheaders = [('User-agent', 'Mozilla/5.0')]
  66. urllib2.install_opener(opener)
  67. req=urllib2.Request('http://www.google.com')
  68. sock=urllib2.urlopen(req)
  69. except urllib2.HTTPError, e:
  70. return True
  71. except Exception, detail:
  72. return True
  73. return False
  74.  
  75. socket.setdefaulttimeout(5)
  76.  
  77. for currentProxy in proxyList:
  78. if dead_proxy(currentProxy):
  79. print "Dead Proxy " + currentProxy
  80. else:
  81. print "Live Proxy " + currentProxy
  82. file2.write(currentProxy + "\n")
  83.  
  84. file2.close()
  85. file.close()
  86.  
  87. def use_proxies():
  88. file = open(options.useproxies).read().splitlines()
  89. ip_proxy = random.choice(file)
  90.  
  91. num_lines = sum(1 for line in open(options.useproxies))
  92. global tries
  93. tries = num_lines
  94.  
  95. return ip_proxy
  96.  
  97. def init():
  98. system('clear')
  99. print str(initial) + "\n"
  100. dcap = dict(DesiredCapabilities.PHANTOMJS)
  101. dcap["phantomjs.page.settings.userAgent"] = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/53 (KHTML, like Gecko) Chrome/15.0.87"
  102.  
  103. if options.useproxies:
  104. service_proxy = use_proxies().strip("\n")
  105. service_args = [
  106. '--proxy=' + service_proxy,
  107. '--proxy-type=socks5',
  108. '--ignore-ssl-errors=true',
  109. '--ssl-protocol=any'
  110. ]
  111.  
  112. driver = webdriver.PhantomJS(desired_capabilities=dcap, service_args=service_args)
  113. else:
  114. driver = webdriver.PhantomJS(desired_capabilities=dcap)
  115.  
  116. print "Iniciando mecanismos"
  117. driver.set_window_size(750, 1334)
  118. print "Seteando parametros anti-block_bots"
  119.  
  120. driver.get("about:blank")
  121. driver.delete_all_cookies()
  122.  
  123. driver.get("https://mbasic.facebook.com/reg/")
  124. print "Accediendo a los vectores de ataque"
  125.  
  126. try:
  127. driver.save_screenshot('main.png')
  128. source = open('source.html', 'w')
  129. source.write(driver.page_source.encode("utf-8"))
  130. source.close()
  131. print "see ls"
  132.  
  133. exit()
  134. except:
  135. exit()
  136.  
  137.  
  138. if options.email_use:
  139. email = options.email_use
  140. else:
  141. m = tempMail.mailer()
  142. email = m.getEmail()
  143.  
  144. name = driver.find_element_by_xpath('//*[@id="u_0_0"]/input')
  145. lastname = driver.find_element_by_xpath('//*[@id="u_0_1"]/input')
  146.  
  147. name.send_keys(usernames())
  148. lastname.send_keys(usernames() + Keys.RETURN)
  149.  
  150. birthday = random_birthday().split('/')
  151.  
  152. day = driver.find_element_by_id('day')
  153. for option_day in day.find_elements_by_tag_name('option'):
  154. if option_day.text == birthday[0]:
  155. option_day.click()
  156. break
  157.  
  158. month = driver.find_element_by_id('month')
  159. for option_month in month.find_elements_by_tag_name('option'):
  160. if option_month.text == birthday[1]:
  161. option_month.click()
  162. break
  163.  
  164. year = driver.find_element_by_id('year')
  165. for option_year in year.find_elements_by_tag_name('option'):
  166. if option_year == birthday[2]:
  167. option_year.click()
  168. break
  169.  
  170. print birthday
  171. driver.find_element_by_xpath('//*[@id="mobile-reg-form"]/div[9]/button[1]/span').click()
  172.  
  173. """
  174. try:
  175. email_input = driver.find_element_by_xpath('//*[@id="u_0_2"]/input')
  176. email_input.send_keys(email + Keys.RETURN)
  177. except:
  178. driver.save_screenshot('main.png')
  179. exit()
  180. """
  181. driver.save_screenshot('main.png')
  182. source = open('source.html', 'w')
  183. source.write(driver.page_source.encode("utf-8"))
  184. source.close()
  185.  
  186. sleep(10)
  187.  
  188. driver.save_screenshot('main2.png')
  189. exit()
  190.  
  191.  
  192. if random.randint(1,2) == 1:
  193. driver.find_element_by_xpath('//*[@id="sex"]/div/div[2]/label[1]/input').click()
  194. else:
  195. driver.find_element_by_xpath('//*[@id="sex"]/div/div[2]/label[2]/input').click()
  196.  
  197. driver.find_element_by_xpath('//*[@id="mobile-reg-form"]/div[9]/button[1]').click()
  198. password = driver.find_element_by_xpath('//*[@id="u_0_3"]/input')
  199. password.send_keys('LegionRusa')
  200.  
  201. driver.save_screenshot('main.png')
  202. print "\nA log has been saved in main.png"
  203. print "and the source has been saved in source.html"
  204.  
  205. def random_birthday():
  206. month = random.randint(1,12)
  207. day = random.randint(1,28)
  208. year = random.randint(1970,1998)
  209.  
  210. return str("%s/%s/%s" % (day, month, year))
  211.  
  212. def usernames():
  213. file = open(options.names).read().splitlines()
  214. username = random.choice(file)
  215. return username
  216.  
  217. if options.proxyfile:
  218. check_proxies(options.proxyfile)
  219. elif options.names:
  220. init()
  221. else:
  222. print "Usage: -h"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement