fizord.ru - инфа - 414

0
от: lenta 2020-10-14 16:24:06

e3372h-153 192.168.8.1 send sms terminal
[481] linux
usb modem e3372h, site: http://192.168.8.1

1. nano send_sms.sh

#!/bin/bash

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. chmod -R 777 send_sms.sh

3. terminal> ./send_sms.sh +YOU_PHONE_NUMBER "Hello world!"
fizord.ru © 2024