Skip to content

Instantly share code, notes, and snippets.

@T31337
Created December 11, 2018 00:16
Show Gist options
  • Save T31337/5657cb835778b4680fa5c364cc7233e9 to your computer and use it in GitHub Desktop.
Save T31337/5657cb835778b4680fa5c364cc7233e9 to your computer and use it in GitHub Desktop.
Send AutoRemote Message With Bash/Shell
#!/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