Skip to main content

This package read binary file to get all strings or read it like a hexareader.

Project description

BinaryFileReader

Description

This package read binary file to get all strings or read it like a hexareader.

Requirements

This package require :

  • python3
  • python3 Standard Library

Installation

pip install BinaryFileReader

Launcher

Command line:

GetStrings -h # get help message
GetStrings test.bin # get strings in test.bin
GetStrings -m 7 -M 1 test.dump # get strings with minimum length of 7 characters and with one non printable character between characters
HexaReader test.bin # Read test.bin as hexadecimal and ascii printable

Python script

from BinaryFileReader import Strings, HexaReader

hexareader = HexaReader("test.bin")
for line in hexareader.reader():
    print(line)

strings = Strings("test.bin")
for line in strings.reader():
    print(line)

strings = Strings("test.dmp", chars=b"abcdeABCDE0123./$", minimum_chars=7, number_bad_chars=1, accepted_bad_chars=b'\x00', encoding="latin1")
for line in strings.reader():
    print(line)

Python executable:

python3 BinaryFileReader.pyz strings -m 7 -M 1 test.dump
python3 BinaryFileReader.pyz strings test.bin

# OR
chmod u+x BinaryFileReader.pyz # add execute rights
./BinaryFileReader.pyz hexareader test.bin # execute file

Python module (command line):

python3 -m BinaryFileReader hexareader test.bin
python3 -m BinaryFileReader.Strings -m 7 -M 1 test.dump

Links

Licence

Licensed under the GPL, version 3.

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

BinaryFileReader-0.0.1.tar.gz (18.4 kB view details)

Uploaded Source

File details

Details for the file BinaryFileReader-0.0.1.tar.gz.

File metadata

  • Download URL: BinaryFileReader-0.0.1.tar.gz
  • Upload date:
  • Size: 18.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.1+

File hashes

Hashes for BinaryFileReader-0.0.1.tar.gz
Algorithm Hash digest
SHA256 6bfd97f4aec4ddc5810e969704c6ddffb539faedfa4df65e33fda6000b49be28
MD5 e81ab09a2c8247b29655d15fff668721
BLAKE2b-256 03c8ed4eb6c21944a0714a4678f89ff243effe99efddc70bee76e398bb559677

See more details on using hashes here.

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