Skip to content

Random-Pikachu/SecurePDF

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 

Repository files navigation

SecurePDF

A standalone offline Digital Rights Management (DRM) desktop application built using Python, CustomTkinter, and AES encryption. This tool allows secure sharing and controlled viewing of PDF documents, with features to restrict printing, copying, and unauthorized access.

💻 Tech Stack

  • Python
  • CustomTkinter
  • PyMuPDF (fitz)
  • Cryptography

📁 Folder Structure

DRM
├── .gitignore
├── Readme.md
├── appfile
│   ├── app.py      #Main entry point
│   ├── decryptor.py #File: Decryption Logic
│   ├── decryptorView.py #GUI for file decryption window
│   ├── encryptor.py    #File: Encryption Logic
│   ├── senderView.py   #GUI for encryption window
│   ├── viewer.py   #GUI window for PDF Viewer
├── requirements.txt

⚒ How it Works

  • Admin encrypts the PDF and embeds metadata (Password, Access Time)
  • The application return a .drm package.
  • When the recipient opens the .drm file using the application:
    • On the first open, the user is prompted for a password.
    • Upon successful authentication, the device's MAC address is registered.
    • For all future accesses, the app verifies the MAC address and access time before opening the file.

🛡️ Features

  • Offline DRM enforcement
  • AES Based PDF Encryption
  • File access restricted to assigned MAC Address and assigned time period
  • Builtin PDF Viewer
    • Avoids Text Copy
    • Avoid Content Printing

🚀 Getting Started

🎯 Prerequisites

1. Python
2. Virtual Enviroment (optional but required)

📩 Installation

1. Clone the repository

git clone https://github.com/zorro1107/DRM.git
cd DRM

2. Create Virtual Enviroment

python -m venv .env

#Activate (Windows)
.env\Scripts\activate

#Activate (MacOS/Linux)
source .env/bin/activate

3. Install Libraries

pip install -r requirements.txt

4. Run the files

cd appfile
python app.py
Made with ❤