1234567891011121314151617 |
- import random
- def generateAuthData():
- chars = '+-*!&$#?=@<>abcdefghijklnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890'
- length_pas = random.randint(12,24)
- password = ''
- for i in range(length_pas):
- password += random.choice(chars)
- username = ""
- lenght_uname = random.randint(5,20)
- for i in range(lenght_uname):
- username += random.choice(chars)
- return f"{username},{password}"
- out = generateAuthData()
- with open("authdata","w+") as file:
- file.write(out)
- print("FTP AuthData has been generated and writed to file 'authdata'")
|