summaryrefslogtreecommitdiffstats
path: root/filehooker/root-image/krebs/etc
diff options
context:
space:
mode:
Diffstat (limited to 'filehooker/root-image/krebs/etc')
-rw-r--r--filehooker/root-image/krebs/etc/Reaktor/admin.lst0
-rw-r--r--filehooker/root-image/krebs/etc/Reaktor/auth.lst0
-rwxr-xr-xfilehooker/root-image/krebs/etc/Reaktor/commands/ftpget58
-rwxr-xr-xfilehooker/root-image/krebs/etc/Reaktor/commands/identify22
-rwxr-xr-xfilehooker/root-image/krebs/etc/Reaktor/commands/io25
-rwxr-xr-xfilehooker/root-image/krebs/etc/Reaktor/commands/ips2
-rwxr-xr-xfilehooker/root-image/krebs/etc/Reaktor/commands/list_downloads8
-rwxr-xr-xfilehooker/root-image/krebs/etc/Reaktor/commands/onion3
-rwxr-xr-xfilehooker/root-image/krebs/etc/Reaktor/commands/reboot3
-rwxr-xr-xfilehooker/root-image/krebs/etc/Reaktor/commands/refresh_shares4
-rwxr-xr-xfilehooker/root-image/krebs/etc/Reaktor/commands/shares2
-rwxr-xr-xfilehooker/root-image/krebs/etc/Reaktor/commands/update-search3
-rw-r--r--filehooker/root-image/krebs/etc/Reaktor/config.py60
-rw-r--r--filehooker/root-image/krebs/etc/authorized_keys6
-rw-r--r--filehooker/root-image/krebs/etc/vsftpd.conf12
15 files changed, 0 insertions, 208 deletions
diff --git a/filehooker/root-image/krebs/etc/Reaktor/admin.lst b/filehooker/root-image/krebs/etc/Reaktor/admin.lst
deleted file mode 100644
index e69de29b..00000000
--- a/filehooker/root-image/krebs/etc/Reaktor/admin.lst
+++ /dev/null
diff --git a/filehooker/root-image/krebs/etc/Reaktor/auth.lst b/filehooker/root-image/krebs/etc/Reaktor/auth.lst
deleted file mode 100644
index e69de29b..00000000
--- a/filehooker/root-image/krebs/etc/Reaktor/auth.lst
+++ /dev/null
diff --git a/filehooker/root-image/krebs/etc/Reaktor/commands/ftpget b/filehooker/root-image/krebs/etc/Reaktor/commands/ftpget
deleted file mode 100755
index 74e76f8e..00000000
--- a/filehooker/root-image/krebs/etc/Reaktor/commands/ftpget
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/bin/sh
-# usage: $0 [-d] uri sharename[/subdirs]
-exec 2>&1
-set -euf
-ncdc_user=hooker
-usage(){
- cat <<EOF
-usage: $0 [-d] uri share[/subdirs]
- -d -- uri is a directory to be mirrored
- share -- vag[0-n]
-
-EOF
-}
-examples(){
- cat <<EOF
-examples: ftpget -d http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/0.8 vag0/firefox_releases
- -> 0.8 directory is stored to /media/vag0/firefox_releases
-
- ftpget -d http://speedtest.qsc.de/10MB.qsc vag0/
- -> 10MB.qsc is stored to /media/vag0/10MB.qsc
-EOF
-}
-if test "${1:--h}" == '-h' -o "${1:-}" == '--help';then
- usage
- examples
- exit 0
-fi
-if test ${1:-} == '-d' ;then
- is_dir=true
- shift
-fi
-
-target="${1:-}"
-if !( echo "$target" | egrep -q '^(ftps*://|https*://)' );then
- exit 23
-fi
-
-share=$( printf "%s" "${2?provide share name}" |head -1 | sed 's#\.\./##')
-sharepath=/media/${share%%/*}
-realshare="/media/$share"
-test ! -e "$sharepath" && echo "$sharepath does not exist!" && exit 23
-
-sudo -u $ncdc_user /usr/bin/mkdir -p "$realshare"
-
-if test -z ${is_dir:-};then
- cmd="lftpget \"$target\""
-else
- cmd="lftp -e \"mirror;exit\" $target"
-fi
-
- if ! sudo -u $ncdc_user /usr/bin/tmux has-session -t dl >/dev/null 2>&1 ;then
- sudo -u $ncdc_user /usr/bin/tmux new-session -s dl -d -c "$realshare" "$cmd"
- else
- sudo -u $ncdc_user /usr/bin/tmux new-window -t dl -c "$realshare" "$cmd"
- fi
-#sudo -u $ncdc_user /usr/bin/tmux new-window -t dl
-#cd "$realshare" ;sudo -u hooker /usr/bin/lftpget "$target"
-echo "download started, check with 'list_downloads'"
diff --git a/filehooker/root-image/krebs/etc/Reaktor/commands/identify b/filehooker/root-image/krebs/etc/Reaktor/commands/identify
deleted file mode 100755
index c2fb2c58..00000000
--- a/filehooker/root-image/krebs/etc/Reaktor/commands/identify
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/usr/bin/env python
-import imp
-import os,sys
-
-def load_config(filename):
- dirname = os.path.dirname(filename)
- modname, ext = os.path.splitext(os.path.basename(filename))
- file, pathname, description = imp.find_module(modname, [ dirname ])
- return imp.load_module(modname, file, pathname, description)
-
-config = load_config(os.environ['config_filename'])
-
-with open(config.admin_file) as f:
- for line in f:
- nick,secret = line.split()
- if sys.argv[1] == secret:
- print("identified you as %s!"%nick)
- with open(config.auth_file,'a+') as g:
- g.write(os.environ['_prefix'] +"\n")
- sys.exit(0)
-
-print("unable to identify you, sorry")
diff --git a/filehooker/root-image/krebs/etc/Reaktor/commands/io b/filehooker/root-image/krebs/etc/Reaktor/commands/io
deleted file mode 100755
index eb04ae9b..00000000
--- a/filehooker/root-image/krebs/etc/Reaktor/commands/io
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/usr/bin/zsh
-printf '%-10s %-7s %-7s %-7s %-7s\n' IFACE rxkB/s txkB/s rxTotal txTotal
-sar -n DEV 1 3 | grep Average: | grep -v IFACE | grep -v ' lo ' | while read line;do
- dev=$(echo $line | awk '{print $2}')
- rxkb=$(echo $line | awk '{print $5}')
- txkb=$(echo $line | awk '{print $6}')
- total_bytes_r=$(cat /proc/net/dev | grep ${dev}: | awk '{print $2}')
- total_bytes_t=$(cat /proc/net/dev | grep ${dev}: | awk '{print $10}')
-
- printf '%-10s %-7s %-7s %-7s %-7s\n' $dev $rxkb $txkb $((total_bytes_r / (1024*1024))) $((total_bytes_t / (1024*1024)))
-done
-printf "%-10s %-7s %-7s\n" "DSK" "rxkB/s" "txkB/s"
-sar -p -d 1 3 | grep Average: | grep -v ' DEV ' |while read line;
-do
- dsk=$(echo $line | awk '{print $2}')
- rd_sec=$(echo $line | awk '{print $4}')
- wr_sec=$(echo $line | awk '{print $5}')
- if echo $dsk | egrep -q '(sd|hd|vd)';then
- # TODO for some reason 0.00 can only be interpreted correctly as arithmetic
- # expession by zsh
- #
- # rd is counted in blocks (which is 512 bytes)
- printf "%-10s %-7.2f %-7.2f\n" "/dev/$dsk" "$((rd_sec*2))" "$((wr_sec*2))"
- fi
-done
diff --git a/filehooker/root-image/krebs/etc/Reaktor/commands/ips b/filehooker/root-image/krebs/etc/Reaktor/commands/ips
deleted file mode 100755
index 17c39658..00000000
--- a/filehooker/root-image/krebs/etc/Reaktor/commands/ips
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-ip addr | grep 'inet ' | awk '{print $2}' | grep -v 127.0.0.1 | grep .
diff --git a/filehooker/root-image/krebs/etc/Reaktor/commands/list_downloads b/filehooker/root-image/krebs/etc/Reaktor/commands/list_downloads
deleted file mode 100755
index f53067d8..00000000
--- a/filehooker/root-image/krebs/etc/Reaktor/commands/list_downloads
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-ncdc_user=hooker
-count=$(sudo -u $ncdc_user /usr/bin/tmux list-windows -t dl 2>/dev/null| wc -l)
-
-test $count -eq 0 && echo "no downloads running" && exit 0
-for i in $(seq 0 $(($count-1)));do
- sudo -u $ncdc_user /usr/bin/tmux capture-pane -t dl:$i -p | grep -v '^$' | tail -n 1
-done
diff --git a/filehooker/root-image/krebs/etc/Reaktor/commands/onion b/filehooker/root-image/krebs/etc/Reaktor/commands/onion
deleted file mode 100755
index 1a202991..00000000
--- a/filehooker/root-image/krebs/etc/Reaktor/commands/onion
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-sudo -u tor /krebs/bin/tor-get-hidden-service.sh || echo "no hidden service configured"
diff --git a/filehooker/root-image/krebs/etc/Reaktor/commands/reboot b/filehooker/root-image/krebs/etc/Reaktor/commands/reboot
deleted file mode 100755
index a264831a..00000000
--- a/filehooker/root-image/krebs/etc/Reaktor/commands/reboot
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-echo "system is going down"
-sudo /usr/bin/reboot
diff --git a/filehooker/root-image/krebs/etc/Reaktor/commands/refresh_shares b/filehooker/root-image/krebs/etc/Reaktor/commands/refresh_shares
deleted file mode 100755
index 1005998b..00000000
--- a/filehooker/root-image/krebs/etc/Reaktor/commands/refresh_shares
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-ncdc_user=hooker
-sudo /krebs/bin/refresh-shares.ship 2>&1
-sudo -u $ncdc_user /krebs/bin/update-search.sh 2>&1
diff --git a/filehooker/root-image/krebs/etc/Reaktor/commands/shares b/filehooker/root-image/krebs/etc/Reaktor/commands/shares
deleted file mode 100755
index 1601d584..00000000
--- a/filehooker/root-image/krebs/etc/Reaktor/commands/shares
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-df -h | grep '/media/'
diff --git a/filehooker/root-image/krebs/etc/Reaktor/commands/update-search b/filehooker/root-image/krebs/etc/Reaktor/commands/update-search
deleted file mode 100755
index 1db1c1b2..00000000
--- a/filehooker/root-image/krebs/etc/Reaktor/commands/update-search
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-ncdc_user=hooker
-sudo -u $ncdc_user /krebs/bin/update-search.sh
diff --git a/filehooker/root-image/krebs/etc/Reaktor/config.py b/filehooker/root-image/krebs/etc/Reaktor/config.py
deleted file mode 100644
index 5e07b659..00000000
--- a/filehooker/root-image/krebs/etc/Reaktor/config.py
+++ /dev/null
@@ -1,60 +0,0 @@
-import socket
-
-debug = False
-
-name = socket.gethostname()
-
-irc_alarm_timeout = 300
-irc_hammer_interval = 10
-irc_kill_timeout = 360
-irc_nickname = name
-#irc_server = 'elchirc.nsupdate.info'
-irc_server = 'irc.freenode.net'
-irc_restart_timeout = 5
-irc_port = 6667
-irc_channels = [
- '#filehooker'
-]
-
-admin_file='admin.lst'
-auth_file='auth.lst'
-
-def default_command(cmd):
- return {
- 'capname': cmd,
- 'pattern': '^(?:' + name + '|\\*):\\s*' + cmd + '\\s*(?:\\s+(?P<args>.*))?$',
- 'argv': [ 'commands/' + cmd ] }
-
-public_commands = [
- default_command('caps'),
- default_command('hello'),
- default_command('search'),
- default_command('list_downloads'),
- default_command('badcommand'),
- default_command('rev'),
- default_command('io'),
- default_command('ips'),
- default_command('uptime'),
- default_command('shares'),
- default_command('onion'),
- default_command('nocommand'),
- # command not found
- { 'pattern': '^(?:' + name + '|\\*):.*',
- 'argv': [ 'commands/respond','You are made of stupid!'] },
- # "highlight"
- { 'pattern': '.*\\b' + name + '\\b.*',
- 'argv': [ 'commands/say', 'I\'m famous' ] },
- # identify via direct connect
- { 'capname': 'identify',
- 'pattern': 'identify' + '\\s*(?:\\s+(?P<args>.*))?$',
- 'argv' : [ 'commands/identify' ]}
-
-]
-
-commands = [
- default_command('reload'),
- default_command('update-search'),
- default_command('refresh_shares'),
- default_command('ftpget'),
- default_command('reboot')
-]
diff --git a/filehooker/root-image/krebs/etc/authorized_keys b/filehooker/root-image/krebs/etc/authorized_keys
deleted file mode 100644
index f9446825..00000000
--- a/filehooker/root-image/krebs/etc/authorized_keys
+++ /dev/null
@@ -1,6 +0,0 @@
-ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC7YrLdnXDRU2XEdZDu1BmgiT0Vaxplf3bfvSm+5o3g4AcR2yCv7h2D633c9uA0gq52EJ3V5m8B1ZcxqA0zqDptKwx+ZTMUGDls7StH5xpJyk9j5gf8DzyDLQPQG2IYszCH+8esKjo3BOFxfey8NaX+k6gvQsG3lyV0PjLvvIy4gDuMn6dPZfVAlwNYFOUNgwpku3W3A0d+UFyVjt3/sgZxM+8C3y6QE1gwT5/NfBbHM5vaEqjHcVq1ui+7a4iOXFGKkZDcd7EX6cQZSbCzZL7sZ0OmB1WpAsDCvIXfzX1YfNA0sso7ldSF6ZUGNgwEk1LootnQlCK/dfbM+i62SZ+1 tv@iiso
-ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCv9TTt4FkzT3jlQ0VS2tX/GpQO9Ef0wIQ+g96foe4qSniBwR667T1gIhURrod/p7N9oQcWRrNohjgmSB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image/krebs/etc/vsftpd.conf b/filehooker/root-image/krebs/etc/vsftpd.conf
deleted file mode 100644
index d7fbcd3c..00000000
--- a/filehooker/root-image/krebs/etc/vsftpd.conf
+++ /dev/null
@@ -1,12 +0,0 @@
-anonymous_enable=YES
-dirmessage_enable=YES
-xferlog_enable=YES
-connect_from_port_20=YES
-ftpd_banner=Welcome to Filehooker share, use dc++ if you can
-listen=YES
-no_anon_password=YES
-anon_root=/media
-max_per_ip=2
-max_clients=20
-local_max_rate=1000000
-seccomp_sandbox=NO