-
Notifications
You must be signed in to change notification settings - Fork 218
Shell Command Testing
Michael Higgins edited this page Jan 4, 2018
·
1 revision
Here is a shell command that can be used for testing your commands without having to disable the HMAC256 authentication
###USAGE: ./irblaster.sh A90:SONY:12
code=$1
proto="msg"
pass="yourpass" #PASSWORD TO ACCEPT COMMANDS
ipaddr="12.34.56.78" #IP ADDR BLASTER
port="1234" #PORT BLASTER
epid="1" #DEVICE-ID
mid="aabbccdd-1234-abcd-5678-aabbccddeeff" #MID-DUMMY
etime=date +%s #EPOCH TIME FOR AUTH-ALGO
echo "epid= "$epid
echo "mid= "$mid
echo "epoch-time= "$etime
hash=echo -n $epid$mid$etime | openssl sha256 -hmac "amzn1.account.AXXXXXXXXXXXXXXXXX" | cut -c 10- #GENERATE HMAC-HASH
echo "building hash from EPID+MID+EPOCH-TIME= "$hash
echo "STRING TO IR-BLASTER: http://$ipaddr:$port/$proto?code=$code&pass=$pass&auth=$hash&mid=$mid&epid=$epid&time=$etime&simple=1" #BLAST STRING TO BLASTER-DEVICE
wget -o - "http://$ipaddr:$port/$proto?code=$code&pass=$pass&auth=$hash&mid=$mid&epid=$epid&time=$etime&simple=1"
Thanks @neo7530