summaryrefslogtreecommitdiffstats
path: root/filehooker/root-image/krebs
diff options
context:
space:
mode:
Diffstat (limited to 'filehooker/root-image/krebs')
-rwxr-xr-xfilehooker/root-image/krebs/etc/Reaktor/commands/onion3
-rwxr-xr-xfilehooker/root-image/krebs/etc/Reaktor/commands/shares2
-rw-r--r--filehooker/root-image/krebs/etc/Reaktor/config.py39
3 files changed, 44 insertions, 0 deletions
diff --git a/filehooker/root-image/krebs/etc/Reaktor/commands/onion b/filehooker/root-image/krebs/etc/Reaktor/commands/onion
new file mode 100755
index 00000000..8631fa79
--- /dev/null
+++ b/filehooker/root-image/krebs/etc/Reaktor/commands/onion
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+sudo -u tor cat /var/lib/tor/hidden_service/hostname || echo "no hidden service configured"
diff --git a/filehooker/root-image/krebs/etc/Reaktor/commands/shares b/filehooker/root-image/krebs/etc/Reaktor/commands/shares
new file mode 100755
index 00000000..1601d584
--- /dev/null
+++ b/filehooker/root-image/krebs/etc/Reaktor/commands/shares
@@ -0,0 +1,2 @@
+#!/bin/sh
+df -h | grep '/media/'
diff --git a/filehooker/root-image/krebs/etc/Reaktor/config.py b/filehooker/root-image/krebs/etc/Reaktor/config.py
new file mode 100644
index 00000000..501edb70
--- /dev/null
+++ b/filehooker/root-image/krebs/etc/Reaktor/config.py
@@ -0,0 +1,39 @@
+import socket
+
+debug = False
+
+name = socket.gethostname()
+
+irc_alarm_timeout = 300
+irc_hammer_interval = 10
+irc_kill_timeout = 360
+irc_nickname = name
+irc_server = 'irc.freenode.org'
+irc_port = 6667
+irc_channels = [
+ '#filehooker'
+]
+
+def default_command(cmd):
+ return {
+ 'capname': cmd,
+ 'pattern': '^(?:' + name + '|\\*):\\s*' + cmd + '\\s*(?:\\s+(?P<args>.*))?$',
+ 'argv': [ 'commands/' + cmd ] }
+
+commands = [
+ default_command('caps'),
+ default_command('hello'),
+ default_command('reload'),
+ default_command('badcommand'),
+ default_command('rev'),
+ 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' ] }
+]