A binary inspection and visualization tool for EXE, BIN, HEX, and Arduino files.
Project description
PyMachina
PyMachina is a powerful Python-based binary inspection and analysis tool that helps you extract, visualize, and understand the internal structure of low-level binary files such as .exe, .bin, .hex, and Arduino machine code.
It is ideal for:
- Reverse engineering learners
- Binary visualization enthusiasts
- Security researchers
- Hardware hackers and Arduino tinkerers
Features
✅ ASCII, HEX, UTF-8 and byte-level analysis ✅ Entropy measurement for randomness analysis ✅ Struct parsing of 4-byte DWORDs (little-endian) ✅ Rich visualizations using matplotlib and image export ✅ Command-line interface with Click ✅ Socket testing support ✅ Terminal visuals using Colorama, PyFiglet, and Rich ✅ Uses over 10 powerful PyPI libraries
Dependencies
PyMachina requires Python 3.7+. Below are the key libraries used:
numpymatplotlibcoloramapyfiglethexdumprichclicktqdmPillowsocket,struct,os(standard libraries)
Installation
-
Clone or download this repository to your desktop:
git clone https://github.com/EdenGithhub/PyMachina.git cd PyMachina
-
Create virtual environment (recommended):
python -m venv venv venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
Usage
Basic Command
python core.py "path/to/your/file.exe"
Example
python core.py "C:/Users/ASPIRE/Desktop/sample.exe"
This will:
- Read first 512 bytes of the file
- Print the header in ASCII and HEX
- Parse the file into 4-byte chunks
- Display ASCII, symbols, digits, entropy, byte histogram
- Visualize the binary structure in both plots and grayscale image
Help Menu
python core.py --help
Sample Output
Header Detected: b'MZ'
____ __ __ _
| _ \ _ _| \/ | __ _ ___| |__
| |_) | | | | |\/| |/ _` |/ __| '_ \
| __/| |_| | | | | (_| | (__| | | |
|_| \__, |_| |_|\__,_|\___|_| |_|
|___/
Hex Dump of first 512 bytes...
Entropy: 7.9964 bits per byte
Top 5 most common byte values:
0: 12 times
255: 9 times
...
Notes
- PyMachina will pad any input smaller than 512 bytes.
- Socket support requires running a listening TCP server on
localhost:9999 - Best used on
.exe,.bin,.hex, or Arduino bootloader dumps
License
MIT License
Author
Created with ❤️ by [Eden Simamora]. Contributions welcome! Contact : Email = aeden6877@gmail.com Github= EdenGithhub
© Eden/2025
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 pymachina-1.0.0.tar.gz.
File metadata
- Download URL: pymachina-1.0.0.tar.gz
- Upload date:
- Size: 6.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1d536c9e9eb8776feace2bf1e2fb7e6cf07120aea72b0aa74b1aa8a5fe2e7608
|
|
| MD5 |
a0c611d3a5b4504ec77ffe085fcfbe30
|
|
| BLAKE2b-256 |
5eb9367aaad552651aeed54e8b77f52fcd10a306fc6dad5c65061edb41369431
|
File details
Details for the file pymachina-1.0.0-py3-none-any.whl.
File metadata
- Download URL: pymachina-1.0.0-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
41f38dfcba9cd6339b8308e9b1bd122622cd82e27dd9e35d206c54d7a4bfa395
|
|
| MD5 |
c736edd2ac7dd12f55d554f1fa6a50e8
|
|
| BLAKE2b-256 |
edacffd31a6626aec0bef1d2a20a6aff40b7af94f9a836acd72fc8401f0e8869
|