Answers for "python password manager"

10

password generator python

import string
from random import *
characters = string.ascii_letters + string.punctuation  + string.digits
password =  "".join(choice(characters) for x in range(randint(8, 16)))
print password
Posted by: Guest on July-26-2020
5

python password generator

import random
chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!@£$%^&*().,?0123456789'

number = input('Please enter a number of passwords.')
try:
    number = int(number)
except:
    print("Error, please enter a number!")

length = input('Length of password?')
try:
    length = int(length)
except:
    print("Error, please enter a number!")

print('nHere are your password(s):')

for pwd in range(number):
  password = ''
  for c in range(length):
    password += random.choice(chars)
  print(password)
Posted by: Guest on July-04-2020
1

how to generate password in python efficiently

import random
letters = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']
numbers = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']
symbols = ['!', '#', '$', '%', '&', '(', ')', '*', '+']
print("Welcome to the PyPassword Generator!")
nr_letters = int(input("How many letters would you like in your password?n")) 
nr_symbols = int(input(f"How many symbols would you like?n"))
nr_numbers = int(input(f"How many numbers would you like?n"))
password_list = []
for char in range(1, nr_letters + 1):
  password_list.append(random.choice(letters))
for char in range(1, nr_symbols + 1):
  password_list += random.choice(symbols)
for char in range(1, nr_numbers + 1):
  password_list += random.choice(numbers)

random.shuffle(password_list)
password = ""
for char in password_list:
  password += char
print(f"Your password is: {password}")
Posted by: Guest on August-09-2021
2

password python

from tkinter import *
import string
from random import randint, choice

def generate_password():
    password_min = 8
    password_max = 8
    all_chars = string.ascii_letters + string.punctuation + string.digits
    password = "".join(choice(all_chars) for x in range (randint(password_min, password_max)))
    password_entry.delete(0, END)
    password_entry.insert(0, password)

def generate_password2():
    password_min = 8
    password_max = 8
    all_chars = string.ascii_letters
    password = "".join(choice(all_chars) for x in range (randint(password_min, password_max)))
    password_entry.delete(0, END)
    password_entry.insert(0, password)

def generate_password3():
    password_min = 8
    password_max = 8
    all_chars = string.ascii_letters + string.digits
    password = "".join(choice(all_chars) for x in range (randint(password_min, password_max)))
    password_entry.delete(0, END)
    password_entry.insert(0, password)



window = Tk()
window.title("Generateur de mdp")
window.geometry("720x480")
window.minsize(1000, 600)
window.wm_attributes("-topmost", 1)
window.configure(bg = '#4065A4')

frame = Frame(window, bg='#4065A4')



salut = Label(frame, text="Le mdp va etre generer ici", font=("Helvetica", 20), bg='#4065A4', fg='white')
salut.pack()

password_entry = Entry(frame, text="Mot de passe", font=("Helvetica", 20), bg='#4065A4', fg='white')
password_entry.pack()

Moche = Label(frame, text="Appuyez sur le boutton ci-dessous pour générer un mdp avec des lettres, ponctuations et caracteres speciaux", font=("Helvetica", 20), bg='#4065A4', fg='white')
Moche.pack()

button = Button(frame, text="generer", font=("Helvetica", 20), bg='#4065A4', fg='red', command=generate_password)
button.pack(fill=X)

Moche = Label(frame, text="Appuyez sur le boutton ci-dessous pour générer un mdp avec uniquement des lettres", font=("Helvetica", 20), bg='#4065A4', fg='white')
Moche.pack()

button = Button(frame, text="generer", font=("Helvetica", 20), bg='#4065A4', fg='red', command=generate_password2)
button.pack(fill=X)

Moche = Label(frame, text="Appuyez sur le boutton ci-dessous pour générer un mdp avec des lettres et des chiffres", font=("Helvetica", 20), bg='#4065A4', fg='white')
Moche.pack()

button = Button(frame, text="generer", font=("Helvetica", 20), bg='#4065A4', fg='red', command=generate_password3)
button.pack(fill=X)

frame.pack(expand=YES)


window.mainloop()
Posted by: Guest on November-04-2021

Code answers related to "python password manager"

Python Answers by Framework

Browse Popular Code Answers by Language