Created
December 11, 2018 00:16
-
-
Save T31337/5657cb835778b4680fa5c364cc7233e9 to your computer and use it in GitHub Desktop.
Send AutoRemote Message With Bash/Shell
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#This Script Will Prompt For An AutoRemote Message To Send | |
#Usage: | |
#./AutoRemoteMessage | |
#Don't Forget To Edit These Values To Match Your Device | |
PASSWORD="YOUR_DEVICE_PASSOWRD" | |
KEY="YOUR_DEVICE_KEY" | |
function startlog() | |
{ | |
date > log.txt | |
echo -e "\n" >> log.txt | |
} | |
function log() | |
{ | |
echo $1 >> log.txt | |
echo -e "\n" >> log.txt | |
} | |
function getMsg() | |
{ | |
echo -e "AutoRemoteMessage:\n" | |
read MSG | |
echo -e "Message:\n" >> log.txt | |
log "$MSG" | |
} | |
function sendMsg() | |
{ | |
wget -q --delete-after "https://autoremotejoaomgcd.appspot.com/sendmessage?key=$KEY&message=$MSG&password=$PASSWORD" | |
} | |
function printlog() | |
{ | |
echo -e "\n" | |
cat log.txt | |
} | |
startlog | |
getMsg $@ | |
sendMsg | |
printlog |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment