Skip to main content

No project description provided

Project description

whex

Hex dump library for Python, written in Rust.

Reads a binary file and returns its hex representation as a list of strings. Each line contains an offset, hex bytes, and printable ASCII characters.


Installation

pip install whexx

Usage

import whex

lines = whex.create_dump("file.bin")
for line in lines:
    print(line)

Output:

00000000: 7F 45 4C 46 02 01 01 00 00 00 00 00 00 00 00 00  | .ELF............
00000010: 02 00 3E 00 01 00 00 00 00 10 40 00 00 00 00 00  | ..>.......@.....

API

create_dump(filename, row_size=16, max_lines=None)

Parameter Type Default Description
filename str Path to the file
row_size int 16 Number of bytes per line
max_lines int | None None Maximum number of lines to return

Returns list[str].


Requirements

  • Python 3.8+

License

MIT



whex

Библиотека hex-дампа для Python, написанная на Rust.

Читает бинарный файл и возвращает его hex-представление в виде списка строк. Каждая строка содержит смещение, байты в hex и печатаемые ASCII-символы.


Установка

pip install whexx

Использование

import whex

lines = whex.create_dump("file.bin")
for line in lines:
    print(line)

Вывод:

00000000: 7F 45 4C 46 02 01 01 00 00 00 00 00 00 00 00 00  | .ELF............
00000010: 02 00 3E 00 01 00 00 00 00 10 40 00 00 00 00 00  | ..>.......@.....

API

create_dump(filename, row_size=16, max_lines=None)

Параметр Тип По умолчанию Описание
filename str Путь к файлу
row_size int 16 Количество байт в одной строке
max_lines int | None None Максимальное количество строк вывода

Возвращает list[str].


Требования

  • Python 3.8+

Лицензия

MIT

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

whexx-0.1.1-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (236.8 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.17+ x86-64

whexx-0.1.1-cp312-cp312-win_amd64.whl (105.6 kB view details)

Uploaded CPython 3.12Windows x86-64

whexx-0.1.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (236.6 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

whexx-0.1.1-cp39-cp39-manylinux_2_17_x86_64.whl (239.5 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

File details

Details for the file whexx-0.1.1-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for whexx-0.1.1-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bd8f162e5d8926def4bb5883d75e98387775181a303458d41c1ff0df7353e96c
MD5 44be725702ea4bb42f90478983fa7d7f
BLAKE2b-256 db19167986e7b393beaeb1d55c49b5cb4cabc129dc8101f8038a8c535b1939fd

See more details on using hashes here.

File details

Details for the file whexx-0.1.1-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: whexx-0.1.1-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 105.6 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.0

File hashes

Hashes for whexx-0.1.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 2672154bd2c2199816cda8c39e4d7ec2de5735685499cb7a74d5b9a49a576d20
MD5 399916e443fffe34b2e81245524d54f5
BLAKE2b-256 c3329bd3b2a4c3837e596e4dec627401a11d4e5a3ebad24035c98ff53aab471e

See more details on using hashes here.

File details

Details for the file whexx-0.1.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for whexx-0.1.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 950f1de49b43fc1a7f9c1c850da9b3f10d57e5a58454f2b329c6766f5b3f16bd
MD5 e8d5fee9d633b6bab1105869f1e8eb3d
BLAKE2b-256 f0c1dded2d9b0e23241970cb0826e331fe05b5f8396f0f86b6aec15792396c77

See more details on using hashes here.

File details

Details for the file whexx-0.1.1-cp39-cp39-manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for whexx-0.1.1-cp39-cp39-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 f6b8a1cd29fae4980598fd239484b02a5af4451ccccbe0af1e007ce35a28a39c
MD5 8d80a4374eb1e814d2e270e83a940b67
BLAKE2b-256 4f98d22c035585d526aa8a9acb302c5e330d7848049c4478da5c016572b7adb3

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