Skip to content

Commit

Permalink
added username generator
Browse files Browse the repository at this point in the history
  • Loading branch information
onemanbuilds committed Oct 17, 2020
1 parent 4fbd56a commit 9467911
Showing 1 changed file with 24 additions and 7 deletions.
31 changes: 24 additions & 7 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import time
import random
import sys
import string
from colorama import init,Fore
from datetime import datetime
from multiprocessing.dummy import Pool as ThreadPool
Expand Down Expand Up @@ -40,7 +41,9 @@ def __init__(self):
self.clear()
init()
self.ua = UserAgent()
self.use_proxy = int(input('[QUESTION] Would you like to use proxies [1] yes [0] no: '))

self.option = int(input('[QUESTION] Would you like to [1]Generate Usernames [0]Check Usernames: '))

print('')
self.usernames = self.ReadFile('usernames.txt','r')

Expand All @@ -52,6 +55,14 @@ def GetRandomProxy(self):
}
return proxies

def GenUsername(self,amount,length):
for i in range(amount):
name = ''.join(random.choice(string.ascii_letters+'0123456789') for num in range(length))
count = i+1
self.PrintText(str(count),name,Fore.GREEN,Fore.WHITE)
with open('usernames.txt','a',encoding='utf8') as f:
f.write(name+'\n')

def CheckUsernames(self,usernames):
try:
headers = {
Expand All @@ -76,14 +87,20 @@ def CheckUsernames(self,usernames):
except:
self.CheckUsernames(usernames)

def StartCheck(self):
pool = ThreadPool()
results = pool.map(self.CheckUsernames,self.usernames)
pool.close()
pool.join()
def Start(self):
if self.option == 1:
self.amount = int(input('[QUESTION] Enter the amount: '))
self.length = int(input('[QUESTION] Enter the length: '))
self.GenUsername(self.amount,self.length)
else:
self.use_proxy = int(input('[QUESTION] Would you like to use proxies [1] yes [0] no: '))
pool = ThreadPool()
results = pool.map(self.CheckUsernames,self.usernames)
pool.close()
pool.join()


if __name__ == "__main__":
main = Main()
main.StartCheck()
main.Start()

0 comments on commit 9467911

Please sign in to comment.