mirror of
https://github.com/binary-kitchen/doorlockd
synced 2024-12-23 02:34:27 +01:00
24 lines
253 B
Bash
24 lines
253 B
Bash
|
#!/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
|