Skip to main content

EAGLE

Photo EXIF & GPS Location Extraction Utility

An OSINT and digital forensics utility that rips open raw image headers, extracts deep EXIF metadata, camera hardware specs, and precise GPS coordinates, reverse-geocodes the location, and outputs structured intelligence to the terminal, JSON, or an interactive web map.

PyPI Python FastAPI Leaflet Pillow HEIF MIT License

Eagle Logo

Eagle Demo


⚡ Quick Start: Command-Line Interface (CLI)

Eagle is distributed on PyPI as eagle-x and provides the eagle command-line tool.

Installation

pip install eagle-x

Basic Hunting

Analyze any local image on your filesystem:

eagle hunt photo.jpg

Example Output:

╔══════════════════════════════════════════════════════════╗
║                          EAGLE                           ║
║              IMAGE INTELLIGENCE & FORENSICS              ║
╚══════════════════════════════════════════════════════════╝

FILE ───────────────────────────────────────────────────────
  Name        : photo.jpg
  Size        : 4.82 MB (5,054,144 bytes)
  Format      : JPEG
  MIME Type   : image/jpeg
  Dimensions  : 4032 × 3024 px
  Megapixels  : 12.19 MP
  Color Mode  : RGB

CAMERA ─────────────────────────────────────────────────────
  Make        : Apple
  Model       : iPhone 15 Pro
  Lens        : iPhone 15 Pro back triple camera 6.76mm f/1.78
  Software    : 17.5.1

EXPOSURE ───────────────────────────────────────────────────
  Date/Time   : 2024:06:15 14:32:08
  Shutter     : 1/120 s
  Aperture    : f/1.8
  ISO         : ISO 64
  Focal Length: 6.8 mm
  35mm Equiv  : 24 mm
  Flash       : Flash did not fire
  White Bal.  : Auto
  Metering    : Pattern / Multi-Segment
  Program     : Normal / Program AE

LOCATION ───────────────────────────────────────────────────
  GPS Status  : Available
  Latitude    : 37.774900° (37° 46' 29.64" N)
  Longitude   : -122.419400° (122° 25' 09.84" W)
  Altitude    : 15.2 m (49.9 ft)
  GPS Time    : 2024:06:15 21:32:08 UTC
  Geocoding   : Disabled (use --geocode to resolve address)

EXIF ───────────────────────────────────────────────────────
  Total Tags  : 42 extracted
  Top Tags    :
    - [0x010F] Make                    : Apple
    - [0x0110] Model                   : iPhone 15 Pro
    - [0x9003] DateTimeOriginal        : 2024:06:15 14:32:08
    ... and 39 more tags (use --json to view all)
────────────────────────────────────────────────────────────
Analysis complete.

Automation & Machine-Readable Output (--json)

Output clean, structured JSON to stdout for piping into scripts, security workflows, or jq:

eagle hunt photo.jpg --json
{
  "filename": "photo.jpg",
  "has_gps": true,
  "latitude": 37.7749,
  "longitude": -122.4194,
  "file_info": {
    "file_size_bytes": 5054144,
    "formatted_file_size": "4.82 MB",
    "format": "JPEG",
    "mime_type": "image/jpeg",
    "width": 4032,
    "height": 3024,
    "megapixels": 12.19,
    "color_mode": "RGB"
  },
  "camera_info": {
    "make": "Apple",
    "model": "iPhone 15 Pro",
    "lens_model": "iPhone 15 Pro back triple camera 6.76mm f/1.78",
    "software": "17.5.1"
  },
  "exposure_info": { ... },
  "gps_info": { ... },
  "raw_exif": [ ... ]
}

Optional Reverse Geocoding (--geocode)

Resolve GPS coordinates into a human-readable street/city/country address via OpenStreetMap Nominatim:

eagle hunt photo.jpg --geocode

Development Invocation (Source Checkout)

Run Eagle directly from the repository without installation:

python -m eagle hunt path/to/image.jpg

🔒 Privacy & Security

  • 100% Local by Default: eagle hunt runs entirely on your local machine. No image data or metadata is ever uploaded or transmitted over the network.
  • Optional Geocoding: Only when --geocode is explicitly passed will Eagle make an HTTPS request to OpenStreetMap Nominatim with the extracted coordinates.
  • Decompression Bomb Protection: Input images exceeding 100 Megapixels are rejected to prevent memory exhaustion attacks.
  • Safe Parsing: Binary tags and malformed EXIF data are sanitized to prevent crashes or terminal corruption.

📸 Supported Formats & Features

Category Supported Data
Image Formats JPEG / JPG, PNG, HEIC / HEIF, TIFF, WebP, BMP
File Attributes Dimensions, File Size, Megapixels, Color Mode, MIME type
Camera Hardware Manufacturer / Make, Model, Lens Model, Firmware / Software
Exposure Settings Timestamp, Shutter Speed, Aperture, ISO, Focal Length (incl. 35mm), Exposure Bias, Flash, White Balance, Metering Mode, Exposure Program
GPS Coordinates Latitude & Longitude (Decimal & DMS), Altitude, GPS Timestamp
Raw EXIF IFDs Standard 0th IFD, ExifOffset Sub-IFD, GPS IFD

🐍 Python Library Usage

from eagle import analyze_image_file

# Analyze local image
result = analyze_image_file("photo.jpg", geocode=False)

print(f"Camera: {result.camera_info.make} {result.camera_info.model}")
if result.has_gps:
    print(f"Coordinates: {result.latitude}, {result.longitude}")

🌐 Web Application Setup

If you prefer the graphical user interface with the interactive Leaflet map:

1. Setup Backend

Pop open a terminal, hop into the backend directory, and create an isolated environment:

cd backend
python -m venv .venv

# Activate environment:
# Windows (PowerShell):
.venv\Scripts\Activate.ps1
# Linux / macOS:
source .venv/bin/activate

# Install dependencies and start server
pip install -r requirements.txt
uvicorn app.main:app --reload --port 8000

Your backend is listening at http://localhost:8000 (Swagger docs at http://localhost:8000/docs).

2. Setup Frontend

In a second terminal window:

cd frontend
npm install
npm run dev

Open http://localhost:5173 in your browser, drag and drop an image, and inspect the forensics and map.


📄 License

This project is open-source and available under the MIT License.

Metadata

Release files for eagle-x 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for eagle-x 1.0.0
File Size Uploaded
eagle_x-1.0.0.tar.gz 15.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for eagle-x 1.0.0
File Interpreter ABI Platform
eagle_x-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 34.3 kB

Release files / eagle_x-1.0.0.tar.gz

Download URL eagle_x-1.0.0.tar.gz
Size 15.6 kB
Tags Source
SHA-256 checksum
How to use checksums
46c4a9749d20a100adc2bd9545a5c2c488eefde263b462e373489d6a02fa056e
BLAKE2b-256 checksum
How to use checksums
e0b1031d43fe8774fb8c68f63f179f5073c6010c22c6c2f1db1fb5f3996ea40d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.15

Release files / eagle_x-1.0.0-py3-none-any.whl

Download URL eagle_x-1.0.0-py3-none-any.whl
Size 18.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
25d75c6b279dc9906607b808a15a0e68ed94134a4353c225652835b460753d60
BLAKE2b-256 checksum
How to use checksums
427a3be9f89013ac3ca2d59834f576c3614d02f2683c3808d2d876b5e293054b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.15

Release history Release notifications | RSS feed

1.0.1

2 release files

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page