A versatile command-line tool for encoding, decoding, hashing, and string manipulation.
Project description
Ovaltine: The Versatile Encoder/Decoder/Hasher Tool
Project Description
Ovaltine is a powerful and versatile command-line tool designed for a wide range of encoding, decoding, hashing, and string manipulation tasks. Whether you're a security professional, a developer, or just someone who needs to quickly transform data, Ovaltine provides a comprehensive suite of functionalities accessible via an interactive menu or direct command-line arguments.
Features
- Extensive Encoding/Decoding: Support for common formats like Base64, Hexadecimal, URL, HTML Entities, ASCII, Punycode, XML, JSON, YAML, and various UTF encodings.
- Classic Ciphers: Implementations of ROT13, Caesar, Atbash, Vigenère, XOR, Morse Code, A1Z26, Baconian, Polybius Square, Affine, Playfair, Hill, Rail Fence, and Scytale ciphers.
- Hashing Algorithms: Generate MD5, SHA-1, SHA256, SHA512, CRC32, Adler-32, SHA3, BLAKE2b, and BLAKE2s hashes. Includes hash analysis and verification.
- String Manipulation: Functions for reversing, changing case (uppercase, lowercase, capitalize, title case, swap case), and Leet (1337) speak.
- Numeric System Conversions: Convert between Decimal, Hex, Octal, IP Address to Integer, Integer to IP Address, Roman Numerals, Binary Coded Decimal (BCD), Base36, and Base62.
- Miscellaneous Tools: Quoted-Printable, UUencoding, XXencoding, Hexlify, EBCDIC, Luhn Algorithm, Geohash, UUID generation/parsing, Raw Hex Dump, Brainfuck, and Pig Latin.
- Compression/Decompression: Zlib, Gzip, Bzip2, LZMA, Deflate, and Zstandard compression (input/output handled as Base64).
- Interactive Menu: User-friendly interactive mode for easy navigation and operation selection.
- Command-Line Interface (CLI): Execute operations directly from the command line for scripting and automation.
- Operation History: Keep track of your past operations.
- Mobile-Friendly Display: A dedicated single-column menu display for smaller terminals.
Installation
Prerequisites
- Python 3.x
pip(Python package installer)
From PyPI (Recommended)
pip install ovaltinepy
From Source
- Clone the repository:
git clone https://github.com/ghoste12125/ovaltinepy.git cd ovaltinepy
- Install dependencies:
pip install -r requirements.txt
Usage
Interactive Mode
Run the script without any arguments to enter interactive mode:
python ovaltine.py
A menu will be displayed, allowing you to choose from various operations. Follow the prompts to input text, select encode/decode options, and provide any necessary extra parameters (like shift values or keys).
Command-Line Mode
You can perform operations directly from the command line using arguments.
General Usage:
python ovaltine.py [OPTIONS]
Options:
-h, --help: Show the main help message and exit.-op, --operation <value>: Specify the operation to perform (e.g.,Base64,MD5).-c, --choice <string>: Specify sub-choice for operation (e.g.,1for encode/encrypt,2for decode/decrypt).-i, --input <value>: Input string for the operation.-if, --input-file <value>: Read input from a specified file.-of, --output-file <value>: Write output to a specified file.-k, --key <value>: Key for ciphers (e.g., Vigenère, XOR).--shift <int>: Shift value for Caesar cipher.--rails <int>: Number of rails for Rail Fence cipher.--diameter <int>: Diameter for Scytale cipher.--key_a <int>: Key "a" for Affine cipher.--key_b <int>: Key "b" for Affine cipher.--key_matrix_str <value>: Key matrix string for Hill cipher (e.g., "2 3,1 4").--ht, --hash-type <value>: Hash type for Verify Hash (e.g.,md5,sha256).--eh, --expected-hash <value>: Expected hash for Verify Hash.--history: Display operation history.--clear-history: Clear operation history.-m, --mobile-display: Use mobile-friendly single-column menu display (runsovaltine_v2.py).-ts, --test-suite: Run the test suite (test_suite.pyandtest_prompts.py).
Examples:
- Encode "Hello" to Base64:
python ovaltine.py -op Base64 -c 1 -i "Hello"
- Decode a Base64 string:
python ovaltine.py -op Base64 -c 2 -i "SGVsbG8="
- Calculate SHA256 hash of "test":
python ovaltine.py -op SHA256 -i "test"
- Caesar Cipher encryption with shift 3:
python ovaltine.py -op "Caesar Cipher" -c 1 -i "abc" --shift 3
- Read input from file and write output to file (Base64 encode):
echo "secret" > input.txt python ovaltine.py -op Base64 -c 1 -if input.txt -of output.txt
- Display operation history:
python ovaltine.py --history
- Run the test suite:
python ovaltine.py --test-suite
Supported Operations (Detailed)
Common Encodings
- Binary, Hexadecimal, Base64, URL (Percent) Encoding, HTML Entities, ASCII Values, Punycode, XML, JSON, YAML, ISO-8859-1 (Latin-1), Shift-JIS, UTF-7, UTF-8, UTF-16, UTF-32, Base32, Base58, Base85, Base91.
Classic Ciphers
- ROT13, Caesar Cipher, Atbash Cipher, Morse Code, A1Z26 Cipher, Vigenère Cipher, Baconian Cipher, Polybius Square, Affine Cipher, Playfair Cipher, Hill Cipher, Rail Fence Cipher, Scytale Cipher, XOR Cipher.
String Manipulation
- Reverse String, Uppercase, Lowercase, Capitalize, Title Case, Swap Case, Leet (1337).
Hashing (One-Way)
- Analyze Hash, Verify Hash, MD5, SHA-1, SHA256, SHA512, CRC32, Adler-32, SHA3-224, SHA3-256, SHA3-384, SHA3-512, BLAKE2b, BLAKE2s.
Numeric Systems
- Decimal to Hex, Hex to Decimal, Decimal to Octal, Octal to Decimal, IP Address to Integer, Integer to IP Address, Roman Numerals, Binary Coded Decimal (BCD), Base36, Base62.
Miscellaneous
- Quoted-Printable, UUencoding, XXencoding, Hexlify, EBCDIC, Luhn Algorithm, Geohash, UUID (Generate/Parse), Raw Hex Dump, Brainfuck, Pig Latin.
Compression
- Zlib Compress, Gzip Compress, Bzip2 Compress, LZMA Compress, Deflate, Zstandard Compress.
Testing
To run the full test suite, including both functional tests and prompt verification tests:
python ovaltine.py --test-suite
Contributing
Contributions are welcome! Please feel free to submit issues, pull requests, or suggest new features.
License
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Contact
For questions or feedback, please contact anonymosmauros@gmail.com.
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 ovaltinepy-0.1.2.tar.gz.
File metadata
- Download URL: ovaltinepy-0.1.2.tar.gz
- Upload date:
- Size: 42.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
88967b52adef37a4a5c9158c99507eaa456604c86bb65b0fed9785e5bacc89e5
|
|
| MD5 |
83ac0980a0e9b28eb816e60e46151158
|
|
| BLAKE2b-256 |
cdaf3fce68f16e366f57698ff7883868dfd75b65cfa5b725519967049e5fa720
|
File details
Details for the file ovaltinepy-0.1.2-py3-none-any.whl.
File metadata
- Download URL: ovaltinepy-0.1.2-py3-none-any.whl
- Upload date:
- Size: 40.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
66e5280409fc3ca643e5a230aaec4174e32d3a8607ae754daaeca49da890b325
|
|
| MD5 |
532f7319bdac1779a44720f31b7f160d
|
|
| BLAKE2b-256 |
65617801941b442b6bd368017d6b21aff03aa28c595bb39f90cf90da37ddae5e
|