CTI tool to extract and hash images from websites
Project description
Pixhash
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
-
Fetches the HTML of the page you specify.
-
Parses all
, tags, CSS url(...) references (inline & external), Open Graph images, and icons.
-
Downloads each resource (respecting your timeout and delay).
-
Hashes the raw image bytes using your chosen algorithm.
-
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d344d9fefc57d7f1534cd70a9d1d5e3b53edfc953daa1f3481a65bc0faa1613b
|
|
| MD5 |
b7a9262e33c1e6130a43a810aca89e1b
|
|
| BLAKE2b-256 |
663eeb6aaa8e43ddfaae1e53e67b0151706759c048566c916a4345f3eb9a71f2
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e745a2172f959da8fc56f82349c23196284d6dcf463a5eefaad04ee85fe7df42
|
|
| MD5 |
63055cda9e212f91d5efb52e67dbf9a4
|
|
| BLAKE2b-256 |
f6cc02bb86c4d94b111e87ab99c9c152233cfde568a7f05ec2d9849fb206c498
|