mirror of
https://github.com/salam-ai-learning3/rayhunter-merge.git
synced 2026-07-31 23:47:29 -07:00
A comprehensive cellular network monitoring and analysis system with GPS tracking capabilities and JWT authentication
- Rust 77.5%
- Shell 9%
- Svelte 7.4%
- TypeScript 2.7%
- Python 2.3%
- Other 1%
- Added GPS download button after qmdl button in both ManifestCard and ManifestTableRow components - Added get_gps_url() method to ManifestEntry class for GPS log downloads - Implemented get_gps() server endpoint to serve GPS log files - Updated ZIP generation to include GPS logs alongside pcap and qmdl files - GPS logs are served with text/plain content type for easy viewing - All download buttons now appear in order: pcap, qmdl, gps, zip |
||
|---|---|---|
| check | ||
| daemon | ||
| doc | ||
| installer | ||
| lib | ||
| rootshell | ||
| telcom-parser | ||
| tools | ||
| .gitignore | ||
| book.toml | ||
| Cargo.toml | ||
| CODE_OF_CONDUCT.md | ||
| create_jwt_token.py | ||
| deploy_binaries.sh | ||
| deploy_daemon.sh | ||
| deploy_daemon_chunked.sh | ||
| deploy_gps_jwt_pin.sh | ||
| deploy_release_binaries.sh | ||
| deploy_release_binaries_fixed.sh | ||
| devenv.dockerfile | ||
| docker_make.sh | ||
| Dockerfile.arm-builder | ||
| Dockerfile.arm-builder-fixed | ||
| Dockerfile.nightly | ||
| GITHUB_READY_CHECKLIST.md | ||
| gps_jwt_pin-armv7 | ||
| LICENSE | ||
| make.sh | ||
| rayhunter-daemon-armv7 | ||
| rayhunter-daemon-armv7-new | ||
| README.md | ||
| REPOSITORY_SETUP.md | ||
| run_debug_daemon.sh | ||
| rust-toolchain.toml | ||
| SECURITY.md | ||
| system-stats | ||
| test_gps_api.py | ||
| test_gps_api.sh | ||
| test_gps_api_curl.sh | ||
| test_gps_api_device.sh | ||
| test_gps_api_fixed.sh | ||
| test_gps_v2_api.py | ||
| test_merged_changes.sh | ||
| test_post_endpoint.sh | ||
| test_post_endpoint_2.sh | ||
| testv5.py | ||
| verify_deployment.sh | ||
Rayhunter Merge
A comprehensive cellular network monitoring and analysis system with GPS tracking capabilities and JWT authentication.
🚀 Features
- Cellular Network Monitoring: Real-time analysis of cellular network behavior
- GPS Tracking: Secure GPS data collection with JWT authentication
- Captive Portal: WiFi hotspot with traffic redirection capabilities
- Cross-Platform: Supports ARM devices with Docker-based cross-compilation
- Security: JWT-based authentication with comprehensive security features
🏗️ Architecture
rayhunter-merge/
├── daemon/ # Main daemon application (Rust)
├── lib/ # Core library components (Rust)
├── tools/ # Utility scripts and tools
├── installer/ # Installation and deployment scripts
├── doc/ # Documentation
└── dist/ # Distribution and configuration templates
🔧 Prerequisites
- Rust: Latest stable version
- Docker: For cross-compilation to ARM targets
- ADB: Android Debug Bridge for device deployment
- Python 3: For utility scripts and testing
🚀 Quick Start
1. Clone the Repository
git clone <repository-url>
cd rayhunter-merge
2. Setup Sensitive Files (CRITICAL)
⚠️ NEVER commit these files to version control:
# Create JWT key file (required for GPS API)
echo "your-secret-key-here" > jwt-key.txt
# Create device configuration (if needed)
cp dist/config.toml.in daemon/config.toml
# Edit daemon/config.toml with your device settings
3. Build the Project
# Build for ARM target
docker exec -it orbic-aug-25-25-container cargo build --release --target="armv7-unknown-linux-musleabihf" --bin rayhunter-daemon
# Build GPS JWT utility
docker exec -it orbic-aug-25-25-container cargo build --release --target="armv7-unknown-linux-musleabihf" --bin gps_jwt_pin
4. Deploy to Device
# Deploy daemon
./deploy_daemon.sh
# Deploy GPS utility
./deploy_gps_jwt_pin.sh
🔐 Security Configuration
JWT Authentication
The GPS v2 API uses JWT tokens for authentication:
# Generate JWT token (example)
python3 create_jwt_token.py
# Test GPS API
curl -X POST http://localhost:8080/api/v2/gps \
-H "Authorization: Bearer <your-jwt-token>"
Required JWT Claims
{
"lat": 37.7749,
"lon": -122.4194,
"exp": 1640995200,
"iat": 1640995170,
"jti": "unique_id",
"accuracy": 5.0,
"altitude": 100.0,
"speed": 25.0,
"heading": 180.0
}
🌐 Captive Portal
Enable the captive portal to redirect WiFi traffic:
# Start captive portal
adb shell rootshell -c "'/data/rayhunter/start_captive_portal.sh'"
# Stop captive portal
adb shell rootshell -c "'/data/rayhunter/stop_captive_portal.sh'"
🧪 Testing
Test GPS API
# Test with valid JWT
./test_gps_api.sh
# Test with Python script
python3 test_gps_v2_api.py
Test Captive Portal
# Test DNS redirection
./tools/test_android_captive_final.sh
📁 Project Structure
daemon/: Main application with GPS API and cellular monitoringlib/: Core libraries for cellular analysis and data processingtools/: Utility scripts for deployment, testing, and configurationinstaller/: Installation and deployment automationdoc/: Project documentation and guides
🔒 Security Considerations
- JWT Keys: Never commit
jwt-key.txtor any cryptographic keys - Configuration: Use templates and environment variables for sensitive data
- Device Access: Ensure proper authentication for device deployment
- Network Security: Captive portal should only be used in controlled environments
🐛 Troubleshooting
Common Issues
- Build Failures: Ensure Docker container is running and Rust toolchain is installed
- Deployment Issues: Check ADB connection and device permissions
- JWT Authentication: Verify JWT key file exists and token format is correct
- Captive Portal: Check network interface configuration and dnsmasq status
Logs
# Check daemon logs
adb shell cat /data/rayhunter/rayhunter.log
# Check captive portal logs
adb shell cat /data/rayhunter/captive_portal.log
📚 Documentation
🤝 Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Verify no sensitive files are included
- Submit a pull request
📄 License
This project is licensed under the terms specified in the LICENSE file.
⚠️ Disclaimer
This tool is for educational and research purposes. Use responsibly and in accordance with applicable laws and regulations.