From 26c0c4e20d51c1a40d2e2b4768f7e5e4560e77b5 Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 25 Mar 2015 22:40:04 +0100 Subject: add serenity --- retiolum/hosts/serenity | 11 +++++++++++ sites/reaktor-nag/setup-reaktor-nag.journal | 1 + 2 files changed, 12 insertions(+) create mode 100644 retiolum/hosts/serenity diff --git a/retiolum/hosts/serenity b/retiolum/hosts/serenity new file mode 100644 index 00000000..09c519a0 --- /dev/null +++ b/retiolum/hosts/serenity @@ -0,0 +1,11 @@ +Subnet = 10.243.137.182 +Subnet = 42:7538:6f17:220f:bcc0:2d2d:d6f6:911f + +-----BEGIN RSA PUBLIC KEY----- +MIIBCgKCAQEAvVxASw+8nrkQisvliqjYXASQ8O0v4KGlQDHQWx4eBKOfPyQbgJpU +LOF1nikZTz56SyJAwZY1r7JXpvzycWKXkLK/deqJrHkm83lRbwbzKrExzW8hNaVD +nO+P4X19uG/gcfxc9+CdPbHxtUPCNQKUhtYfnXrzTu9jiz7WibkJRYMvY1bd4SK1 +rkKGwIfQiWGvA2cLyWZH2XnFptl0YVHulGnIIVp/bvTuPDsba4mTWeuJhi+16ZzP +PwsR5taxB+dxygESp+kwu00Xmwv5MnmL6QWDlTHYZX19FXkeAV+sHxEO0K4YLFQn +pucTzUBNiZX68HF3R5SdH7wsg9jsvE8c3wIDAQAB +-----END RSA PUBLIC KEY----- diff --git a/sites/reaktor-nag/setup-reaktor-nag.journal b/sites/reaktor-nag/setup-reaktor-nag.journal index 6227aa37..452396e1 100644 --- a/sites/reaktor-nag/setup-reaktor-nag.journal +++ b/sites/reaktor-nag/setup-reaktor-nag.journal @@ -5,6 +5,7 @@ cd krebs/painload/Reaktor $EDITOR config.py # edit on_ping to point to some valid services_repo + # make sure to ssh as the user before to avoid 'unknown host' issue # edit anything else relevant # deploy Reaktor's pubkey to services_repo-host sudo -u Reaktor -i $PWD/index -- cgit v1.2.3 From eaa76c815dd0998b52cc3be65b15d2ca85e20f89 Mon Sep 17 00:00:00 2001 From: lassulus Date: Thu, 5 Mar 2015 17:28:28 +0100 Subject: remove broken galileo --- util/bin/galileo | 3 --- 1 file changed, 3 deletions(-) delete mode 100755 util/bin/galileo diff --git a/util/bin/galileo b/util/bin/galileo deleted file mode 100755 index 854f1302..00000000 --- a/util/bin/galileo +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -export voice=klara -./wiki.firstpar http://de.m.wikipedia.org/wiki/::Random | xargs ./naturalvoices.att -- cgit v1.2.3 From 8068106abbfeecb9d31aef522417b0e37230657f Mon Sep 17 00:00:00 2001 From: lassulus Date: Thu, 5 Mar 2015 17:34:55 +0100 Subject: remove broken pigbin --- util/bin/pigbin | 5 ----- 1 file changed, 5 deletions(-) delete mode 100755 util/bin/pigbin diff --git a/util/bin/pigbin b/util/bin/pigbin deleted file mode 100755 index ae0b270f..00000000 --- a/util/bin/pigbin +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -#usage: -#echo aidsballs | pigbin - -curl -F 'p=<-' paste -- cgit v1.2.3 From 31fcd8aa88098598c500512f6783a70aa4b2ba9d Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 7 Apr 2015 20:23:39 +0200 Subject: cloudkrebs: update key --- retiolum/hosts/cloudkrebs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/retiolum/hosts/cloudkrebs b/retiolum/hosts/cloudkrebs index a6783d0b..43d35d1f 100644 --- a/retiolum/hosts/cloudkrebs +++ b/retiolum/hosts/cloudkrebs @@ -3,10 +3,10 @@ Subnet = 10.243.206.102 Subnet = 42:941e:2816:35f4:5c5e:206b:3f0b:f762 -----BEGIN RSA PUBLIC KEY----- -MIIBCgKCAQEAoXp4UXctvHQRiJps4CzURNBsZE8mC8emtXK6pjfq73Pg4R94ayx4 -+JtgEFY+VZeNIKHlaAqfNm8+RfHS7AFgMkiA4WBK2PI8Vpj64wUHz+EcySIInIdx -9J00KRUYA9w8pC8qxjZlxsFlDb4i/kzk1Qt4izV++itzICRolHcuHCeWN3ceok1O -gckSSi+zSyGiukRlIHqFkHRCJzt2LV06BV+8ARvLBsF/N9imfVxlfNpEcJCjwgFY -E5kcr7HpywYA3myphmvrGTPV/xy0m1tfNsWNMWXdk75K2Pl8h3h8b2ViHgcWjmNY -jDeTVvaoGgFRzfu+3cA1TiHwDcQKKZodBQIDAQAB +MIIBCgKCAQEA33RbuP2zPuZx/fakOsekIJPln4AKsIVYT5nt+Xk1y8MiIX2y3NAj +ovmWMJF1hxHyInA+FuInOWH6fgxF7Slluz8dNdtciaACZDOQv0NWMliukYKoYYGP +qFc8TEQPknmQpWW25naaT9m/69iQ3mxUm/IncxxyFxgtWfrlLvUqF0h57iEDZUZi +EXf0lE1iYXNZlGB9ZOS0+s9Y3uQIBNJWCGyup5b3S0aUKnIkCrZ9zMVAQoipXIWb +ANBIQe0fp9hbhS//TslTGnVEoBW3cFEdrvAyZKdcuu4wF/hOvuFGMz41hORPjLZd +Mk57k0Xt9IlcvVdXq+FYZ1Bt727HCAgJFwIDAQAB -----END RSA PUBLIC KEY----- -- cgit v1.2.3 From d2bf81abd0c6708e41f3c8ce3546b117ff43555c Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 11 May 2015 14:45:59 +0200 Subject: tinc-setup: add propagate-config --- retiolum/scripts/tinc_setup/propagate-config | 61 ++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100755 retiolum/scripts/tinc_setup/propagate-config diff --git a/retiolum/scripts/tinc_setup/propagate-config b/retiolum/scripts/tinc_setup/propagate-config new file mode 100755 index 00000000..27a9880a --- /dev/null +++ b/retiolum/scripts/tinc_setup/propagate-config @@ -0,0 +1,61 @@ +#!/bin/sh -x +set -euf + +main() { + + if [ $# -ne 1 ]; then + usage + exit 1 + fi + + TINCDIR=$1 + + HOSTN=$(cat $TINCDIR/tinc.conf | awk '/Name ?=/ {gsub(/Name ?= ?/, ""); print}') + NICK="${HOSTN}_$(head /dev/urandom | tr -dc "0123456789" | head -c3)" + + IRCCHANNEL=${IRCCHANNEL:-"#krebs_incoming"} + IRCSERVER=${IRCSERVER:-"irc.freenode.net"} + IRCPORT=${IRCPORT:-6667} + + test -z ${HOSTSDIR+x} && find_hostdir + + test -z ${TELNET+x} && find_telnet + + ( echo "NICK $NICK"; + echo "USER $NICK $IRCSERVER bla : $NICK"; + echo "JOIN $IRCCHANNEL"; + sleep 23; + echo "PRIVMSG $IRCCHANNEL : This is $HOSTN"; + sed "s/^\(.*\)/PRIVMSG $IRCCHANNEL : \1/" $HOSTSDIR/$HOSTN; + sleep 5; ) | $TELNET $IRCSERVER $IRCPORT +} + +exists() { + type "$1" >/dev/null 2>/dev/null; +} + +find_hostdir() { + if [ -e "$TINCDIR/hosts" ]; then + HOSTSDIR="$TINCDIR/hosts" + else + echo 'cannot find hostsdir of tinc, please specify with HOSTSDIR=...' + exit 1 + fi +} + +find_telnet() { + if exists telnet >/dev/null; then + TELNET=$(command -v telnet) + else + echo "cannot find telnet binary, please install telnet-client" + echo "bailing out!" + exit 1 + fi +} + +usage() { + echo './propagate-config $TINCDIR' + echo 'If the hosts dir is not in $TINC_DIR you have to specify it using HOSTSDIR=$path_to_hostsdir ./propagate $TINCDIR.' +} + +main "$@" -- cgit v1.2.3 From 425f38c289248f1e534a3db19d0203136782900d Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 13 May 2015 22:10:16 +0200 Subject: util/bin: add urgent --- util/bin/urgent | 2 ++ 1 file changed, 2 insertions(+) create mode 100755 util/bin/urgent diff --git a/util/bin/urgent b/util/bin/urgent new file mode 100755 index 00000000..f73cbbc4 --- /dev/null +++ b/util/bin/urgent @@ -0,0 +1,2 @@ +#!/bin/sh +echo -e '\x07' -- cgit v1.2.3 From a88b30dc20c590774fd7665dfc5d023f61dd4892 Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 13 May 2015 22:12:37 +0200 Subject: util/urgent: make portable --- util/bin/urgent | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/bin/urgent b/util/bin/urgent index f73cbbc4..33593551 100755 --- a/util/bin/urgent +++ b/util/bin/urgent @@ -1,2 +1,2 @@ #!/bin/sh -echo -e '\x07' +printf '\a' -- cgit v1.2.3 From 0358f6cd6c5b4eb94ee804bfad47f07e0a6e661c Mon Sep 17 00:00:00 2001 From: lassulus Date: Thu, 14 May 2015 12:23:55 +0200 Subject: util/bin: add untilport --- util/bin/untilport | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 util/bin/untilport diff --git a/util/bin/untilport b/util/bin/untilport new file mode 100755 index 00000000..b815cb19 --- /dev/null +++ b/util/bin/untilport @@ -0,0 +1,15 @@ +#!/bin/sh +set -euf + +usage() { + echo 'untiport $target $port' + echo 'Sleeps until the destinated port is reachable.' + echo 'ex: untilport google.de 80 && echo 'google is now reachable'' +} + +if [ $# -ne 2 ]; then + usage +else + until nc -z "$@"; do sleep 1; done +fi + -- cgit v1.2.3 From a6870c5588c45a13359c26744ffb38a5ad88742f Mon Sep 17 00:00:00 2001 From: lassulus Date: Sat, 16 May 2015 21:01:42 +0200 Subject: util/bin: add paste (pastes to pastebin services) --- util/bin/paste | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 util/bin/paste diff --git a/util/bin/paste b/util/bin/paste new file mode 100755 index 00000000..be29c78f --- /dev/null +++ b/util/bin/paste @@ -0,0 +1,26 @@ +#!/bin/sh +set -euf + +usage() { + echo 'paste reads from stdin and pastes to the specified paste service' + echo 'currently ix.io and paste.retiolum are supported' + echo 'default is paste.retiolum' + echo 'ex:' + echo 'cat somefile | paste ix.io' +} + +hoster=${1:-paste.retiolum} + +case $hoster in + paste.retiolum|paste) + curl -sS -F 'file=@-;type=text/plain' \ + http://paste.retiolum:5000/+upload \ + | sed -n 's|.*href="\([^"]*\).*|http://paste.retiolum\1\n|p' + ;; + ix.io) + curl -sS -F 'f:1=<-' ix.io + ;; + *) + usage + ;; +esac -- cgit v1.2.3 From 5c4ddbcdc097cd7b4a66423c72d6768d3e2a80d8 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sat, 16 May 2015 22:01:44 +0200 Subject: util/bin/paste: remove unnessecery part from link --- util/bin/paste | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/bin/paste b/util/bin/paste index be29c78f..b7cc6c99 100755 --- a/util/bin/paste +++ b/util/bin/paste @@ -15,7 +15,7 @@ case $hoster in paste.retiolum|paste) curl -sS -F 'file=@-;type=text/plain' \ http://paste.retiolum:5000/+upload \ - | sed -n 's|.*href="\([^"]*\).*|http://paste.retiolum\1\n|p' + | sed -n 's|.*href="\([^#]*\).*|http://paste.retiolum\1\n|p' ;; ix.io) curl -sS -F 'f:1=<-' ix.io -- cgit v1.2.3 From 7958dc4e3e1cf7eea79cc587ed6b98cdabc71893 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 19 May 2015 14:28:27 +0200 Subject: google.currency: fix typo in usage --- util/bin/google.currency | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/bin/google.currency b/util/bin/google.currency index 8219a866..8a3f708f 100755 --- a/util/bin/google.currency +++ b/util/bin/google.currency @@ -6,7 +6,7 @@ sc=${SC:="eur"} usage(){ echo 'TC= targetcurrency, valid strings are in the style of "usd", "eur" or "sgd". default "usd"' - echo 'SC= sourcecurrency, same TC, default is eur' + echo 'SC= sourcecurrency, same as TC, default is eur' echo 'Example: TC="sgd" ./currency.google 11' exit 0 -- cgit v1.2.3 From c5a4be51df09659d9bbf7da573b4568ce56b7514 Mon Sep 17 00:00:00 2001 From: lassulus Date: Tue, 19 May 2015 14:43:14 +0200 Subject: google-utils: add language reference --- util/bin/google.text2speech | 1 + util/bin/google.translate | 1 + 2 files changed, 2 insertions(+) diff --git a/util/bin/google.text2speech b/util/bin/google.text2speech index 061bb1c8..cd387cc0 100755 --- a/util/bin/google.text2speech +++ b/util/bin/google.text2speech @@ -5,6 +5,7 @@ TL=${TL:="en"} usage(){ echo 'TL= can specifiy which language to use, default is "en"' + echo 'valid languages: https://cloud.google.com/translate/v2/using_rest#language-params' echo 'Example: TL="de" ./text2speech.google "whats up?" | mpv -' exit 0 } diff --git a/util/bin/google.translate b/util/bin/google.translate index 06c6a5a8..a8ccd8cc 100755 --- a/util/bin/google.translate +++ b/util/bin/google.translate @@ -7,6 +7,7 @@ tl=${TL:="en"} usage(){ echo 'TL= targetlanguage, valid strings are in the style of "en", "pl" or "de". default "en"' echo 'SL= sourcelanguage, same TL, default is auto' + echo 'valid languages: https://cloud.google.com/translate/v2/using_rest#language-params' echo 'Example: TL="de" ./translate.google "whats up?"' exit 0 -- cgit v1.2.3