From b66c82aad8eb7645f23dd32434c74ac764b5d645 Mon Sep 17 00:00:00 2001 From: Ralf Ramsauer Date: Thu, 1 Oct 2015 22:10:35 +0200 Subject: [PATCH] Added tool for simple command injection --- doorlockd/tools/inject_doorcommand.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 doorlockd/tools/inject_doorcommand.sh 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