|
| 1 | +--- |
| 2 | +title: 2PAC Picture Analyzer & Corruption Killer |
| 3 | +emoji: 🔫 |
| 4 | +colorFrom: purple |
| 5 | +colorTo: blue |
| 6 | +sdk: gradio |
| 7 | +sdk_version: 4.44.0 |
| 8 | +app_file: app.py |
| 9 | +pinned: false |
| 10 | +license: mit |
| 11 | +--- |
| 12 | + |
| 13 | +# 🔫 2PAC: Picture Analyzer & Corruption Killer |
| 14 | + |
| 15 | +**Advanced image security and steganography toolkit** |
| 16 | + |
| 17 | +## Features |
| 18 | + |
| 19 | +### 🔒 Hide Secret Data |
| 20 | +Invisibly hide text messages inside images using **LSB (Least Significant Bit) steganography**: |
| 21 | +- Hide text of any length (capacity depends on image size) |
| 22 | +- Optional password encryption for added security |
| 23 | +- Adjustable LSB depth (1-4 bits per channel) |
| 24 | +- PNG output preserves hidden data perfectly |
| 25 | + |
| 26 | +### 🔍 Detect & Extract Hidden Data |
| 27 | +Advanced steganography detection using **RAT Finder** technology: |
| 28 | +- **ELA (Error Level Analysis)** - Highlights compression artifacts |
| 29 | +- **LSB Analysis** - Detects randomness in least significant bits |
| 30 | +- **Histogram Analysis** - Finds statistical anomalies |
| 31 | +- **Metadata Inspection** - Checks EXIF data for suspicious tools |
| 32 | +- **Extract Data** - Recover messages hidden with this tool |
| 33 | + |
| 34 | +### 🛡️ Check Image Integrity |
| 35 | +Comprehensive image validation and corruption detection: |
| 36 | +- File format validation (JPEG, PNG, GIF, TIFF, BMP, WebP, HEIC) |
| 37 | +- Header integrity checks |
| 38 | +- Data completeness verification |
| 39 | +- Visual corruption detection (black/gray regions) |
| 40 | +- Structure validation |
| 41 | + |
| 42 | +## How It Works |
| 43 | + |
| 44 | +### LSB Steganography |
| 45 | +The tool hides data in the **least significant bits** of pixel values. Since changing the last 1-2 bits of a pixel value (e.g., changing 200 to 201) is imperceptible to the human eye, we can encode arbitrary data without visible changes to the image. |
| 46 | + |
| 47 | +**Example:** |
| 48 | +- Original pixel: RGB(156, 89, 201) = `10011100, 01011001, 11001001` |
| 49 | +- After hiding bit '1': RGB(156, 89, 201) = `10011100, 01011001, 11001001` (last bit already 1) |
| 50 | +- After hiding bit '0': RGB(156, 88, 201) = `10011100, 01011000, 11001001` (89→88) |
| 51 | + |
| 52 | +This allows hiding hundreds to thousands of bytes in a typical photo! |
| 53 | + |
| 54 | +### Steganography Detection |
| 55 | +The RAT Finder uses multiple forensic techniques: |
| 56 | + |
| 57 | +1. **ELA (Error Level Analysis)**: Re-saves the image at a known quality and compares compression artifacts. Hidden data or manipulation shows as bright areas. |
| 58 | + |
| 59 | +2. **LSB Analysis**: Statistical tests check if the least significant bits are too random (hidden data) or too uniform (natural image). |
| 60 | + |
| 61 | +3. **Histogram Analysis**: Analyzes color distribution for anomalies typical of steganography. |
| 62 | + |
| 63 | +4. **Metadata Forensics**: Checks EXIF data for steganography tools or suspicious editing history. |
| 64 | + |
| 65 | +## Usage Tips |
| 66 | + |
| 67 | +### For Hiding Data: |
| 68 | +- ✅ Use **PNG** images (JPEG compression destroys hidden data) |
| 69 | +- ✅ Larger images = more capacity |
| 70 | +- ✅ Use 1-2 bits per channel for undetectable hiding |
| 71 | +- ✅ Add password encryption for sensitive data |
| 72 | +- ⚠️ Don't re-save or edit the output image! |
| 73 | + |
| 74 | +### For Detection: |
| 75 | +- 🔍 Higher sensitivity = more thorough but more false positives |
| 76 | +- 📊 Check the ELA image for bright spots (potential hiding) |
| 77 | +- 💡 High confidence doesn't guarantee hidden data (could be compression artifacts) |
| 78 | +- 🔓 Use "Extract Data" tab if you suspect LSB steganography |
| 79 | + |
| 80 | +### For Corruption Checking: |
| 81 | +- 🛡️ Enable visual corruption check for damaged photos |
| 82 | +- ⚙️ Higher sensitivity for stricter validation |
| 83 | +- 📁 Useful before archiving important photo collections |
| 84 | + |
| 85 | +## About |
| 86 | + |
| 87 | +**2PAC** combines three powerful tools: |
| 88 | +- **LSB Steganography** engine (new!) |
| 89 | +- **RAT Finder** - Advanced steg detection |
| 90 | +- **Image Validator** - Corruption checker |
| 91 | + |
| 92 | +Created by [Richard Young](https://github.com/ricyoung) | Part of [DeepNeuro.AI](https://deepneuro.ai) |
| 93 | + |
| 94 | +🔗 **GitHub Repository:** [github.com/ricyoung/2pac](https://github.com/ricyoung/2pac) |
| 95 | +🌐 **More Tools:** [demo.deepneuro.ai](https://demo.deepneuro.ai) |
| 96 | + |
| 97 | +## Security & Privacy |
| 98 | + |
| 99 | +- ✅ All processing happens in your browser session (Hugging Face Space) |
| 100 | +- ✅ Images are not stored or logged |
| 101 | +- ✅ Temporary files are deleted after processing |
| 102 | +- ✅ Your hidden data and passwords are never saved |
| 103 | + |
| 104 | +--- |
| 105 | + |
| 106 | +*"All Eyez On Your Images" 👁️* |
0 commit comments