This Python script enables you to send messages to multiple contacts using the Termux termux-sms-send
command. It is specifically designed for use on Android devices where Termux is installed. This tool allows for efficient message distribution to a list of contacts provided in a JSON file.
- Termux app installed on your Android device.
- Python 3 installed within Termux.
- SMS permissions granted to Termux.
- Clone or download this script to your device.
- Make the script executable by running:
chmod +x path_to_script.py
The script requires two files:
- A JSON file containing the contacts, with each contact having a
number
key. - A text file containing the message you wish to send.
Additionally, you can specify the SIM card slot to use if your device supports dual SIMs.
Your contacts file should look like this:
[
{
"name": "John Doe",
"number": "+491234567890"
},
{
"name": "Jane Doe",
"number": "+491234567891"
}
]
Execute the script with the following command:
./path_to_script.py path_to_contacts.json path_to_message.txt --sim <SIM_SLOT>
Replace path_to_script.py
with the actual path to the script, path_to_contacts.json
with your contacts file path, path_to_message.txt
with your message file path, and <SIM_SLOT>
with the SIM card slot number (default is 1).
Ensure that Termux has the necessary permissions for file access and SMS sending. Verify that the JSON and text files are correctly formatted and accessible.
Contributions are welcome! Please fork the repository and submit a pull request with your changes.
This project is licensed under the GNU General Public License v3.0, the same license used by Linux. This ensures that the software remains free and open source, and it guarantees users the freedoms to run, study, share, and modify the software.
For more details, see GPLv3.
If you have any questions or would like to contribute to the project, please contact me via github.com