- Added Security Handoff Report detailing resolved issues and current configurations. - Implemented CSRF protection using Flask-WTF, including token management in templates and JavaScript. - Created standardized error handling module to log detailed errors while returning generic messages. - Developed phone number validation module to ensure compliance with E.164 standards. - Added CSV injection prevention measures during file uploads. - Updated installation guide for clarity and completeness. - Created script to update API keys from Android device, ensuring secure key management. - Enhanced Docker security configurations to remove privileged mode and host networking. - Implemented logging and sanitization for error messages to prevent information disclosure. - Added verification script to test security setup flow and validate configurations.
Scripts Directory
This directory contains utility and deployment scripts for the SMS Campaign Manager.
Deployment Scripts
deploy-android.sh
Main deployment script for Android device setup.
Usage:
./scripts/deploy-android.sh
What it does:
- Tests connectivity to Android device
- Deploys Python servers to
~/projects/sms-campaign-manager/ - Deploys shell scripts to
~/bin/ - Starts all Android services
- Verifies deployment success
deploy-to-android.sh
Alternative deployment script (legacy).
update-termux-server.sh
Updates the Termux SMS API server on Android device.
Usage:
./scripts/update-termux-server.sh
Utility Scripts
auto.sh
Automatic ADB connection script.
Usage:
./scripts/auto.sh
What it does:
- Automatically connects to Android device via ADB
- Handles device discovery and connection setup
ui.sh
Terminal UI script for interactive management.
fix-database.sh
Database maintenance and repair script.
Usage:
./scripts/fix-database.sh
Caution: This script modifies the database. Back up data/campaign.db before running.
Environment Requirements
All scripts expect these environment variables to be set in .env:
PHONE_IP- Android device IP address (Tailscale IP recommended)ADB_PORT- ADB port (default: 5555)TERMUX_API_PORT- Termux API port (default: 5001)
SSH Configuration
Scripts use SSH to connect to Android device on port 8022:
ssh android-dev@YOUR_PHONE_IP -p 8022
Ensure SSH keys are set up for passwordless authentication.