Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

password manager python with min and max pass lenght

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

Length_of_password_min = int(input("What should be the minimum length of your password:- "))

Length_of_password_max = int(input("What should be the minimum length of your password:- "))

def generate_password():
    password_min = Length_of_password_min
    password_max = Length_of_password_max
    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 = Length_of_password_min
    password_max = Length_of_password_max
    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 = Length_of_password_min
    password_max = Length_of_password_max
    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("Generate A Secure Password")
window.geometry("1920x1080")
window.minsize(1000, 600)
window.wm_attributes("-topmost", 1)
window.configure(bg = '#4065A4')

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



salut = Label(frame, text="Your generated password will be showed here:", 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="Press the button below to generate a password with letters, punctuations and special characters", font=("Helvetica", 20), bg='#4065A4', fg='white')
Moche.pack()

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

Moche = Label(frame, text="Press the button below to generate a password with only letters", font=("Helvetica", 20), bg='#4065A4', fg='white')
Moche.pack()

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

Moche = Label(frame, text="Press the button below to generate a password with letters and numbers", font=("Helvetica", 20), bg='#4065A4', fg='white')
Moche.pack()

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

Moche = Label(frame, text="", font=("Helvetica", 20), bg='#4065A4', fg='white')
Moche.pack()

Moche = Label(frame, text="Password generator made by Luca.", font=("Helvetica", 20), bg='#4065A4', fg='white')
Moche.pack()

frame.pack(expand=YES)


window.mainloop()
Comment

PREVIOUS NEXT
Code Example
Python :: python timeit commandline example 
Python :: django return only part of string 
Python :: access to numbers in classification_report - sklearn 
Python :: check column type pandas 
Python :: sort list of dictionaries by key python 
Python :: python datetime minus 1 day 
Python :: program to calculate the volume of sphere python 
Python :: heatmap(df_train.corr()) 
Python :: create folders in python 
Python :: find out current datetime in python 
Python :: python tkinter fullscreen 
Python :: scikit learn ridge classifier 
Python :: python parser txt to excel 
Python :: python dict to url params 
Python :: python how to get html code from url 
Python :: python has duplicates 
Python :: change column name df 
Python :: bail bond cowboys 
Python :: python magic windows error 
Python :: How do you create and update One2Many and Many2Many records with Python 3? 
Python :: choose random index from list python 
Python :: sns scatter plot 
Python :: python selenium itemprop 
Python :: is there a replacement for ternary operator in python 
Python :: neural network without training return same output with random biases 
Python :: how to install threading module in python 
Python :: import c# dll in python 
Python :: how to save model to a file python 
Python :: python convert twitter id to date 
Python :: change size of yticks python 
ADD CONTENT
Topic
Content
Source link
Name
3+2 =