This commit is contained in:
holger krekel
2023-10-16 19:38:52 +02:00
parent c47778e03e
commit 97f0911b6f

View File

@@ -107,15 +107,14 @@ def gencreds(maildomain):
next(count) next(count)
def gen(domain=None): def gen(domain=None):
if domain is not None: domain = domain if domain else maildomain
maildomain = domain
while 1: while 1:
num = next(count) num = next(count)
alphanumeric = "abcdefghijklmnopqrstuvwxyz1234567890" alphanumeric = "abcdefghijklmnopqrstuvwxyz1234567890"
user = "".join(random.choices(alphanumeric, k=10)) user = "".join(random.choices(alphanumeric, k=10))
user = f"ac{num}_{user}" user = f"ac{num}_{user}"
password = "".join(random.choices(alphanumeric, k=10)) password = "".join(random.choices(alphanumeric, k=10))
yield f"{user}@{maildomain}", f"{password}" yield f"{user}@{domain}", f"{password}"
return lambda domain=None: next(gen(domain)) return lambda domain=None: next(gen(domain))