So you might be wondering who begins day 2 without day1 but....I am that random idiot to lazy to write day 1.So today, I am going to continue with what I started in day 1(to be released maybe never). And that is yes you guessed it a I don't even know what to call it but, a program which verifies the user of the computer in real time to prevent others from prolonged usage of your machine. I know this sounds like a very stupid idea but believe me, if you knew where I was coming from this would be the best idea you could have thought of.
HOW IT IS SUPPOSED TO WORK
So basically, it checks the current user of said machine in real time by means of password verification. So, upon startup, it will run without the user's knowledge and every hour it will ask the password to verify the user. Here, in which case it will have high priority which prevents the user from closing the program or minimizing it or switching to another and things of that sort .And if the user doesn't input the correct password, the machine would shut down.
from tkinter import *
import subprocess
window = Tk()
window.title("WhO YoU")
window.config(background="black")
q = 'IDK'
entry = Entry(window,
fg='#00FF00',
bg='black',
font=('Arial',30))
entry.pack(side=RIGHT)
def d():
y = entry.get()
if y != q:
subprocess.run('shutdown /s', shell=True)
else:
print('Didnt know you were chill like that')
u = Button(window,
text='Enter',
fg='#00FF00',
bg='black',
command=d)
u.pack(side=BOTTOM )
t = Label(window,
text='What is the password:',
font=('Arial',15),
fg='#00FF00',
bg='black')
t.pack(side=LEFT)
window.mainloop()
ADDITIONAL FEATURES
Obviously, from the look of things this project is barely near completion. So I as the idiot programmer I am think it needs the following,
The password changing after every check to ensure full security.
Run in the background while using a thread different from the main.
To those who made it all the way here like bro go find something better to do with your life and if you have any questions, you should probably use chat-gpt or something like that. I aint capable of answering your question. And if you have any suggestions please leave it down belove or forever hold your peace.
Thank You For Your Time And Have A Good One
Top comments (0)