summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorroot <root@krebs>2011-08-25 20:57:41 +0200
committerroot <root@krebs>2011-08-25 20:57:41 +0200
commit848e60588d0b4d05089fd44e3fbe6c413c5dfaf6 (patch)
treef58e1b19d9b17dc78b0301ab6724a99ac7546aae
parent868c9212e1797e7cad18513670beb13c08ae0e1c (diff)
parent0a49508c68e83344ba58a6dd8f76b75677dee40e (diff)
Merge branch 'master' of github.com:/krebscode/painload
-rw-r--r--licht/licht.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/licht/licht.sh b/licht/licht.sh
new file mode 100644
index 00000000..d73a73c8
--- /dev/null
+++ b/licht/licht.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+LAMPE="$1"
+TOGGLE="$2"
+LAMP=~s/[a-zA-Z]//g
+TOGGLE=~s/[a-zA-Z]//g
+STRING="\xA5\x5A\d$LAMPE\d$TOGGLE"
+if [ $# != 2 ]
+then
+ echo -ne "Usage: licht <lampe> <0/1>"
+else
+ echo "$LAMPE$TOGGLE"
+ echo -ne "$STRING" | nc -u -w1 10.42.3.100 1337
+fi