diff --git a/doorlockd/tools/inject_doorcommand.sh b/doorlockd/tools/inject_doorcommand.sh new file mode 100755 index 0000000..79ab874 --- /dev/null +++ b/doorlockd/tools/inject_doorcommand.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +echo -n "Cmd: " +read CMD + +echo -n "User: " +read USER + +echo -n "Password: " +read -s PW +echo + +echo -n "Token: " +read TOKEN + +cat << EOF | nc localhost 5555 +{ +"command" : "$CMD", +"user" : "$USER", +"password" : "$PW", +"token" : "$TOKEN" +} +EOF