Created
December 11, 2018 00:21
-
-
Save T31337/60eac7b9e13bd8950658f6155d21b6ce to your computer and use it in GitHub Desktop.
Send AutoRemote Message Bash/Shell Comand
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: | |
#./AutoRemote-Message MESSAGE_TO_SEND | |
#Don't Forget To Modify These Values To Match Your Device | |
PASSWORD="YOUR_DEVICE_PASSWORD" | |
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 "Message:\n" >> log.txt | |
log "$@" | |
} | |
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 | |
MSG=$@ | |
sendMsg | |
printlog |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment