How to create Folder Lock with Password Protected using Python
क्या होता है Folder Lock ?
क्या जरूरी है प्रोजेक्ट के लिए?
वैसे इस प्रोजेक्ट के लिए सिम्पली आपके कंप्यूटर /लैपटॉप में सिर्फ पाइथन इनस्टॉल होना चाहिए| लेकिन अगर आप बिगिनर यानी आप पाइथन में नए है तो ये स्टेप को फॉलो करे
- सबसे पहले अपने कंप्यूटर में पाइथन को इनस्टॉल करे|
- एक अच्छा IDE इनस्टॉल करें जिसमें आप पाइथन की Coding करेंगे|
कैसे शुरू करे ?
- सबसे पहले अपना IDE Open करे जिसमें आप Python की Coding करेंगे, मै Recommend करूंगा की आप Microsoft का VScode उपयोग करे|
- अब नीचे दिए गए Code कॉपी करके अपने IDE में Paste करे और (.py) extension के साथ Save करे|
.Exe कैसे बनाये | How to Deploy
pip install pyinstaller
pyinstaller Locker.py
--onefile --noconsole --ico=anyimage.ico keylogger.py
What is Folder Lock ?
Folder Lock is a program that protects the specified folder with a password and does not allow to access to the folder when the correct password is not entered. As if the correct password is entered, it allows access to the folder.
So, today we will make a folder locking project with the help of Python.
What is needed/Requirements for the project?
By the way, for this project, you should simply have only Python installed in your computer / laptop. But if you are a beginner means you are new to Python then follow this step.
How to start ?
- First of all open your IDE in which you will coding Python, I would recommend that you use Microsoft's VScode.
- Now copy the code given below and paste it in your IDE and save it with (.py) extension.
How to make .exe file | How to Deploy
pip install pyinstaller
pyinstaller Locker.py --onefile --noconsole --ico=anyimage.ico keylogger.py
import base64
import os
import time
import sys
pw = "password" #Dedault Password def goto(linenum):
global line
line = linenum
line = 1 while True:
pw = input("Enter your password for Lock or Unlock your folder:
")
if pw == pw:
os.chdir("C:/Users/NAV/Desktop/New folder/Password")
print ("Your path Successfully Changed")
#
If Locker folder or Recycle bin does not exist then we will be create Locker
Folder if not os.path.exists(r"C:/Users/NAV/Desktop/New folder/Password/Locker"):
if not
os.path.exists("Locker.{645ff040-5081-101b-9f08-00aa002f954e}"): os.mkdir("Locker") print ("Locker Folder
Successfully created")
else: os.popen('attrib -h -s -r
Locker')
os.rename("Locker.{645ff040-5081-101b-9f08-00aa002f954e}","Locker") print ("Locker Folder
has been Successfully Unlocked") sys.exit()
else:
os.rename("Locker","Locker.{645ff040-5081-101b-9f08-00aa002f954e}")
os.popen('attrib +h +s +r Locker.{645ff040-5081-101b-9f08-00aa002f954e}')
print("Locker folder has been successfully locked")
sys.exit()
else:
print ("Wrong password! ,Please Enter right password")
time.sleep(5)
goto(1) |
Post a Comment