Initial Combination

Start the combination process between:

d3505230f6

and the at-telnet portion of

39c20b83b1
This commit is contained in:
iamromulan
2023-09-19 23:13:43 -04:00
parent db8ca34cca
commit 5aaa75d1b6
40 changed files with 2917 additions and 0 deletions

30
www/cgi-bin/get_atcommand Normal file
View File

@@ -0,0 +1,30 @@
#!/bin/bash
QUERY_STRING=$(echo "${QUERY_STRING}" | sed 's/;//g')
function urldecode() { : "${*//+/ }"; echo -e "${_//%/\\x}"; }
if [ "${QUERY_STRING}" ]; then
export IFS="&"
for cmd in ${QUERY_STRING}; do
if [ "$(echo $cmd | grep '=')" ]; then
key=$(echo $cmd | awk -F '=' '{print $1}')
value=$(echo $cmd | awk -F '=' '{print $2}')
eval $key=$value
fi
done
fi
MYATCMD=$(printf '%b\n' "${atcmd//%/\\x}")
if [ -n "${MYATCMD}" ]; then
x=$(urldecode "$atcmd")
runcmd=$(echo -en "$x\r\n" | microcom -t 2000 /dev/ttyOUT)
# runcmd=$(/usrdata/simpleadmin/scripts/doAT.py "$MYATCMD")
fi
echo "Content-type: text/plain"
echo $x
echo ""
echo $runcmd