





от: cloud 2020-12-27 11:31:08
192.168.8.1 send_sms.sh linux script and php
[602]
bash
it's script for send sms
этот скрипт для отправки смс
maybe you usb modem it has and ip address 192.168.8.1
возможно, у вас есть USB-модем и его IP-адрес 192.168.8.1
if you server linux and need send sms
если вы сервер Linux и вам нужно отправить смс
then the following script for you:
тогда следующий скрипт для вас:
1. $ nano send_sms.sh
2. ./send_sms.sh +123456789 'text'
3. send.php
exec("cd /home/web && ./send_sms.sh +123456789 'text'");
[602]

it's script for send sms
этот скрипт для отправки смс
maybe you usb modem it has and ip address 192.168.8.1
возможно, у вас есть USB-модем и его IP-адрес 192.168.8.1
if you server linux and need send sms
если вы сервер Linux и вам нужно отправить смс
then the following script for you:
тогда следующий скрипт для вас:
1. $ nano send_sms.sh
#!/bin/bash
#192.168.8.1
DATA=`curl http://192.168.8.1/api/webserver/SesTokInfo`
SESSION_ID=`echo "$DATA" | grep "SessionID=" | cut -b 10-147`
TOKEN=`echo "$DATA" | grep "TokInfo" | cut -b 10-41`
curl http://192.168.8.1/api/sms/send-sms -H "Cookie: $SESSION_ID" -H "__RequestVerificationToken: $TOKEN" --data "<?xml version='1.0' encoding='UTF-8'?><request><Index>-1</Index><Phones><Phone>$1</Phone></Phones><Sca></Sca><Content>$2</Content><Length>-1</Length><Reserved>1</Reserved><Date>-1</Date></request>"
#192.168.8.1
DATA=`curl http://192.168.8.1/api/webserver/SesTokInfo`
SESSION_ID=`echo "$DATA" | grep "SessionID=" | cut -b 10-147`
TOKEN=`echo "$DATA" | grep "TokInfo" | cut -b 10-41`
curl http://192.168.8.1/api/sms/send-sms -H "Cookie: $SESSION_ID" -H "__RequestVerificationToken: $TOKEN" --data "<?xml version='1.0' encoding='UTF-8'?><request><Index>-1</Index><Phones><Phone>$1</Phone></Phones><Sca></Sca><Content>$2</Content><Length>-1</Length><Reserved>1</Reserved><Date>-1</Date></request>"
2. ./send_sms.sh +123456789 'text'
3. send.php
exec("cd /home/web && ./send_sms.sh +123456789 'text'");