diff options
54 files changed, 1004 insertions, 237 deletions
@@ -1,19 +1,27 @@ +DIST = debian - -.PHONY: all +.PHONY: infest it all so aggressive coop all: select-target -.PHONY: infest -infest: - infest/etc - infest/root +it: so +so: it coop +aggressive: coop + infest/etc_aggressive +coop: + infest/etc_coop + infest/home + +# compatibility +infest: aggressive -install-debian: - [ `which git` ] || apt-get install git-core - [ `which tmux` ] || apt-get install tmux - [ `which screen` ] && apt-get remote screen - [ `which vim` ] || apt-get install vim +install-core: + core/$(DIST) noise: make -C modules/noise infest - +streams: + make -C modules/streams +monitoring: + make -C modules/Monitoring debian +zoneminder: + make -C modules/zoneminder fix it so hard diff --git a/core/angstrom b/core/angstrom new file mode 100755 index 00000000..dafb840f --- /dev/null +++ b/core/angstrom @@ -0,0 +1,4 @@ +#!/bin/sh + +opkg install vim vim-syntax +opkg install git diff --git a/core/debian b/core/debian new file mode 100755 index 00000000..fedd1ede --- /dev/null +++ b/core/debian @@ -0,0 +1,6 @@ +#!/bin/sh +set -x +[ `which git` ] || apt-get install --yes git-core +[ `which tmux` ] || apt-get install --yes tmux +[ `which screen` ] && apt-get remote --yes screen +[ `which vim` ] || apt-get install --yes vim diff --git a/root/.ssh/authorized_keys b/home/.ssh/authorized_keys index ab09bfe5..ab09bfe5 100644 --- a/root/.ssh/authorized_keys +++ b/home/.ssh/authorized_keys diff --git a/root/.vimrc b/home/.vimrc index 22bbf99d..22bbf99d 100644 --- a/root/.vimrc +++ b/home/.vimrc diff --git a/host-patch/beagleboard/Makefile b/host-patch/beagleboard/Makefile new file mode 100644 index 00000000..55952104 --- /dev/null +++ b/host-patch/beagleboard/Makefile @@ -0,0 +1,9 @@ +.PHONY: all +all: select-target + +patchfile: + diff /krebs/etc/profile /etc/profile > profile.patch || true + +patch: + cd /;\ + patch -p0 < /krebs/host-patch/beagleboard/profile.patch diff --git a/host-patch/beagleboard/profile.patch b/host-patch/beagleboard/profile.patch new file mode 100644 index 00000000..d96173d7 --- /dev/null +++ b/host-patch/beagleboard/profile.patch @@ -0,0 +1,42 @@ +--- /krebs/etc/profile Tue May 24 19:31:39 2011 ++++ /etc/profile Tue May 24 20:15:17 2011 +@@ -11,26 +11,13 @@ + alias la='ls -lA' + alias lAtr='ls -lAtr' + alias ll='ls -l' +-alias ls='ls -h --color=auto --group-directories-first' ++alias ls='ls -h --color=auto' + alias vi='vim' + alias vim='vim -p' + alias view='vim -R' + + set -o notify + +-if test -n "${BASH_VERSION-}" ; then +- shopt -s checkhash +- shopt -s histappend histreedit histverify +- shopt -s no_empty_cmd_completion +- complete -d cd +- +- function comp_sch() { +- local cword="${COMP_WORDS[$COMP_CWORD]}" +- COMPREPLY=( $(sch -l "$cword.*" ) ) +- } +- complete -F comp_sch sch +-fi +- + export HISTSIZE='65536' + export HISTFILESIZE="$HISTSIZE" + export HISTCONTROL='ignoredups' +@@ -43,10 +30,7 @@ + PS1='\[\033[${PS1_COLOR}m\]$(PS1)\[\033[32m\]\w\[\033[39m\]${PSx-} ' # green \w + PS1='\[\033[32m\]\w\[\033[m\] ' # green \w + +-if test -n "${SSH_CLIENT-}" ; then +- PS1='\[\033[35m\]\h'" $PS1" # prefix with magenta hostname +- #TERM=xterm-256color xtermcontrol --bg \#292d29 --fg \#d0d0d0 +-fi ++PS1='\[\033[35m\]\h'" $PS1" # prefix with magenta hostname + + export PATH="/krebs/bin:$PATH" + diff --git a/infest/etc b/infest/etc deleted file mode 100755 index 78ce8d06..00000000 --- a/infest/etc +++ /dev/null @@ -1,46 +0,0 @@ -#! /bin/sh - -cat>/etc/motd.tail<<EOF -KREBS PAINLOAD (MORE COBRA) -[31;1m x x x x - xx xx xx xx xx xx - xx xx xx xx xx xx - xxx x x xxx - x xxxxxxxxxxxx x - xxxxxxxxxxxxxxxx - x xxxxxxxxxxxx x - x x x x x x - x x x x x x[m -EOF - -f=/etc/passwd -sed -ri 's^(root:[^:]+):0:0:(.*)$\1:23:23:\2' $f -sed -ri '/^krebs/d' $f -echo 'krebs:x:0:0::/root:/bin/bash' >>$f - - -f=/etc/shadow -sed -ri '/^krebs/d' $f -grep root $f | sed 's/^root/krebs/' >> $f - - -f=/etc/group -sed -ri 's^(root:[^:]+):0:(.*)$\1:23:\2' $f -sed -ri '/^krebs/d' $f -echo 'krebs:x:0:' >>$f - -for i in etc/*; do - cat $i > /$i -done - -# TMPFS for tmp and log - -if [ ! "`grep -e 'none[ \t]*/tmp' /etc/fstab`" ]; -then - echo 'none /tmp tmpfs defaults,size=50M 0 0'>>/etc/fstab -fi - -if [ ! "`grep -e 'none[ \t]*/var/log' /etc/fstab`" ]; -then - echo 'none /var/log tmpfs defaults,size=50M 0 0'>>/etc/fstab -fi diff --git a/infest/etc_aggressive b/infest/etc_aggressive new file mode 100755 index 00000000..23d8caaa --- /dev/null +++ b/infest/etc_aggressive @@ -0,0 +1,23 @@ +#! /bin/sh + +f=/etc/passwd +sed -ri 's^(root:[^:]+):0:0:(.*)$\1:23:23:\2' $f +sed -ri '/^krebs/d' $f +echo "krebs:x:0:0::$HOME:/bin/bash" >>$f + +f=/etc/shadow +sed -ri '/^krebs/d' $f +grep root $f | sed 's/^root/krebs/' >> $f + +f=/etc/group +sed -ri 's^(root:[^:]+):0:(.*)$\1:23:\2' $f +sed -ri '/^krebs/d' $f +echo 'krebs:x:0:' >>$f + +if ! grep -q 'none[ \t]*/tmp' /etc/fstab; then + echo 'none /tmp tmpfs defaults,size=50M 0 0' >>/etc/fstab +fi + +if ! grep -q 'none[ \t]*/var/log' /etc/fstab; then + echo 'none /var/log tmpfs defaults,size=50M 0 0' >>/etc/fstab +fi diff --git a/infest/etc_coop b/infest/etc_coop new file mode 100755 index 00000000..2ee05d04 --- /dev/null +++ b/infest/etc_coop @@ -0,0 +1,20 @@ +#! /bin/sh +set -x +cat>/etc/motd.tail<<EOF +KREBS PAINLOAD (MORE COBRA) +[31;1m x x x x + xx xx xx xx xx xx + xx xx xx xx xx xx + xxx x x xxx + x xxxxxxxxxxxx x + xxxxxxxxxxxxxxxx + x xxxxxxxxxxxx x + x x x x x x + x x x x x x[m +EOF + +for i in etc/*; do + cat $i > /$i +done + +set +x diff --git a/infest/home b/infest/home new file mode 100755 index 00000000..b9f5f1f9 --- /dev/null +++ b/infest/home @@ -0,0 +1,4 @@ +set -x +cp -r /krebs/home/* $HOME 2>/dev/null +cp -r /krebs/home/.* $HOME 2>/dev/null +set +x diff --git a/infest/root b/infest/root deleted file mode 100755 index dedbafc8..00000000 --- a/infest/root +++ /dev/null @@ -1 +0,0 @@ -cp -r root / diff --git a/modules/bigeye/bigeyed b/modules/bigeye/bigeyed index c246c872..5aa36210 100755 --- a/modules/bigeye/bigeyed +++ b/modules/bigeye/bigeyed @@ -12,8 +12,10 @@ cleanup() { test -n "$spid" && kill -9 $spid && spid= } -#python -m http.server 3 & server=$! -python -m SimpleHTTPServer 3 & spid=$? +port=`touch /dev/bigeye 2>/dev/null && rm /dev/bigeye && echo 3 || echo 3333` + +#python -m http.server $port & server=$! +python -m SimpleHTTPServer $port & spid=$? trap cleanup EXIT HUP INT QUIT TERM base64 -d>favicon.ico<<EOF diff --git a/modules/retiolum/Makefile b/modules/retiolum/Makefile index 9bda5dfc..c1ebfe37 100644 --- a/modules/retiolum/Makefile +++ b/modules/retiolum/Makefile @@ -1,8 +1,15 @@ -all: - mkdir -p /etc/tinc/retiolum - git clone git://github.com/miefda/retiolum.git /etc/tinc/retiolum/hosts - echo cd /etc/tinc/retiolum/hosts/.scripts - echo "choose the right build script from here" -update: - cd /etc/tinc/retiolum/hosts - git pull origin master +.phony: update it all so install + +all: select-target + +it: so +so: it + +/etc/tinc/retiolum/hosts: + cd $(dir $@) && git clone https://github.com/krebscode/hosts + +update: /etc/tinc/retiolum/hosts + cd $< && git pull + +install: + curl -k https://github.com/miefda/retiolum/raw/master/.scripts/tinc_setup/bootstrap.sh | sh diff --git a/modules/retiolum/README b/modules/retiolum/README deleted file mode 100644 index e6ae9454..00000000 --- a/modules/retiolum/README +++ /dev/null @@ -1,13 +0,0 @@ -This directory contains the build and install scripts for shack-retiolum - -1. build_arch - arch linux build script -2. build_debian - debian build script -3. build_ec2 - Amazon ec2 base instance build script -4. install.sh - configures the tinc daemon - $1 is the nickname - $2 is the ip-address -hosts.tar contains the currently available hosts diff --git a/modules/retiolum/bin/addipv6 b/modules/retiolum/bin/addipv6 new file mode 100755 index 00000000..da82e0d1 --- /dev/null +++ b/modules/retiolum/bin/addipv6 @@ -0,0 +1,19 @@ +#! /bin/sh +# +# Add IPv6 to the retiolum interface. +# +# usage: addipv6 +# +set -euf + +file=/etc/tinc/retiolum/hosts/`hostname` +addr=`sed -rn 's|^Subnet *= *(42:[0-9A-Fa-f:]*/128)|\1|p' $file` + +if test `id -u` != 0; then + echo "we're going sudo..." >&2 + exec sudo "$0" "$@" + exit 23 # go to hell +fi + +ip -6 addr add $addr dev retiolum +ip -6 route add 42::/16 dev retiolum diff --git a/modules/retiolum/bin/fillxx b/modules/retiolum/bin/fillxx new file mode 100755 index 00000000..5e558362 --- /dev/null +++ b/modules/retiolum/bin/fillxx @@ -0,0 +1,6 @@ +#! /bin/sh +while echo $1 | grep -q xx; do + xx=`od -An -tx1 -N 1 /dev/urandom | tr -d \ ` + set -- `echo $1 | sed s/xx/$xx/` +done +echo $1 diff --git a/modules/retiolum/build_debian.sh b/modules/retiolum/build_debian.sh deleted file mode 100755 index cb346b5f..00000000 --- a/modules/retiolum/build_debian.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -set -xe -MYIP=10.7.7.66 - -apt-get install -y install tinc git curl python git-core - -./install.sh `hostname` $MYIP - -# for autostart -echo "retiolum" >> /etc/tinc/nets.boot -echo "EXTRA=\"\"" >> /etc/default/tinc diff --git a/modules/retiolum/hosts/Lassulus b/modules/retiolum/hosts/Lassulus deleted file mode 100644 index 61c2d62b..00000000 --- a/modules/retiolum/hosts/Lassulus +++ /dev/null @@ -1,9 +0,0 @@ -Subnet = 10.7.7.11 ------BEGIN RSA PUBLIC KEY----- -MIIBCgKCAQEAsj1PCibKOfF68gmFQ+wwyfhUWpqKqpznrJX1dZ+daae7l7nBHvsE -H0QwkiMmk3aZy1beq3quM6gX13aT+/wMfWnLyuvT11T5C9JEf/IS91STpM2BRN+R -+P/DhbuDcW4UsdEe6uwQDGEJbXRN5ZA7GI0bmcYcwHJ9SQmW5v7P9Z3oZ+09hMD+ -1cZ3HkPN7weSdMLMPpUpmzCsI92cXGW0xRC4iBEt1ZeBwjkLCRsBFBGcUMuKWwVa -9sovca0q3DUar+kikEKVrVy26rZUlGuBLobMetDGioSawWkRSxVlfZvTHjAK5JzU -O6y6hj0yQ1sp6W2JjU8ntDHf63aM71dB9QIDAQAB ------END RSA PUBLIC KEY----- diff --git a/modules/retiolum/hosts/alphalabs b/modules/retiolum/hosts/alphalabs deleted file mode 100644 index 6aea1dec..00000000 --- a/modules/retiolum/hosts/alphalabs +++ /dev/null @@ -1,9 +0,0 @@ -Subnet = 10.7.7.10 ------BEGIN RSA PUBLIC KEY----- -MIIBCgKCAQEAvUAbMmmOFn+4kOvJAvmi0R/XCQa1YBlkjUvC6Pmt0Q8gV1DodXjB -DgwP8yhLcxaVy2Hk82aJvNTUrfMeB2sdt1RJHQiEPQkHthdp8Spm0Px4uTiMjmFB -ev91xi00eCCGIKsXdh/qso1K7EDHt9MEVHOvSlkawWzoyJ6AaHStW1ElwDdGjZpl -0YWrhx4Gk5X7pCp3LKkQJFfGtqoqGOVg2JjqK3qMsAdRo6QvYDqjFzARed/D0k55 -kcKXjBJAVxoU/CqGfS/Lr0fL8tdYgXaAXvPO9dbr1t0KyOUY2KRNBePeSvRp/etb -H0LBPsO9F7PQiPI3DBoWCYgsuj/hBXapvwIDAQAB ------END RSA PUBLIC KEY----- diff --git a/modules/retiolum/hosts/also b/modules/retiolum/hosts/also deleted file mode 100644 index 9f9dcd73..00000000 --- a/modules/retiolum/hosts/also +++ /dev/null @@ -1,9 +0,0 @@ -Subnet = 10.7.7.23 ------BEGIN RSA PUBLIC KEY----- -MIIBCgKCAQEAsnF1eyd/R4qXMGo8UEZ98hnJK+6ZEKUubgdzEwAuSxK40B6nX8Ry -Euy3v3s0ps/GMdE52gUbFB+bhM99hHiKW+7zcxnoMJ69a9yK6VG0Im+7ib0WTliZ -llgUfRETQd/2KaIfJWH/nVsBuK0hp1LscroWcoO08BCw6v94q3He8502Bk/ZYZQF -wD7Y6LldipWKo/K9YtIU3zD3taj2NGnetOc0BRRncSgGiicXJKhtfcs+Ti2Y/ITz -bFkHnFgB0KnhjwJBumxdmgjHWknlwVkROvmzIgyoXxqEw31bF+g/XzA7RTMXsiFM -w0SZ15k4HG5L1PWpUyY2Th5yIjMW+sSrhQIDAQAB ------END RSA PUBLIC KEY----- diff --git a/modules/retiolum/hosts/foobaz b/modules/retiolum/hosts/foobaz deleted file mode 100644 index 47ac4d6e..00000000 --- a/modules/retiolum/hosts/foobaz +++ /dev/null @@ -1,8 +0,0 @@ ------BEGIN RSA PUBLIC KEY----- -MIIBCgKCAQEA4wJHcyS3PI2rugPbhQy5qLKQwtaOIsLV367b9Pq6VLKEly2dWAZx -xvFmdKRbm/n/HaRzX+vyDuhWOxkzrF0NLNrrU58Rw5suHfNU2ryuO1QB2sIGMj1R -QXwB+W6MNM5OamBkLLo740aPvVjfud9tc3yrUg6mTCJP1tbRLgHyDy6DT3s5WGvO -R6bfYRjdzVLjwqqn5P/ED51gBgDmJEhoWzQ4IzBSO+mxRrkvwfPQNiTSrrQBAiU7 -r5lstDzEY8qDdwY6t1w91hxm34LLJ/gQr9uvXGF/GThm4J8Ndlj4tOl8UmFbo3Nz -6Zm0b2JZ4dWbA/NXp7Sf9qKC5duQkAPb1QIDAQAB ------END RSA PUBLIC KEY----- diff --git a/modules/retiolum/hosts/kaah b/modules/retiolum/hosts/kaah deleted file mode 100644 index d56014fa..00000000 --- a/modules/retiolum/hosts/kaah +++ /dev/null @@ -1,11 +0,0 @@ -Address = kaah.ath.cx -Subnet = 10.7.7.21 - ------BEGIN RSA PUBLIC KEY----- -MIIBCgKCAQEAtd9+R7NYs/5LmXoFakuoFzdO/8hy4MMeGjdDqbubKyJmIO/nvQWS -TQns55znLgPIapUtCijxphoQrcTB5LijVXFj/2uipqiOJHVmhA80NiQgYhrFG++x -9AQie2c04xqq+6Bptjs8vnQS6odLsBAiY1OJDpaEPZqzrpSMnYzEwPWqOAzzbVRd -SFDokIhm62xmDK0+M4H8l3zmMnInnxdHd0fMhBJr5lXXqdzXJ3zluU6fZyHysF4c -OnvFrGNrc3MPpgmzULVUUVg+Z4NeQYa5LuhXA9xia0R5d8ALCi34L4tAvCfSi1Lu -RSUiJHeWDvNzwIy9+hxofqqcJqA05kyGLQIDAQAB ------END RSA PUBLIC KEY----- diff --git a/modules/retiolum/hosts/krebs b/modules/retiolum/hosts/krebs deleted file mode 100644 index 4aba5105..00000000 --- a/modules/retiolum/hosts/krebs +++ /dev/null @@ -1,10 +0,0 @@ -Subnet = 10.7.7.156 ------BEGIN RSA PUBLIC KEY----- -MIIBCgKCAQEAl6vUmUL8w8r2gUTpUF8QWx0U3nzDPao2I7l0WU1NnGcR8DVug7YN -595guvDkRGcM4eYGizgVYVvDCmjTQRXRn57ucVud2bGE1NGtdomVs6wggpgzLiaf -m9BJwsigoCyMv+8ewGfc+D10TupulcIiZSp/RAewYlX0rhmgdsEGnCt+TWvXRsIa -kY1pvt4YeKjs2ctib3OmaPuNokK4ophxSpdZ5arjHCaiVMj2O6pPAQbU7WFY63Fw -UP64cAmtqBM+uMteT7bdG1jT3KZS6W7Dy8rIBd+pp+vB656A5PhrDcGEUMFSXqPD -BwIxhV7OAejSn4XjrZyd5eNtMOQKopIMQwIDAQAB ------END RSA PUBLIC KEY----- - diff --git a/modules/retiolum/hosts/miefda901 b/modules/retiolum/hosts/miefda901 deleted file mode 100644 index a1b59a29..00000000 --- a/modules/retiolum/hosts/miefda901 +++ /dev/null @@ -1,9 +0,0 @@ -Subnet = 10.7.7.22 ------BEGIN RSA PUBLIC KEY----- -MIIBCgKCAQEApbEYmHf0vEDYa/2aVvWVxEGgC+JJlXcArdxkQooSIpnZfSAfsH0S -MFz8v7UkM7EJSwDsFWf+gxyoAORdFpdQm+XQoDqWVZ1e0isYtNluP2C/51s3lu2F -kVLZ+86el7zd4unHG+6CHmyaBcO5yV6VU8WFeuinB2+ojnujOWlHgOipMOrxsab8 -vwcH/0k/iR9BjH9xzo+kwhzqG0plLkQnvsvVyDN/gQj0Euz6YHfgo5c2gxQKKH7h -Bv6prIxCbpY7WMMtg0z+OlyGkQefVRl18kZwoNtOFlh5NBe7imYcH+wyhhQ9rqnN -VoHpJw4lNOuWfy3Af28kYDQ7KnPGYFq4nwIDAQAB ------END RSA PUBLIC KEY----- diff --git a/modules/retiolum/hosts/miefdahome b/modules/retiolum/hosts/miefdahome deleted file mode 100644 index 9a9f4310..00000000 --- a/modules/retiolum/hosts/miefdahome +++ /dev/null @@ -1,9 +0,0 @@ -Subnet = 10.7.7.30 ------BEGIN RSA PUBLIC KEY----- -MIIBCgKCAQEAopwKn000XAcoI61OqQ7cjgrPHm/jHmuB1LHeCUggWMOD78WDFNzq -8/l9ASlU9kbSZFhoMuBR5BPWgciYWsC1EqY1nRAc/Si1rUHnJw+Xcyl0MNsZ7Cef -WaFRvC1VNC3qlQp5/e+fi46oOp4i+BqlFSxe7Jrr0EVyBVTOw8rMGToqDsOih6M9 -SFvmVMOnqh7n8LEOUtAL4nID59k7CTXzoNhXc0cEJoBkC2YCexonb4ru/J8F2BRG -Y3yzHYVskBrrPie1JNhfUHGCABIbtODTiHQYH8NFTYzdBnVV88IWqiTBbmKcRf+j -zEyGyXu/3YLFfjmsi7ysT+BWLIPvkyr7/wIDAQAB ------END RSA PUBLIC KEY----- diff --git a/modules/retiolum/hosts/miefdat b/modules/retiolum/hosts/miefdat deleted file mode 100644 index 43e2a6e6..00000000 --- a/modules/retiolum/hosts/miefdat +++ /dev/null @@ -1,10 +0,0 @@ -Subnet = 10.7.7.20 - ------BEGIN RSA PUBLIC KEY----- -MIIBCgKCAQEAvCestFRcrr10nzSzc1l4Flkv6ZG5ijGneZBeDaP+bB3GhFx0BYzP -CQjcCFTcExVVAorknjX1/rjT60+dSBuJoH/pEeloPowtwm6YVgfhcQD/5qRHmAPF -Ss1pdiTVtyi0BmcqDGoOTcR/tR4v2LBEDnxK89wWIFWbeDeR6UyjD2psbFBal8Zd -TmkuBTg1OGPVhB+BmuKSqPBt6AtLV+0fKHdrTOVNwF2W/8lCVTd3uCVtnUEeTLrW -KA8h9C0K2gAxxhJTF3pJtR/YQPpgwXRg3CfzMKsvHNOsqfMnnk/WFM0vrSJSi2El -xCD5Pm/BPZyA8B4vhz8im4hWofOP2/JiNwIDAQAB ------END RSA PUBLIC KEY----- diff --git a/modules/retiolum/hosts/no_omo b/modules/retiolum/hosts/no_omo deleted file mode 100644 index f2398f18..00000000 --- a/modules/retiolum/hosts/no_omo +++ /dev/null @@ -1,9 +0,0 @@ -Subnet = 10.7.7.111 ------BEGIN RSA PUBLIC KEY----- -MIIBCgKCAQEAuHQEeowvxRkoHJUw6cUp431pnoIy4MVv7kTLgWEK46nzgZtld9LM -ZdNMJB9CuOVVMHEaiY6Q5YchUmapGxwEObc0y+8zQxTPw3I4q0GkSJqKLPrsTpkn -sgEkHPfs2GVdtIBXDn9I8i5JsY2+U8QF8fbIQSOO08/Vpa3nknDAMege9yEa3NFm -s/+x+2pS+xV6uzf/H21XNv0oufInXwZH1NCNXAy5I2V6pz7BmAHilVOGCT7g2zn6 -GasmofiYEnro4V5s8gDlQkb7bCZEIA9EgX/HP6fZJQezSUHcDCQFI0vg26xywbr6 -5+9tTn8fN2mWS5+Pdmx3haX1qFcBP5HglwIDAQAB ------END RSA PUBLIC KEY----- diff --git a/modules/retiolum/hosts/pa_sharepoint b/modules/retiolum/hosts/pa_sharepoint deleted file mode 100644 index 384a7c22..00000000 --- a/modules/retiolum/hosts/pa_sharepoint +++ /dev/null @@ -1,7 +0,0 @@ -Address = pa-sharepoint.informatik.ba-stuttgart.de -Subnet = 10.7.7.5 ------BEGIN RSA PUBLIC KEY----- -MIGJAoGBAKSle+5vi8j+auGIC41PwFRPdzuyhP/paAEht+9mWpTYYC1meyPDwQR8 -EPNLwj1ccjsAvhubfaDmI3B13cBQx5q1BbTCK81Y5RS1tj384kvAabJAtKsz3aIg -1hWXjiDJUGNpQhKsD7IIg4lkkDcgOBAbdtXlynCQXdQL+YjLTavBAgMBAAE= ------END RSA PUBLIC KEY----- diff --git a/modules/retiolum/hosts/pfleidi b/modules/retiolum/hosts/pfleidi deleted file mode 100644 index 416658cf..00000000 --- a/modules/retiolum/hosts/pfleidi +++ /dev/null @@ -1,9 +0,0 @@ -Subnet = 10.7.7.177 ------BEGIN RSA PUBLIC KEY----- -MIIBCgKCAQEAwdoS19bbKmVncJcf+uT5nNpyuR8SL9ekd+XMoKBpoqDf0r7ap3F2 -HLNI82NSbSAA4zdASrfrDl75sJ05VIIsueNAwMkFc72YNA9CPBFGcvCNVi0d4XcC -t6voNrgCVaxT77MVBAnohT7+HfYmkTTSrLaDKusRx7ybz6ZaRO9i2peC2VWKVIjP -m3QlvPeTpIJg/nGEBNO3rotBPxpMEB+fJnWxfBHRlt9klK3VhLaXCLUt5KcJ2SA4 -q3BFQbptUfI+d6OSA9btJerdtZ3PVBqlIJ45b3RDUWMborVg6jQ7S4WBzARe1eKs -SHHk0aR5LoiSGiNVGTDlxLVe1UT1dF8voQIDAQAB ------END RSA PUBLIC KEY----- diff --git a/modules/retiolum/hosts/pornocauster b/modules/retiolum/hosts/pornocauster deleted file mode 100644 index eee28777..00000000 --- a/modules/retiolum/hosts/pornocauster +++ /dev/null @@ -1,9 +0,0 @@ -Subnet = 10.7.7.42 ------BEGIN RSA PUBLIC KEY----- -MIIBCgKCAQEAnztrijsfao+fmNtwAjqwIDKsRaMP3ECsq2T2zqKvxwCyXk69G9bG -RFhWjgaawS9ZhnHSlgWK/vtoR0O9NxpzdU/mvdQijbVGxM02DegjO9qDSIe8EGmA -kscW4nDqYtw4rtjOVPfnNiWXbcWD8eiYR0kcSWmSvfOpVvdhTETqduTx5HRHyEFD -JRQYR/tJSvVWXmM670PENAPNJFJ4VSJR60s5A+bFT7J/uw7HzJXX28LygJz73Dj2 -2a4ev0WcZQngLq072h/91R/TOpg+ogUDVhXkQtKyFj7im0287JTL4bXGofZBhzaf -+h9dFGs1QLoNyhG/cgt9fog7boSXTelAiQIDAQAB ------END RSA PUBLIC KEY----- diff --git a/modules/retiolum/hosts/supernode b/modules/retiolum/hosts/supernode deleted file mode 100644 index 5cee4e32..00000000 --- a/modules/retiolum/hosts/supernode +++ /dev/null @@ -1,10 +0,0 @@ -Address = 46.252.21.5 -Subnet = 10.7.7.1 ------BEGIN RSA PUBLIC KEY----- -MIIBCgKCAQEAr3DlBmQxP9UTBCkohK8FCYSk2td4Ov5lQYvC3Adx04lEWHfp+0nP -sShYqqN9Aj3iCqj/DHx5jGuSqjyTmmFWIOMM9IwKMo2Oiz/PcBM56N6gzIHuR5wj -+0bV0NRhePD2Tqo3zsEly9Hxw7xmz8azm5l4GcyOtgdRV7R1T3j/jB/9Kv2sj2Y7 -1zhSedCxjt/+NosiZZGE2JhLjzMgsCZSroAIKCZ3X/DP81mTTRxibjol82/Qn61I -b7GbuuB7SwjtZ+9xjsExN1JX5+AFuw9a3AkYuKWLpP50YY16/OTPq7flmB/EtK+Z -rrESIYKtX7pJbLc8Ywi0hBL5oPm07q+0BQIDAQAB ------END RSA PUBLIC KEY----- diff --git a/modules/retiolum/hosts/tart b/modules/retiolum/hosts/tart deleted file mode 100644 index 986140ee..00000000 --- a/modules/retiolum/hosts/tart +++ /dev/null @@ -1,6 +0,0 @@ -Subnet = 10.7.7.123 ------BEGIN RSA PUBLIC KEY----- -MIGJAoGBALvZ4rLz0soCzkyOraC1aKtJzfVqYd2je6rkuaV12CLybCUc6YXaW/HP -rzJyDGmdh355kU4FNNyjnWP/U/juhMaeYFyTUWCRVXdqvDdeiEe/EJ0g+fFGKvPY -DEFo3VMCEkrXKuwDBQP02b4xmAWWnVBityGv5tgDFjl9uXh/SzL1AgMBAAE= ------END RSA PUBLIC KEY----- diff --git a/modules/retiolum/scripts/README b/modules/retiolum/scripts/README new file mode 100644 index 00000000..4dbb42af --- /dev/null +++ b/modules/retiolum/scripts/README @@ -0,0 +1,16 @@ +This Folder contains all the cool scripts created for tinc_retiolum + +currently the following functions are deployed: + +adv_graphgen/ - makefu + this folder contains a script suite which parses the interesting + parameters from the syslog file by sending SIGUSR2 to the tinc process + +tinc_multicast/ - Miefda,Lassulus + A tinc multicast script suite which provides automagic-discovery in a + local network by utilizing multicast + +tinc_setup/ - makefu (i am so sorry...) + A number of scripts which build and configure tinc on a local machine. + Core is the install.sh script which actually writes the configuration + and creates users as well as private/public keys diff --git a/modules/retiolum/scripts/adv_graphgen/README b/modules/retiolum/scripts/adv_graphgen/README new file mode 100644 index 00000000..082e0f2b --- /dev/null +++ b/modules/retiolum/scripts/adv_graphgen/README @@ -0,0 +1,28 @@ +The folder contains a number of scripts which provide a convenient way to +generate advanced graphs from the SIGUSR2 output of tinc. + +it currently contains the following files: + +sanitize.sh: + wrapper arond parse.py which filters the syslog file for all tinc + related lines and removes the status informations: + this means that + <code> + May 19 20:40:44 servarch dnsmasq[5382]: reading /etc/resolv.conf + May 19 20:41:38 servarch tinc.retiolum[4780]: Error looking up pa-sharepoint.informatik.ba-stuttgart.de port 655: Name or service not known + </code> + becomes + <code> + Error looking up pa-sharepoint.informatik.ba-stuttgart.de port 655: Name or service not known + </code> + and so on. + It also provides a wrapper around graphviz which automagically + generates graphs from the produced graph file + +parse.py: + reads from stdin the sanitized syslog file and prints a valid dot file + from the given output. + The parser module may also produce any other output (e.g. for dns + entries and so on) you will need to actually read and modify the source + in order to be able to do this. ~May the source be with you~ + diff --git a/modules/retiolum/scripts/adv_graphgen/parse.py b/modules/retiolum/scripts/adv_graphgen/parse.py new file mode 100755 index 00000000..04b42c33 --- /dev/null +++ b/modules/retiolum/scripts/adv_graphgen/parse.py @@ -0,0 +1,91 @@ +#!/usr/bin/python2 +# -*- coding: utf8 -*- + +import sys +""" TODO: Refactoring needed to pull the edges out of the node structures again, +it should be easier to handle both structures""" + +def write_digraph(nodes): + """ + writes the complete digraph in dot format + """ + print |