summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlassulus <lassulus@googlemail.com>2013-09-27 01:19:39 +0200
committerlassulus <lassulus@googlemail.com>2013-09-27 01:19:39 +0200
commit0467a9767dfe917e79183dcdae5b9dfdadd1442a (patch)
tree05500e73fb1fcc443c04cffdd7fc410b9f53e1fb
parent7d6249f234a59dc26bf0947b3f0a73651b7bdfe6 (diff)
parentd23bb310a7306950b45400816134010a9a7a9ed3 (diff)
Merge branch 'master' of github.com:krebscode/painload
-rwxr-xr-xboot/tor.sh80
-rw-r--r--god/ivan/announce.wavbin0 -> 691244 bytes
-rwxr-xr-xgod/ivan/ivan5
-rw-r--r--god/ivan/satz-liste1
m---------minikrebs0
-rw-r--r--retiolum/hosts/cband16
-rw-r--r--retiolum/hosts/filepimp11
-rwxr-xr-xutil/bin/naturalvoices.att2
8 files changed, 106 insertions, 9 deletions
diff --git a/boot/tor.sh b/boot/tor.sh
new file mode 100755
index 00000000..d257e955
--- /dev/null
+++ b/boot/tor.sh
@@ -0,0 +1,80 @@
+#!/bin/sh
+set -efu
+msg() { printf "$@\n" >&2 ;}
+info() { msg "** $@" ;}
+error() { msg "!! $@" ;}
+exists(){ type "$1" >/dev/null 2>/dev/null; }
+get_hostname(){
+ # finds the current hostname
+ # if ENV HOSTN is set echo $HOSTN
+
+ if [ -n "${HOSTN:-}" ] ; then printf "${HOSTN:-}"
+ elif exists hostname ; then printf "${HOSTNAME:-$(hostname)}"
+ elif exists uci ; then printf "$(uci get system.@system[0].hostname)"
+ elif [ -e /etc/hostname ] ;then printf "$(cat /etc/hostname)"
+ else printf "unknown"
+ fi
+}
+
+anytelnet(){
+ # find Telnet or similar
+ # requires exist
+ # if env TELNET is set, will be trying to run this
+ if [ -e "${TELNET:-does_not_exist}" ]; then
+ info"Will be using $TELNET as Telnet Client"
+ elif exists telnet >/dev/null;then
+ TELNET="`command -v telnet`"
+ elif exists nc >/dev/null;then
+ TELNET="`command -v nc`"
+ elif exists netcat >/dev/null;then
+ TELNET="`command -v netcat`"
+ elif exists busybox >/dev/null;then
+ TELNET="`command -v busybox` telnet"
+ else
+ error "Cannot find telnet binary, please install either telnet-client or busybox or netcat or provided TELNET environment.\nbailing out!"
+ return 1
+ fi
+ $TELNET $@
+}
+
+send_irc(){
+ to_dots(){ while read line; do printf .; done;}
+ ## reads from stdin, writes to IRC
+ ##
+ ## requires func: exists() anytelnet()
+ if [ -z "${HOSTN:-}" ]; then
+ HOSTN="$(get_hostname)"
+ info "no HOSTN given, using $HOSTN instead"
+ fi
+ IRCCHANNEL=${IRCCHANNEL:-"#krebs_incoming"}
+ IRCSERVER=${IRCSERVER:-"irc.freenode.net"}
+ IRCPORT=${IRCPORT:-6667}
+ NICK="${HOSTN}_$(head /dev/urandom | tr -dc "0123456789" | head -c3)"
+ info "starting irc connect as $NICK"
+ ( echo "NICK $NICK";
+ echo "USER $NICK $IRCSERVER bla : $NICK";
+ echo "JOIN $IRCCHANNEL";
+ sleep 23;
+ while read line; do echo "PRIVMSG $IRCCHANNEL :$line";sleep 1;done
+ sleep 5; ) | anytelnet $IRCSERVER $IRCPORT 2>/dev/null | to_dots
+}
+
+# can be set via env:
+# torrc - path to torrc (default: /etc/tor/torrc )
+# hidden_service_dir - path to hidden service (default: /var/lib/tor/hidden_service/ )
+
+torrc=${torrc:-/etc/tor/torrc}
+hidden_service_dir=${hidden_service_dir:-/var/lib/tor/hidden_service/}
+
+test -w "$torrc" || ( error "$torrc is not writable!"; exit 1 )
+if ! grep -q '^HiddenService' "$torrc" ;then
+ info "adding hidden service to $torrc"
+ cat >> "$torrc" << EOF
+HiddenServiceDir ${hidden_service_dir}
+HiddenServicePort 22 127.0.0.1:22
+EOF
+else
+ info "HiddenServiceDir or Port already in $torrc, skipping!"
+fi
+
+cat $hidden_service_dir/hostname | send_irc
diff --git a/god/ivan/announce.wav b/god/ivan/announce.wav
new file mode 100644
index 00000000..54ec73cf
--- /dev/null
+++ b/god/ivan/announce.wav
Binary files differ
diff --git a/god/ivan/ivan b/god/ivan/ivan
index c35cccf7..f8cbcb8b 100755
--- a/god/ivan/ivan
+++ b/god/ivan/ivan
@@ -8,6 +8,8 @@ k="${noise_capital-0}"
a="${noise_amplitude-600}"
g="${noise_gap-1}"
RND_DELAY=3600
+CACHE_DIR=/opt/ivan-cache
+export CACHE_DIR
#set -x
function helpme ()
{
@@ -26,9 +28,12 @@ EOF
while true
do
+ aplay announce.wav
if [ -n "${USING_ESPEAK:-}" ];then
espeak -v $v -p $p -k $k -a $a -g $g "`shuf \"$SATZ_LISTE\" | tail -1`"
else
+ ./naturalvoices_cached.sh "Achtung, Achtung, es erfolgt eine Durchsage!"
+ sleep 0.3
./naturalvoices_cached.sh "`shuf \"$SATZ_LISTE\" | tail -1`"
fi
[ ! "${1:-}" = "-d" ] && exit 0 # break if not daemonized
diff --git a/god/ivan/satz-liste b/god/ivan/satz-liste
index 048943ee..880bba45 100644
--- a/god/ivan/satz-liste
+++ b/god/ivan/satz-liste
@@ -37,3 +37,4 @@ mache dich mit den standorten der feuerlöscher vertraut
Steuerung Alt Entfernen
Leute die Nubsies von Netzwerk kabeln abbrechen, werden geschlagen
Setz dich, nimm dir nen Keks, machs dir Schön bequem
+warum liegt denn hier stroh rum
diff --git a/minikrebs b/minikrebs
-Subproject d44469e4fa51171c12fff95b1a3170eb8532869
+Subproject fa0c14a2c221da6e1f2f04c75fe8ed6bff858a6
diff --git a/retiolum/hosts/cband b/retiolum/hosts/cband
index 13affe45..51c51e9c 100644
--- a/retiolum/hosts/cband
+++ b/retiolum/hosts/cband
@@ -1,11 +1,11 @@
-Subnet = 10.243.254.234
-Subnet = 42:28e1:44f0:b33f:6b56:b974:e933:3223
+Subnet = 10.243.7.76
+Subnet = 42:c293:090f:df44:0926:c7af:5012:7cd8
-----BEGIN RSA PUBLIC KEY-----
-MIIBCgKCAQEA4LKFb2tfFwWrh79+J5Zpc2Y0egw/YcSwCrpyfHshrxnnXKyJfar9
-ZEtQwmKzzNflszvSyixdVfh/TJnGTJ6dCVGYvonARQiCyBvHMqF9WCVsgc7V2/dp
-2Lg2XsYzyoqd/IxAMGDPNGYfKM5ll3VzKWDgk4VhlBbU5pES/oiq/nkEDT3DkDW8
-8fXQvW8w/mc2s96wNobZVlnghF3+RklfIfOeoj/eM/DoVmmJyKmHlkkvJCE9tn7M
-xylJ8JoOnfXGJW7WVsNaIven+OkVFzyTAG+qeCitH0o8NA9ArIhxS7RwoDYv/pDC
-CBHXkVKriQLClSDirs4woqFVz+iMhnNS7wIDAQAB
+MIIBCgKCAQEA11kwqXkkDRmxmoZNFDqtUsxK6d/HzTdFC/v1V3fttePuYFiEOhZl
+rLBS3+Eei4CsQrOwnaRBhHdnoOZGEdxJmq3YXDWGoVAn4bEgommCddzssVzWtVMf
+hIntuCExczEMIY+MGzM3QupYxUgRRVjFtvxoC9kKOSlaq0BhkdJiWygzN/NUfqpv
+HgDufoAcORLQInTpmQYEkZO+XmXejcCY/C+VD0MENqj3SijGw9tm2YmInwSwZnwX
+Zjh2xn96QbV9O7bpfGHcLxWhsUyyRC46knbbBXuAdbDsa2TUdzT5D7nb/TLfP412
+agIhk+cwFM24y/ChHdfoUBakKF4wZI3l4wIDAQAB
-----END RSA PUBLIC KEY-----
diff --git a/retiolum/hosts/filepimp b/retiolum/hosts/filepimp
new file mode 100644
index 00000000..c689c885
--- /dev/null
+++ b/retiolum/hosts/filepimp
@@ -0,0 +1,11 @@
+Subnet = 10.243.153.102
+Subnet = 42:4b0b:d990:55ba:8da8:630f:dc0e:aae0
+
+-----BEGIN RSA PUBLIC KEY-----
+MIIBCgKCAQEA43w+A1TMOfugZ/CVwilJn4c36wWSjihaeVe7suZD0DSscKBcbkGg
+3dTCSTnu6Qb9sYd2mKebKXLreO6nhEEoFGsRU0yw/1h8gl7mWYEdTifPfvM5EWwS
+wkN9dJ5njwIUSRyWH7QTsLkiRJVFN2UxEwrhAbo1FJ7yuhRgAKqKJSN4yPVViZwR
+oHyyobvm/i2J+XSiDI9MRo74vNjnDLvO7R6ErIrhOPP1bD9fx3u+UYUfgS0iCO3X
+UN0duBz/faRcl6IRytZOuHaIp30eJ4850ZK8RPz/Dqqj+USMFq60i0oMsuAi/ljB
+8b+eQBt6OXu4MSntxoR8Ja7ht+EOTDnBOwIDAQAB
+-----END RSA PUBLIC KEY-----
diff --git a/util/bin/naturalvoices.att b/util/bin/naturalvoices.att
index 4590d913..ea893fc0 100755
--- a/util/bin/naturalvoices.att
+++ b/util/bin/naturalvoices.att
@@ -6,7 +6,7 @@ cd $(dirname $(readlink -f $0))
: ${1?please provide \$1 as text}
text=$(echo $* | sed 's/ /+/g')
-voice="reiner"
+voice="${voice:-reiner}"
OUTFILE="`mktemp /tmp/voice.XXXXXXXX`"
trap "rm $OUTFILE" TERM INT EXIT