forked from IntelCoreI6/gmail-suffix-generator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
emailgen.py
87 lines (64 loc) · 3.06 KB
/
emailgen.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
import email
import random
import string
import time
import os
output = []
randomLeghnt = 5
path = os.path.realpath(os.path.dirname(__file__))
def get_random_string(length):
# choose from all lowercase letter
letters = string.ascii_lowercase
result_str = ''.join(random.choice(letters) for i in range(length))
return result_str
def prefixgen(exportAmount, Email):
for i in range(exportAmount):
ranID = get_random_string(5)
Emailcore = Email.replace("@gmail.com", "")
final = "{}+{}@gmail.com".format(Emailcore, ranID)
output.append(final)
print(output)
exportprefix(path)
input("Press Enter to continue...")
quit
def exportprefix(exportdir):
try:
Directory = r'{}\Output.txt'.format(exportdir)
print("file location: " + Directory)
with open(Directory, 'w') as fp:
for item in output:
fp.write("%s\n" % item)
print('\033[32m' + "suffix are exported in selected directory" + '\033[0m')
#input("Press Enter to continue...")
#mainmenu()
except:
print('\033[31m' + "Directory not found or no generated suffix found" + '\033[0m')
input("Press Enter to continue...")
mainmenu()
def mainmenu():
os.system('cls')
print('\033[35m' + """
____ ___ ___ ____ ____ _ _____ __ __ _____ _____ ____ __ __ ____ ___ ____
/ || | | / || || | / ___/| | || || || || | | / | / _]| \
| __|| _ _ || o | | | | | ( \_ | | || __|| __| | | | | | | __| / [_ | _ |
| | || \_/ || | | | | |___ \__ || | || |_ | |_ | | |_ _| | | || _]| | |
| |_ || | || _ | | | | | / \ || : || _] | _] | | | | | |_ || [_ | | |
| || | || | | | | | | \ || || | | | | | | | | | || || | |
|___,_||___|___||__|__||____||_____| \___| \__,_||__| |__| |____||__|__| |___,_||_____||__|__|
made by: IntelCoreI6#5753
""" + '\033[0m')
print('\033[35m' + """
[1] generate suffix
[2] close program
""" + '\033[0m')
answer = input()
if answer == "1" :
email
genAmount = int(input("How many suffix do you want to generate? "))
emailinput = input("give the gmail acc u wanna use ")
prefixgen(genAmount, emailinput)
elif answer == "2":
quit
else:
print('\033[31m' + "This is not a valid answer" + '\033[0m')
mainmenu()