diff options
-rwxr-xr-x | boot/tor.sh | 80 | ||||
-rw-r--r-- | god/kachelmann/.gitignore | 2 | ||||
-rw-r--r-- | god/kachelmann/Makefile | 7 | ||||
-rwxr-xr-x | god/kachelmann/wetter | 6 | ||||
m--------- | minikrebs | 0 | ||||
-rw-r--r-- | retiolum/hosts/cband | 16 | ||||
-rwxr-xr-x | util/bin/naturalvoices.att | 2 |
7 files changed, 89 insertions, 24 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/kachelmann/.gitignore b/god/kachelmann/.gitignore deleted file mode 100644 index 050dfb2e..00000000 --- a/god/kachelmann/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -conditions.pl -.*.swp diff --git a/god/kachelmann/Makefile b/god/kachelmann/Makefile deleted file mode 100644 index 3343d941..00000000 --- a/god/kachelmann/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -.PHONY: infect -install: - # punani -Ei w3m php php-xml-simple - ln -s $$PWD/conditions ../bin/conditions - ln -s $$PWD/wetter ../bin/wetter - ln -s ${INSTALL_DIR}conditions ${INSTALL_DIR}kachelmann - diff --git a/god/kachelmann/wetter b/god/kachelmann/wetter deleted file mode 100755 index 957e13e2..00000000 --- a/god/kachelmann/wetter +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/perl -use XML::Simple; -my $result = `w3m -dump "http://www.google.com/ig/api?weather=70327-stuttgart&hl=de"`; -my $xml = new XML::Simple; -my $data = $xml->XMLin($result); -print ("$data->{weather}->{current_conditions}->{condition}->{data} bei $data->{weather}->{current_conditions}->{temp_c}->{data} Grad Zelsius\n"); 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/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 |