Python SDK for BBEye MITM proxy decrypt scripts
Project description
BBEye Python SDK
bbeye is the Python SDK used by BBEye decrypt scripts.
It provides:
Request/ResponsewrappersResulthelpers for text, JSON, hex, and protobuf viewsconsole()for printing messages back into the BBEye consoletest()for local script debuggingpython -m bbeye your_script.pyas the runtime entrypoint used by BBEye
Install
pip install bbeye
Basic example
from bbeye import Result, console
def onResponse(response):
console("url:", response.url)
return Result.showText(response.body)
JSON example
from bbeye import Result
def onRequest(request):
return Result.showJson(request.json())
Local test
from bbeye import Result, test
def onResponse(response):
return Result.showText(response.body)
if __name__ == "__main__":
test(
onResponse,
url="https://example.com/api/demo",
body=b'{"ok":true}',
direction="response",
)
Runtime model
BBEye invokes user scripts like this:
python3 -m bbeye your_script.py
The user script should define one or both of:
onRequest(request)onResponse(response)
Each callback can return:
Result.showText(...)Result.showJson(...)Result.showHex(...)Result.showProtobuf(...)Result.error(...)
Returning raw str or bytes is also supported and will be treated as text.
API summary
Request / Response
Common properties:
urlheadersbodydirection
Common methods:
text(encoding="utf-8")json()header(name)
Result
Result.showText(data)Result.showJson(data)Result.showHex(data)Result.showProtobuf(data)Result.error(message)
Helpers
console(*args, **kwargs)test(func, url=..., headers=..., body=..., direction=...)
Publishing
For maintainers:
cd python-sdk
./publish.sh check
./publish.sh testpypi
./publish.sh pypi
Credentials should be provided via:
TWINE_USERNAME/TWINE_PASSWORD, or~/.pypirc
Project details
Release history Release notifications | RSS feed
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 bbeye-0.1.0.tar.gz.
File metadata
- Download URL: bbeye-0.1.0.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bf728533a9f4781816320dbff246e634181428f68099c82d61665861401abdc6
|
|
| MD5 |
d1e15730c8c2401a825d8c9143a65d90
|
|
| BLAKE2b-256 |
7b84076547f765ba77737684cc250281ad8a1d91b45007b08ced1c87b8a9e578
|
File details
Details for the file bbeye-0.1.0-py3-none-any.whl.
File metadata
- Download URL: bbeye-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
620367a182afedfb4723b176270a48d3b7e63b6e5716ed00bfa39493c94f58b5
|
|
| MD5 |
9bf59944ff4a446dd491140b0db83021
|
|
| BLAKE2b-256 |
5ea69b792d77505498776e7f2e0c7a14c50374028cda516dc5aee6a4ebeaa398
|