Skip to main content

Basic tools to read, filter, format and display hex values

Project description

Description

Basic tools to read, format, filter and display hex values

Installation

pip install hexlib

Usage

  • The class HexTwin is the hexadecimal representation of a file
  • The class Hexdump format and prints:
    1. HexTwin instances
    2. Lists of hex values
      • ["AA", "BB", "CC", "DD", "EE", "00"]

Example

from hexlib.HexTwin import HexTwin
from hexlib.Hexdump import Hexdump

# 1.) HexTwin instance
twin = HexTwin("path/to/file/test.txt")
dump = Hexdump()

# Activates filtering for zero rows
dump.filter(filterZeroRows=True) 
twin.printTwin(t)

# Activates filtering for non-ascii rows (Includes zero rows)
dump.filter(filterNonAsciiRows=True) 
twin.printTwin(t)

# 2.) List of hex values
a = ["AA", "BB", "CC", "DD", "EE"]
b = Hexdump()
b.printHexValues(a)

License

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 Distribution

hexlib-1.0.0.tar.gz (4.3 kB view hashes)

Uploaded Source

Built Distribution

hexlib-1.0.0-py3-none-any.whl (5.2 kB view hashes)

Uploaded Python 3

Supported by

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