193 lines
5.2 KiB
Markdown
193 lines
5.2 KiB
Markdown
# HexaWork - Byte Inspector
|
|
|
|
## Overview
|
|
HexaWork is a Python Tkinter application for binary file inspection and analysis. It provides a hexadecimal viewer and advanced byte analysis capabilities.
|
|
|
|
## Features
|
|
|
|
### 1. Hexadecimal View
|
|
- Three-column display: offset, hexadecimal values, and ASCII representation
|
|
- Uppercase hexadecimal values for better readability
|
|
- Monospace font for perfect alignment
|
|
- Horizontal and vertical scrollbars
|
|
|
|
### 2. Byte Analysis
|
|
#### Normal Order
|
|
- HEX: Hexadecimal representation of selected bytes
|
|
- DEC: Corresponding decimal value
|
|
- !HEX: Bitwise complement in hexadecimal
|
|
- !DEC: Bitwise complement in decimal
|
|
|
|
#### Reverse Order
|
|
- HEX: Hexadecimal representation of bytes in reverse order
|
|
- DEC: Decimal value of reverse order
|
|
- !HEX: Bitwise complement in hexadecimal
|
|
- !DEC: Bitwise complement in decimal
|
|
|
|
### 3. Flexible Selection
|
|
- Direct selection of hexadecimal values
|
|
- Full line selection including offset and ASCII
|
|
- Automatic analysis update on selection
|
|
|
|
### 4. ASCII Pattern Analysis
|
|
- Comprehensive file-wide ASCII text scanning
|
|
- Detects various patterns:
|
|
* Phone numbers
|
|
* Short letter sequences
|
|
* Alphanumeric codes
|
|
* Potential 3-letter abbreviations
|
|
- Interactive results popup
|
|
- Supports multiple pattern types
|
|
|
|
### 5. Advanced ASCII Pattern Recognition
|
|
- Comprehensive file-wide text scanning
|
|
- Multiple pattern detection:
|
|
* Possible Software Numbers (10-11 digits)
|
|
* Vehicle Identification Numbers (VIN)
|
|
* Potential Code Sequences
|
|
* Possible PIN Codes
|
|
- Unique pattern occurrence counting
|
|
- Interactive results display
|
|
- Supports complex alphanumeric pattern matching
|
|
|
|
### 6. Pattern Analysis Features
|
|
- Detailed pattern identification:
|
|
* Detects 3+ letter codes
|
|
* Finds long numeric sequences
|
|
* Highlights repeated patterns
|
|
- Occurrence frequency tracking
|
|
- User-friendly results popup
|
|
- Flexible pattern recognition
|
|
|
|
## Recent Updates and Enhancements
|
|
|
|
### Logging System
|
|
- Created centralized logging mechanism in `logger.py`
|
|
- Logs saved in timestamped files in `logs/` directory
|
|
- Provides detailed error tracking and information logging
|
|
- Supports both console and file logging
|
|
|
|
### Binary Graph Visualization
|
|
- Replaced Matplotlib with Plotly for interactive graphing
|
|
- Added `tkinterweb` support for rendering interactive graphs
|
|
- Enhanced scrolling capabilities for large binary files
|
|
- Improved error handling and data validation
|
|
|
|
### Error Handling
|
|
- Comprehensive error management across all modules
|
|
- User-friendly error messages
|
|
- Detailed logging for debugging purposes
|
|
|
|
### Performance Improvements
|
|
- More robust data type handling
|
|
- Optimized graph rendering
|
|
- Improved scrolling mechanisms
|
|
|
|
### New Dependencies
|
|
- Added `plotly` for interactive graphing
|
|
- Added `tkinterweb` for HTML-based graph rendering
|
|
|
|
### Installation
|
|
```bash
|
|
pip install -r requirements.txt
|
|
```
|
|
|
|
### Known Limitations
|
|
- Initial graph view limited to 512 data points
|
|
- Requires Python 3.12+
|
|
- Windows platform recommended
|
|
|
|
## Troubleshooting
|
|
- If you encounter any import errors, ensure all dependencies are installed
|
|
- Check log files in the `logs/` directory for detailed error information
|
|
|
|
## Installation
|
|
|
|
1. Requirements:
|
|
- Python 3.7 or higher
|
|
- Tkinter (usually included with Python)
|
|
|
|
2. Install dependencies:
|
|
```bash
|
|
pip install -r requirements.txt
|
|
```
|
|
|
|
## Usage
|
|
|
|
1. Run the program:
|
|
```bash
|
|
python main.py
|
|
```
|
|
|
|
2. Features:
|
|
- Click "Select File" to choose a binary file
|
|
- Select bytes in the hex viewer (using mouse or keyboard)
|
|
- View automatic analysis in Normal Order and Reverse Order panels
|
|
- Use scrollbars to navigate large files
|
|
|
|
## Examples
|
|
|
|
### Byte Analysis
|
|
If you select bytes "4E 31":
|
|
- Normal Order:
|
|
* HEX: 4E31
|
|
* DEC: 20017
|
|
* !HEX: [complement]
|
|
* !DEC: [decimal complement]
|
|
|
|
- Reverse Order:
|
|
* HEX: 314E
|
|
* DEC: 12622
|
|
* !HEX: [complement]
|
|
* !DEC: [decimal complement]
|
|
|
|
## Detailed Update History
|
|
|
|
### Version 0.2.0 - Advanced Editing Capabilities
|
|
#### Hexadecimal Editing Enhancements
|
|
- Implemented sophisticated in-place hexadecimal editing
|
|
- Developed smart cursor positioning algorithm
|
|
* Maintains cursor location during edits
|
|
* Handles edits at any file location
|
|
- Preserved line formatting during byte modifications
|
|
- Added real-time hex value validation
|
|
|
|
#### File Modification Safety
|
|
- Introduced file size change warning mechanism
|
|
- Implemented confirmation dialog for file size alterations
|
|
- Ensured user awareness of potential file structure changes
|
|
|
|
#### Checksum Refinements
|
|
- Enhanced checksum calculation methods
|
|
- Supported variable-length byte sequences
|
|
- Implemented three distinct checksum types:
|
|
* 1-byte Sum Checksum
|
|
* 1-byte XOR Checksum
|
|
* 16-bit Checksum
|
|
- Provided hexadecimal representation of checksums
|
|
|
|
#### Technical Improvements
|
|
- Added comprehensive error logging
|
|
- Improved input validation
|
|
- Enhanced user interaction during file editing
|
|
|
|
### Upcoming Features
|
|
- Large file performance optimization
|
|
- Advanced search functionality
|
|
- More configurable display options
|
|
- Comprehensive unit testing
|
|
|
|
## Logging
|
|
- Log file: hexawork.log
|
|
- Records operations and errors for debugging
|
|
- Format: timestamp, module, level, message
|
|
|
|
## Contributing
|
|
Feel free to:
|
|
- Report bugs
|
|
- Suggest improvements
|
|
- Submit pull requests
|
|
|
|
## License
|
|
This project is under the MIT license.
|