Sh3ll
OdayForums


Server : Apache
System : Linux profile 3.10.0-1160.88.1.el7.x86_64 #1 SMP Tue Mar 7 15:41:52 UTC 2023 x86_64
User : apache ( 48)
PHP Version : 8.0.28
Disable Function : NONE
Directory :  /var/www/html/mmishra/mm/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //var/www/html/mmishra/mm/sendsms.sh
#http://www.my.host.net.nz/blog/2013/07/quick-script-to-send-smss-under-linux/
#! /bin/bash
###############################################################
# Quick script to send an SMS out attached modem
# Requires "pppd" is installed for chat command
# Usage: $0 phoneno "message in quotes"
###############################################################

PHONENO=$1
MESSAGE=$2
MODEM=/dev/ttyUSB0
LOCKFILE=/tmp/smssend.lock

if [ "$2." == "." ]
then
echo "Script to Send an SMS message"
echo "Usage:  $0 phoneno \"message\""
exit
fi

if [ -f $LOCKFILE ]
then
echo "Can't send SMS - SMS program locked.  If its not locked please delete $LOCKFILE"
else
echo $$ > $LOCKFILE
/bin/stty 9600 cs8 -parenb -clocal -crtscts -echo -F $MODEM
/usr/sbin/chat -E -s TIMEOUT 10 "" "AT&F&C1&D2" "OK" "AT+CMGF=1" "OK" "AT+CMGS=\"$PHONENO\"" "" "$MESSAGE\032"  > $MODEM < $MODEM
rm $LOCKFILE
fi

ZeroDay Forums Mini