Skip to content

Instantly share code, notes, and snippets.

@AllocBlock
AllocBlock / password_generator.py
Created March 5, 2024 16:34
Password Generator
import random
class PasswordGenerator:
def __init__(self, allowSpecialChar = True, allowConfusingSymbol = False) -> None:
numbers = [chr(i) for i in range(ord('0'), ord('9') + 1)]
lowerCases = [chr(i) for i in range(ord('a'), ord('z') + 1)]
upperCases = [chr(i) for i in range(ord('A'), ord('Z') + 1)]
specials = list("~!@#$%^&*_")
if not allowConfusingSymbol: