Decode Jasmin SMS Gateway messages from logs
Project description
Got it. Here’s a slightly optimized version of your README keeping the Input/Output block as-is, and addressing the other points:
# Jasmin SMS Decoder
[](https://www.python.org/downloads/)
[](https://opensource.org/licenses/MIT)
[](https://github.com/psf/black)
A command-line tool for decoding UTF-16BE encoded SMS messages from [Jasmin SMS Gateway](https://www.jasminsms.com/) log files.
## 🚀 Features
- **Stream Processing** - Handles large log files efficiently without loading everything into memory
- **Search & Filter** - Quickly find messages containing specific text or phone numbers
- **Flexible Input** - Read from files or stdin
- **Tail Support** - Process only the last N lines for faster searches
- **Clean Output** - Clear formatting showing original log line and decoded messages
Perfect. Here’s an updated **Installation** section for your README including global GitHub installation instructions:
## 📦 Installation
### From GitHub (Recommended for now)
Install for the **current user**:
```bash
pip install --user git+https://github.com/pbarabadze/jasmin-log-decoder.git
export PATH=$PATH:~/.local/bin
Install system-wide (requires admin privileges):
sudo pip install git+https://github.com/pbarabadze/jasmin-log-decoder.git
From PyPI
pip install jasmin-log-decoder
From Source
git clone https://github.com/pbarabadze/jasmin-log-decoder.git
cd jasmin-log-decoder
pip install -e .
🔧 Usage
Basic Usage
# Decode entire log file
decode-sms messages.log
# Read from stdin
cat messages.log | decode-sms
tail -f messages.log | decode-sms
Search for Specific Content
# Search for a phone number
decode-sms --search "995577123456" messages.log
# Search in decoded messages
decode-sms --search "password reset" messages.log
Process Last N Lines Only
# Much faster for large files
decode-sms --lines 100 messages.log
# Combine with search
decode-sms --lines 1000 --search "995577123456" messages.log
All Options
decode-sms --help
📖 Examples
Real-World Scenarios
Find all SMS from a specific number today:
grep "$(date +%Y-%m-%d)" /var/log/jasmin/messages.log | decode-sms --search "995577123456"
Monitor live SMS in real-time:
tail -f /var/log/jasmin/messages.log | decode-sms
Search archived logs:
decode-sms --search "verification code" messages.log.2024-11-01
🔐 Security & Privacy
This tool reads SMS message content. Please ensure:
- ✅ Proper file permissions on log files
- ✅ Access controls for who can run this tool
- ✅ Compliance with data protection regulations (GDPR, etc.)
🛠️ Development
Setup Development Environment
git clone https://github.com/pbarabadze/jasmin-log-decoder.git
cd jasmin-log-decoder
pip install -e .
Code Formatting
black jasmin_sms_decoder/
📝 How It Works
Jasmin SMS Gateway logs contain SMS messages. When messages use non-ASCII characters (Arabic, Georgian, Emojis, etc.), they are encoded as UTF-16BE hex strings. This tool:
- Reads log files line-by-line (memory efficient)
- Finds hex-encoded UTF-16BE payloads using regex
- Decodes them to readable text
- Filters based on search criteria
- Displays formatted output
Example:
Input (UTF-8): [content:b'encoded_bytes']
Output: [content:'decoded content']
UTF-8 content appears as plain text in logs, while UTF-16BE content appears as hex and requires decoding.
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
- Built for Jasmin SMS Gateway users
- Inspired by the need to quickly search through SMS logs
📬 Contact
Paata Barabadze - @pbarabadze
Project Link: https://github.com/pbarabadze/jasmin-log-decoder
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 jasmin_log_decoder-1.0.0.tar.gz.
File metadata
- Download URL: jasmin_log_decoder-1.0.0.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
33e6d84196ddc5079a539478cc2cddfdc38cd5d15c3c10063d3bc7295d39a2f0
|
|
| MD5 |
40cb747e55438eb2bd6684b7875cb356
|
|
| BLAKE2b-256 |
9ba313e5d2402921d2b8cc998bd172697583f759021e1d17e7fd6944d385e835
|
File details
Details for the file jasmin_log_decoder-1.0.0-py3-none-any.whl.
File metadata
- Download URL: jasmin_log_decoder-1.0.0-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d30115cf89ef9d1eccbc1787ccfd485d9315e4990e845e23aef7f59c82d242c3
|
|
| MD5 |
a9f3097a8fe0c80309a2d3ea5d5a2e58
|
|
| BLAKE2b-256 |
013ef95b987781bdd488856d0383f8ac57311bc85561267750d7bb5ed53eb8c9
|