Skip to content

XploitMonk0x01/Metasanitize

Repository files navigation

MetaSanitize - Privacy-Focused Metadata Tool

A comprehensive metadata extraction and sanitization tool designed for privacy protection and forensic awareness.

Features

  • Multi-Format Support: Images (JPG, PNG, TIFF), Documents (PDF, DOCX), Audio (MP3, FLAC), Video (MP4, MOV)
  • Privacy Analysis: Risk scoring (0-100), GPS detection, device fingerprinting
  • Dummy Metadata Injection: Replace real metadata with realistic fake data
  • Safe Operations: Dry-run mode, automatic backups to .originals/
  • Batch Processing: Recursive folder cleaning with parallel processing
  • Modern GUI Application: Sleek, card-based interface with dark mode
  • CLI Tool: 4 commands - scan, clean, inject, diff

Installation

Windows

pip install -r requirements.txt

Linux (Ubuntu/Debian)

# Install system dependencies for video metadata support
sudo apt-get install libmediainfo-dev

# Install Python packages
pip install -r requirements.txt

Linux (Fedora/RHEL)

# Install system dependencies
sudo dnf install libmediainfo-devel

# Install Python packages
pip install -r requirements.txt

macOS

# Install system dependencies
brew install libmediainfo

# Install Python packages
pip install -r requirements.txt

Quick Start

GUI Mode (Recommended)

# Launch the graphical interface
python -m metasanitize

# Or use the launcher script
# Windows: double-click MetaSanitize.bat
# Linux/macOS: ./metasanitize.sh

GUI Features:

  • 📁 Drag & drop file support
  • �️ Modern Card Layout: Clean, organized interface
  • �🔍 One-click metadata scanning
  • 🛡️ Visual privacy risk indicator (0-100)
  • 🧹 Clean metadata with backup
  • 💉 Inject dummy metadata with profile selection
  • 📊 Interactive metadata table

CLI Mode

# Scan file and show privacy risk
python -m metasanitize cli scan photo.jpg

# Clean with safe profile (removes GPS, device info)
python -m metasanitize cli clean photo.jpg --profile safe

# Clean completely (removes ALL metadata)
python -m metasanitize cli clean photo.jpg --profile complete

# Preview changes without applying
python -m metasanitize cli clean photo.jpg --dry-run

# Batch process directory
python -m metasanitize cli clean ./photos -r --profile safe

# Inject dummy metadata (replace with fake DSLR info)
python -m metasanitize cli inject photo.jpg --device dslr

# Inject with fake GPS location
python -m metasanitize cli inject photo.jpg --device smartphone --gps --region EU

# Compare metadata between two files
python -m metasanitize cli diff original.jpg cleaned.jpg

CLI Commands

Command Description
scan Scan file and display metadata with privacy risk score
clean Remove metadata from file or directory
inject Replace metadata with realistic dummy data
diff Compare metadata between two files

Clean Profiles

  • --profile safe (default): Remove GPS, author, device info
  • --profile minimal: Keep only essential technical data
  • --profile complete: Remove ALL metadata

Inject Options

  • --device smartphone|dslr|scanner: Device profile for dummy data
  • --region US|EU|Asia: Region for fake GPS (with --gps)
  • --gps: Include fake GPS coordinates

Privacy Risk Levels

  • Critical (80-100): GPS coordinates, author names, device IDs
  • High (60-79): Software versions, edit history, thumbnails
  • Medium (40-59): Timestamps, camera settings
  • Low (0-39): Generic technical metadata

Project Structure

metasanitize/
├── core/               # Core metadata engine
├── handlers/           # Format-specific handlers
├── privacy/            # Privacy analysis and risk scoring
├── profiles/           # Dummy metadata profiles
├── cli/                # Command-line interface
├── gui/                # PySide6 graphical interface
└── utils/              # Utilities and helpers

Screenshots

GUI Application

MetaSanitize GUI

The GUI provides:

  • Visual privacy risk score with color-coded indicator
  • Metadata table with field-level risk highlighting
  • Profile selection for dummy metadata injection
  • Progress indicators for long operations

Ethical Use

This tool is designed for legitimate privacy protection. Do not use for illegal activities, evidence tampering, or identity fraud.

License

MIT License

About

A privacy-focused tool to scan, clean, and inject dummy metadata into files (Images, PDF, Video) with a modern GUI and CLI.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages