Skip to main content

CTI tool to extract and hash images from websites

Project description

Pixhash

PyPI version License: MIT

Pixhash is a simple Cyber Threat Intelligence (CTI) tool that extracts all images from a webpage (including those referenced in CSS) and calculate their hashes.

Disclaimer

Pixhash is provided solely for legitimate security research, threat intelligence, and defensive purposes. The author and contributors are not responsible for any damage, legal liability, or other consequences arising from improper or malicious use of this tool.

Installation

Install from PyPI:

pip install pixhash

Or install directly from Github:

pip install git+https://github.com/fwalbuloushi/pixhash.git

Usage

After installation, the pixhash command is available:

pixhash [OPTIONS] URL

Options

Flag Description
-t, --timeout TIMEOUT Network timeout in seconds (default: 10.0)
--algo {sha256,sha1,md5} Hash algorithm to use (default: sha256)
--agent {desktop,mobile} User-Agent type (default: desktop)
--delay DELAY Seconds to wait between each HTTP request (default: 0)
-h, --help Show this help message

Examples

Basic usage with default settings:

pixhash https://example.com

Set a 5-second timeout and use MD5:

pixhash https://example.com -t 5 --algo md5

Slow down requests by 2 seconds and pretend to be a mobile browser:

pixhash https://example.com --delay 2 --agent mobile

[!IMPORTANT] If your URL’s query string uses the & separator, wrap it in single quotes so your shell doesn’t treat & as the background operator.

pixhash 'https://example.com/page?foo=1&bar=2' --delay 5

How it works

  1. Fetches the HTML of the page you specify.

  2. Parses all , tags, CSS url(...) references (inline & external), Open Graph images, and icons.

  3. Downloads each resource (respecting your timeout and delay).

  4. Hashes the raw image bytes using your chosen algorithm.

  5. Prints each image’s full URL and its calculated hash.

License

This project is licensed under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pixhash-1.0.0.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pixhash-1.0.0-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file pixhash-1.0.0.tar.gz.

File metadata

  • Download URL: pixhash-1.0.0.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for pixhash-1.0.0.tar.gz
Algorithm Hash digest
SHA256 d344d9fefc57d7f1534cd70a9d1d5e3b53edfc953daa1f3481a65bc0faa1613b
MD5 b7a9262e33c1e6130a43a810aca89e1b
BLAKE2b-256 663eeb6aaa8e43ddfaae1e53e67b0151706759c048566c916a4345f3eb9a71f2

See more details on using hashes here.

File details

Details for the file pixhash-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: pixhash-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for pixhash-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e745a2172f959da8fc56f82349c23196284d6dcf463a5eefaad04ee85fe7df42
MD5 63055cda9e212f91d5efb52e67dbf9a4
BLAKE2b-256 f6cc02bb86c4d94b111e87ab99c9c152233cfde568a7f05ec2d9849fb206c498

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page