Hi ππ
In this post, I will share a simple idea with you.
This idea about password generation is that we will use a password to generate a password like this.
for ex:
abc123/* -> cwy572<>
As you can see, the password contains similar content to each
other
import string
from random import choice
def generate_like_this(password):
password_content = [
string.digits,
string.punctuation,
string.ascii_lowercase,
string.ascii_uppercase
]
new_pass = ''
for p_char in password:
for p_list in password_content:
if p_char in p_list:
new_pass += choice(p_list)
return new_pass
result = generate_like_this('abc123/*')
print(result)
Top comments (0)