Skip to main content

How to create Folder Lock with Password Protected using Python


Python Blog #Author: ManishHacker1

Hello guys, Today we will be learn how to create folder lock with password protected using Python programming language.

What is Folder Lock?

Folder Lock is a data security software that is allows its users to encrypt thier files and folder. Lock, hide and password protects files and folder on your computer. You can use Folder Lock to secure your files and folder on windows.

So, I am going to tell you how to make your own Folder Lock, without using any software.

Pre-Reuisites:

You will need only pyhton installed in your operating system. if you want to distribute your Folder Lock then you will be also need pyinstaller using to convert our python file to .exe file.

Compatibility:

Compatible with any Microsoft Windows Operating system.

Instructions:

First open your python IDE or Notepad, where you want to write code. If you use to notepad please remember indentation using to write code.
Or copy the following code and paste in your python IDE or Notepad and save as anyname.py. Where ".py" is our file extension.

Step For Coding

Full code:


#Aythor : ManishHacker1
#Follow on FB: https://www.facebook.com/ManishHacker1
#Follow on Insta: https://www.instagram.com/manishhacker19889/
#Follow on Insta: https://www.instagram.com/krypsec
#Follow on Insta: https://www.instagram.com/kryptora
import base64
import os
import time
import sys

pw = "password"   #Dedault Password
encode = base64.b64encode(pw)

def goto(linenum):
    global line
    line = linenum

line = 1
while True:
    pw = str(raw_input("Enter your password for Lock or Unlock your folder: "))

    if pw == base64.b64decode(encode):
    # Change Dir Path where you have Locker Folder
        os.chdir("F:\Studend\Python\Advanced\Password")
    # If Locker folder or Recycle bin does not exist then we will be create Locker Folder 
        if not os.path.exists("Locker"):
            if not os.path.exists("Locker.{645ff040-5081-101b-9f08-00aa002f954e}"):
                os.mkdir("Locker")
            else:
                os.popen('attrib -h Locker.{645ff040-5081-101b-9f08-00aa002f954e}')
                os.rename("Locker.{645ff040-5081-101b-9f08-00aa002f954e}","Locker")
                sys.exit()
        else:
            os.rename("Locker","Locker.{645ff040-5081-101b-9f08-00aa002f954e}")
            os.popen('attrib +h Locker.{645ff040-5081-101b-9f08-00aa002f954e}')
            sys.exit()
        
    else:
        print "Wrong password!, Please Enter right password"
        time.sleep(5)
        goto(1)

The above code have dafault password is "password". If you want to set your own desired password then change password. In my code my dafult password is "password".

How to use:

After that run your code and enter your default password. This will be create a Locker Folder in your drive where you want to create. If you want to create Locker folder in your "F:\" drive then change directory path in our code. In my case, My directory path is "F:\Studend\Python\Advanced\Password". Where my Locker folder is created.

After that put your secret file and folder in your Locker Folder and again run your code. Voilaaa!!!

This code will be create password protected folder and also become convert in recyle bin. After that certainly automatically will hide in your hard-drive.If you want unlock your Locker Folder. Again run your code and enter your desired password. If password is correct then you can access your secret files and folder.

Now the Deploy

Well, we have done all work for Folder Lock. Now we are going to use pyinstaller to convert it to an exe file so we can easily run it on their computer.

Now, We will be download pyinstaller using pip. Open your command prompt and type:


c:\Users\Administrator>cd\      and hit enter
c:\>cd Python27      and hit enter
c:\Python27>cd Scripts     and hit enter
c:\Python27\Scripts>pip install pyinstaller         and hit enter

After installation pyinstaller, Go to your program’s directory and run:

pyinstaller Locker.py --onefile --noconsole --ico=anyimage.ico keylogger.py

  • --onefile -> to make it just a single executable
  • --noconsole -> to prevent a console window from popping up
  • --ico -> .ico image to make it more convincing

Note:

Important think is that, you can run your script from any location in your computer where you want.

Thank You for reading this article.I hope you enjoyed it. If any query please comment. And also like my FB page givin below link and share it.

Kryptora Digital Security Provided Python Training and Ethical Hacking Training
  • Best Python Training in Noida
  • Best Python Training in Delhi
  • Best Python Training in Meerut
  • Best Python Training in India
  • Best Ethical Hacking Training in Noida
  • Best Ethical Hacking Training in Delhi
  • Best Ethical Hacking Training in Meerut
  • Best Ethical Hacking Training in India

Follow ManishHacker1

Comments

Post a Comment

Popular posts from this blog

How to Connect Window Machine to Linux Machine Using Python via SSH

Python Secret #Author: ManishHacker1 Hello everyone, This is my another article about SSH connectivity to the client machine. In my previous article we have some trouble using pxssh module on windows machine. That's why I am writing another article for the SSH connection. In this article we will use paramiko module to connect another machine. This is fully supported windows, Mac and Linux machine users. In this article, I will show you how to use Paramiko SSH (a Python SSH library) to connect and gather information from another Machine. What is Paramiko? Paramiko is a Python (2.6+, 3.3+) implementation of the SSHv2 protocol [1], providing both client and server functionality. While it leverages a Python C extension for low level cryptography (Cryptography), Paramiko itself is a pure Python interface around SSH networking concepts. Read Full Documentation Let start our demonstration: Requirment: Paramiko( For SSH connection) How to Install paramilko modu...

How to Create MD5 Brute Force Script Using Python

Python Secret #Author: ManishHacker1 How to Create MD5 Brute Force Script Using Python Hello guys, Today we will be learn How to create MD5 brute force script using Python. What is brute-force Attack? Brute-force attack also known exhaustive key search Process of checking all possible keys Using a dictionary to attack with Dictionary is usually more effective than searching the whole key space. Exponentially grow with increasing key size. Brute force Attack Limit Because time/energy required to crack a key grows exponentially with key size, encryption in today's standards and computing power are safe brute-force attack. A 256 bit key would take on 50 of today's super computer 3x10^51 years What is Dictionary Attack Much faster than a whole key space search Not guaranteed Commonaly used on passwords Dictionaries can be found online A popular one is darkc0de.lst Good to run before a big dictionary like darkc0de. Can eliminate the most com...