Metadata-Version: 2.4
Name: chrome-headers
Version: 2.0.0
Summary: Realistic Chrome browser header generation with TLS fingerprinting for HTTP clients
Author: nox
License: Source Available - See LICENSE
License-File: LICENSE
Keywords: browser-emulation,browser-fingerprint,chrome-headers,curl-cffi,fingerprint,headers,http-client,tls-fingerprint,x-super-properties
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Internet
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.8
Requires-Dist: curl-cffi>=0.7.0
Description-Content-Type: text/markdown

# chrome-headers

Realistic Chrome browser header generation with TLS fingerprinting for HTTP clients. Generates deterministic browser profiles with accurate headers, cookies, and client metadata — making automated HTTP requests indistinguishable from a real browser session.

## Install
```
pip install chrome-headers
```

## Features

- Deterministic `BrowserProfile` per client token (consistent UA, locale, timezone, resolution)
- Auto-fetches and caches API build numbers from live JS assets
- Fetches real fingerprint + cookies from API endpoints
- Builds accurate `X-Super-Properties` with full client metadata
- Complete header sets for REST, multipart, WebSocket, and analytics endpoints
- Pre-built payload helpers for common HTTP operations

## Usage
```python
from chrome_headers import HeaderSpoofer

spoofer = HeaderSpoofer("your_token_here")

# REST headers
headers = spoofer.get_headers()

# Custom referer + context
headers = spoofer.get_headers(
    referer="https://example.com/channels/123/456",
    context_location="chat_input",
)

# WebSocket headers
ws_headers = spoofer.get_websocket_headers()

# Multipart (file upload)
mp_headers = spoofer.get_multipart_headers("multipart/form-data; boundary=----boundary")

# Build a message payload
payload = spoofer.build_message_payload("hello world")

# Full send_message bundle (url + headers + json)
bundle = spoofer.send_message(channel_id="123456", content="hi", guild_id="789")
```

## Methods

| Method | Description |
|---|---|
| `get_headers(...)` | Standard REST headers with Authorization |
| `get_websocket_headers()` | Headers for WS upgrade handshake |
| `get_multipart_headers(content_type)` | Headers for file/multipart uploads |
| `get_analytics_headers()` | Headers for analytics endpoints |
| `fetch_fingerprint()` | Fetch and cache fingerprint + cookies |
| `refresh_build_number()` | Force re-fetch of build number |
| `build_message_payload(...)` | Message JSON with optional reply, attachments, stickers |
| `build_status_payload(...)` | Status JSON |
| `build_profile_payload(...)` | Profile patch JSON |
| `send_message(...)` | Ready-to-use `{url, headers, json}` bundle |
| `join_guild(invite_code)` | Join guild bundle |
| `add_friend(username)` | Add friend bundle |
| `patch_avatar(image_bytes)` | Avatar patch bundle |

## License

Source Available — free to use, not to steal. See [LICENSE](LICENSE).  
Made by **nox** · [github.com/pulbv](https://github.com/pulbv)