diff options
40 files changed, 844 insertions, 12 deletions
diff --git a/Monitoring/htpasswd.users b/Monitoring/htpasswd.users new file mode 100644 index 00000000..7d4bbd6c --- /dev/null +++ b/Monitoring/htpasswd.users @@ -0,0 +1,2 @@ +nagiosadmin:wriRAagrgh5mk +shack:i8ZRZOQKu3mgw diff --git a/beep.lol b/beep.lol new file mode 100755 index 00000000..f9c29dba --- /dev/null +++ b/beep.lol @@ -0,0 +1 @@ +beep -l 350 -f 392 -D 100 --new -l 350 -f 392 -D 100 --new -l 350 -f 392 -D 100 --new -l 250 -f 311.1 -D 100 --new -l 25 -f 466.2 -D 100 --new -l 350 -f 392 -D 100 --new -l 250 -f 311.1 -D 100 --new -l 25 -f 466.2 -D 100 --new -l 700 -f 392 -D 100 --new -l 350 -f 587.32 -D 100 --new -l 350 -f 587.32 -D 100 --new -l 350 -f 587.32 -D 100 --new -l 250 -f 622.26 -D 100 --new -l 25 -f 466.2 -D 100 --new -l 350 -f 369.99 -D 100 --new -l 250 -f 311.1 -D 100 --new -l 25 -f 466.2 -D 100 --new -l 700 -f 392 -D 100 --new -l 350 -f 784 -D 100 --new -l 250 -f 392 -D 100 --new -l 25 -f 392 -D 100 --new -l 350 -f 784 -D 100 --new -l 250 -f 739.98 -D 100 --new -l 25 -f 698.46 -D 100 --new -l 25 -f 659.26 -D 100 --new -l 25 -f 622.26 -D 100 --new -l 50 -f 659.26 -D 400 --new -l 25 -f 415.3 -D 200 --new -l 350 -f 554.36 -D 100 --new -l 250 -f 523.25 -D 100 --new -l 25 -f 493.88 -D 100 --new -l 25 -f 466.16 -D 100 --new -l 25 -f 440 -D 100 --new -l 50 -f 466.16 -D 400 --new -l 25 -f 311.13 -D 200 --new -l 350 -f 369.99 -D 100 --new -l 250 -f 311.13 -D 100 --new -l 25 -f 392 -D 100 --new -l 350 -f 466.16 -D 100 --new -l 250 -f 392 -D 100 --new -l 25 -f 466.16 -D 100 --new -l 700 -f 587.32 -D 100 --new -l 350 -f 784 -D 100 --new -l 250 -f 392 -D 100 --new -l 25 -f 392 -D 100 --new -l 350 -f 784 -D 100 --new -l 250 -f 739.98 -D 100 --new -l 25 -f 698.46 -D 100 --new -l 25 -f 659.26 -D 100 --new -l 25 -f 622.26 -D 100 --new -l 50 -f 659.26 -D 400 --new -l 25 -f 415.3 -D 200 --new -l 350 -f 554.36 -D 100 --new -l 250 -f 523.25 -D 100 --new -l 25 -f 493.88 -D 100 --new -l 25 -f 466.16 -D 100 --new -l 25 -f 440 -D 100 --new -l 50 -f 466.16 -D 400 --new -l 25 -f 311.13 -D 200 --new -l 350 -f 392 -D 100 --new -l 250 -f 311.13 -D 100 --new -l 25 -f 466.16 -D 100 --new -l 300 -f 392.00 -D 150 --new -l 250 -f 311.13 -D 100 --new -l 25 -f 466.16 -D 100 --new -l 700 -f 392 diff --git a/census/arping_users.py b/census/arping_users.py index ec3557d4..934f9bea 100755 --- a/census/arping_users.py +++ b/census/arping_users.py @@ -29,8 +29,8 @@ def load_names(MAC_NAMES): def arping_helper(dic): return arpingy(**dic) -for first in range(1,3): - for second in range(255): +for first in range(1,4): + for second in range(256): data.append({'iprange':'10.42.'+str(first)+'.'+str(second),'iface':DEV}) names = load_names(MAC_NAMES) diff --git a/census/mac_names.lst b/census/mac_names.lst index ae58b539..85fbfb25 100644 --- a/census/mac_names.lst +++ b/census/mac_names.lst @@ -3,5 +3,12 @@ 00:26:c7:bd:a7:1a Martin 04:1e:64:05:39:28 Stephan 5c:59:48:22:2d:d2 Phil -00:21:00:fb:5c:b6 Kah Hah -00:1e:64:27:3b:72 Felix +00:21:00:fb:5c:b6 Kah-Hah +00:1e:64:27:3b:72 Felix +40:30:04:4f:de:73 Armin +00:26:c6:82:51:38 samuirai +3c:8b:fe:5c:4e:da Moh-Moh +00:26:bb:69:98:cc Jan +78:dd:08:d5:34:28 Patrick +78:ca:39:6e:ed:16 Tillman +00:22:43:25:61:79 Te vau diff --git a/cholerab/PROJECTS b/cholerab/PROJECTS new file mode 100644 index 00000000..6c9ac791 --- /dev/null +++ b/cholerab/PROJECTS @@ -0,0 +1,13 @@ +uPM: + GUI definieren und Testen +TODOer/TODO Jeopardy: + Schemata Sammelstelle (programme) +Miner MITM PoC: + Paper schreiben + Verschiedene wege miner zu manipulieren + DoS, verschiedene Wege +Mandatory Infest: + deploye die Coolen verkrebsungen, weniger intrusive + - das krebs logo + - PS1 variable + - tinc diff --git a/cholerab/README b/cholerab/README new file mode 100644 index 00000000..7b53aeaa --- /dev/null +++ b/cholerab/README @@ -0,0 +1,72 @@ + +~/p/krebscode/painload/infest/home + aggressive + cooperative + -- currently it is aggressive and stupid + +~/p/krebscode/painload/infest/etc + aggressive + cooperative + -- currently it is aggressive and stupid + + +- node install script + + +=== +# this is the current installation process [by example] +<code> + ssh root@pornocauster -p 2222 + git clone https://github.com/krebscode/painload.git /krebs + cd /krebs + apt-get install --yes make + make infest + shutdown -r now + + ssh -i .ssh/krebs/also.id_rsa krebs@pornocauster -p 2222 +</code> + +=== + +- conflicting ~/.profile +- morse: beep not found wegen rc.local +- /etc/.vimrc legacy compat + + +~/p/krebscode/painload/node/Makefile + ./configure --prefix=$HOME + and ensure that the resulting bin is in $PATH + which node or build + + +//krebscode/painload/retiolum/scripts/tinc_setup/install.sh or something + should be called by painload/infest + and should be enterprise enough to be infested multiple times + -- please see how infest/bin/make-patch is generating a patch, that gets + applied by Makefile + +//krebscode/painload/noise + - should be infested host-specifically + - i.e. to start automatically at KREBS + +//krebscode/painload/noise + - NOISE-STREAMS-MODULE + - should have a module to allow switching of the streams + - should have a module to allow managing of streams + - is this mergable with noise/modules/stream [by chris] + - or can we replace noise/modules/stream + +//krebscode/painload/streams + - should be infested host-specifically + - i.e. to start automatically at KREBS + - the last stream should be playbacked + - should be controlable by noise [see NOISE-STREAM-MODULE] + + +## merge conflicts below +view.py: contains view classes for cholerab +cholerab.py: main file + +start with : +python cholerab.py + diff --git a/cholerab/RETIOLUM b/cholerab/RETIOLUM new file mode 100644 index 00000000..66de3521 --- /dev/null +++ b/cholerab/RETIOLUM @@ -0,0 +1,8 @@ +Makefile: + update: + when hosts folder is not yet a git repository, check out + http://github.com/krebscode/hosts.git (no https, because this fails on old systems) + +Non-Root Supernodes: (makefu) + check out the DUP!step problem on krebsbob.no.de and krebs.no.de, + fix it for more profit! diff --git a/cholerab/UPM b/cholerab/UPM new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/cholerab/UPM diff --git a/cholerab/WISHLIST b/cholerab/WISHLIST new file mode 100644 index 00000000..b4b8e861 --- /dev/null +++ b/cholerab/WISHLIST @@ -0,0 +1,5 @@ +Krebs Modules Wishlist + +Temperature Threshold Sensor: + send out alarm via espeak or mail or irc or usb rocket launcher to open + the window when the temperature is too high diff --git a/cholerab/bling/README_svg b/cholerab/bling/README_svg new file mode 100644 index 00000000..887f7e04 --- /dev/null +++ b/cholerab/bling/README_svg @@ -0,0 +1,2 @@ +The Krebs' color is R:228 G:0 B:43 + diff --git a/cholerab/bling/filter.sh b/cholerab/bling/filter.sh new file mode 100755 index 00000000..39bac362 --- /dev/null +++ b/cholerab/bling/filter.sh @@ -0,0 +1,3 @@ +#! /bin/sh +set -euf +echo "[31;1m`cat "$1"`[m" | sed 's/x/[41m [m/g' diff --git a/cholerab/bling/krebs-v1.txt b/cholerab/bling/krebs-v1.txt new file mode 100644 index 00000000..c9852522 --- /dev/null +++ b/cholerab/bling/krebs-v1.txt @@ -0,0 +1,9 @@ + 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 diff --git a/cholerab/bling/krebs-v2.txt b/cholerab/bling/krebs-v2.txt new file mode 100644 index 00000000..f8006628 --- /dev/null +++ b/cholerab/bling/krebs-v2.txt @@ -0,0 +1,13 @@ + x x x x +xx x xx xx xx x +xx x xx xx xx x + xxx x x xxx + xxx xxxxx xxx + x xxxxxxx x + xxxxxxxxxxxxx + xxxxxxx + xxxxxxxxxxx + x xxx x + x x x x x x + x x x x x x + x xx x x xx x diff --git a/cholerab/bling/krebs-v2.xcf b/cholerab/bling/krebs-v2.xcf Binary files differnew file mode 100644 index 00000000..2bada0ce --- /dev/null +++ b/cholerab/bling/krebs-v2.xcf diff --git a/cholerab/bling/krebs-v2f.txt b/cholerab/bling/krebs-v2f.txt new file mode 100644 index 00000000..95f367ae --- /dev/null +++ b/cholerab/bling/krebs-v2f.txt @@ -0,0 +1,13 @@ + xx xx xx xx +xxxx xx xxxx xxxx xxxx xx +xxxx xx xxxx xxxx xxxx xx + xxxxxx xx xx xxxxxx + xxxxxx xxxxxxxxxx xxxxxx + xx xxxxxxxxxxxxxx xx + xxxxxxxxxxxxxxxxxxxxxxxxxx + xxxxxxxxxxxxxx + xxxxxxxxxxxxxxxxxxxxxx + xx xxxxxx xx + xx xx xx xx xx xx + xx xx xx xx xx xx + xx xxxx xx xx xxxx xx diff --git a/cholerab/bling/krebs_42.svg b/cholerab/bling/krebs_42.svg new file mode 100644 index 00000000..4bf9a2b1 --- /dev/null +++ b/cholerab/bling/krebs_42.svg @@ -0,0 +1,86 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + id="svg2876" + version="1.1" + inkscape:version="0.47 r22583" + width="891" + height="743" + sodipodi:docname="krebs_plain.svg"> + <metadata + id="metadata2882"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title></dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <defs + id="defs2880"> + <inkscape:perspective + sodipodi:type="inkscape:persp3d" + inkscape:vp_x="0 : 0.5 : 1" + inkscape:vp_y="0 : 1000 : 0" + inkscape:vp_z="1 : 0.5 : 1" + inkscape:persp3d-origin="0.5 : 0.33333333 : 1" + id="perspective2884" /> + </defs> + <sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1436" + inkscape:window-height="856" + id="namedview2878" + showgrid="false" + inkscape:snap-to-guides="true" + inkscape:snap-grids="true" + inkscape:snap-bbox="true" + inkscape:zoom="0.81830417" + inkscape:cx="267.69326" + inkscape:cy="420.38158" + inkscape:window-x="4" + inkscape:window-y="0" + inkscape:window-maximized="1" + inkscape:current-layer="svg2876" /> + <path + style="fill:#e4002b;fill-opacity:1" + d="m 244.0219,617.03493 c -0.21558,-0.56245 -0.27058,-11.13745 -0.12223,-23.5 l 0.26974,-22.47737 22,-0.5 22,-0.5 0.26031,-44.76841 0.26031,-44.7684 23.23969,0.2684 23.23969,0.26841 0.257,67.7787 c 0.20362,53.70074 -0.004,67.87425 -1,68.23871 -2.76038,1.01019 -90.01678,0.97154 -90.40451,-0.04 z" + id="path3699" /> + <path + style="fill:#e4002b;fill-opacity:1" + d="m 382.14297,617.3264 c -0.26297,-0.69786 -0.5896,-41.99384 -0.72584,-91.76884 l -0.24772,-90.5 -68,0 -68,0 -0.5,22.5 -0.5,22.5 -21.97012,0.27012 c -13.36172,0.16427 -22.37364,0.67349 -23,1.29959 -0.67593,0.67568 -1.20172,24.12474 -1.52988,68.22989 l -0.5,67.2004 -21.93,0.27 c -12.06149,0.14851 -22.28992,-0.0899 -22.72984,-0.52984 -0.43992,-0.43992 -0.82782,-31.38642 -0.86202,-68.77 l -0.0622,-67.97016 22.79201,-0.5 22.79201,-0.5 0.5,-46 0.5,-46 45,-0.5 45,-0.5 0,-22 0,-22 -68.5,-0.5 -68.5,-0.5 -0.26044,-44.96044 c -0.1701,-29.364 -0.62018,-45.32106 -1.29748,-46 -0.61887,-0.62038 -9.58642,-1.24117 -22.23955,-1.53956 l -21.20253,-0.5 -0.5,-44.20083 c -0.32035,-28.31979 -0.87003,-44.57056 -1.52988,-45.22989 -0.62605,-0.62554 -9.644729,-1.13497 -23.000009,-1.29916 l -21.97011,-0.27012 0,-46.49999 0,-46.500003 22.5,-0.5 22.499999,-0.5 0.5,-22.5 0.5,-22.500001 23,0 23,0 0.5,69.000001 0.5,68.999993 22.5,0 22.5,0 0.5,-68.999993 0.5,-69.000001 22.5,0 22.5,0 0,114.999994 0,115 -21.20253,0.5 c -13.06388,0.30807 -21.61243,0.91088 -22.27041,1.57041 -0.70812,0.7098 -0.97678,8.28986 -0.79747,22.5 l 0.27041,21.42959 43.93935,0.26065 c 29.90385,0.17739 44.27815,-0.0774 45,-0.79755 0.64951,-0.64801 1.25447,-9.47074 1.56065,-22.76065 l 0.5,-21.70245 21.20125,-0.5 c 15.49421,-0.36541 21.55085,-0.8496 22.5,-1.79875 0.94915,-0.94915 1.43334,-7.00579 1.79875,-22.5 l 0.5,-21.20125 21.4221,-0.27039 c 13.74507,-0.17349 21.89799,-0.66533 22.75,-1.37244 1.86497,-1.54779 1.93794,-42.34431 0.0779,-43.54815 -0.6875,-0.44496 -10.925,-1.03402 -22.75,-1.30902 l -21.5,-0.5 -0.26043,-44.93956 c -0.14323,-24.716769 0.0913,-45.291272 0.52112,-45.721122 0.42985,-0.42985 21.24704,-0.821311 46.26043,-0.869914 l 45.47888,-0.08837 0.5,68.309476 0.5,68.30949 45.5,0 45.5,0 0,-21.5 0,-21.5 -23,-0.5 -23,-0.5 0,-46.49999 0,-46.500005 46.5,0 46.5,0 0.25532,90.903935 c 0.1807,64.33897 0.57702,91.29158 1.35619,92.23042 0.83731,1.0089 6.16306,1.39102 22.24469,1.59606 l 21.1438,0.26958 0.5,21.70245 c 0.30615,13.2884 0.91117,22.11267 1.56054,22.76054 0.72197,0.7203 15.24754,0.97491 45.5,0.79755 l 44.43946,-0.26054 0.27041,-21.42959 c 0.17932,-14.2111 -0.0893,-21.79015 -0.79755,-22.5 -0.66039,-0.66191 -9.35028,-1.26123 -22.77041,-1.57041 l -21.70245,-0.5 -0.5,-44.20083 c -0.32022,-28.30803 -0.87016,-44.57069 -1.52947,-45.22947 -0.62361,-0.62311 -9.494,-1.13529 -22.5,-1.29917 l -21.47053,-0.27053 0,-46.49999 0,-46.500005 22,-0.5 22,-0.5 0.5,-22.5 0.5,-22.500001 23.5,0 23.5,0 0.5,69.000001 0.5,68.999995 22,0 22,0 0.5,-68.999995 0.5,-69.000001 23,0 23,0 0,115.499996 0,115.5 -22.5,0.5 -22.5,0.5 -0.5,45.5 -0.5,45.5 -68.5,0.5 -68.5,0.5 0,22 0,22 45.5,0.5 45.5,0.5 0.5,46 0.5,46 22.5,0.5 22.5,0.5 0,69 0,69 -23,0 -23,0 -0.25705,-67.95705 c -0.17172,-45.39696 -0.60248,-68.30329 -1.29755,-69 -0.62555,-0.62702 -9.69546,-1.24235 -22.74295,-1.54295 l -21.70245,-0.5 -0.27081,-20.92262 c -0.17312,-13.3749 -0.66822,-21.40146 -1.37245,-22.25 -1.53612,-1.85091 -133.80901,-1.97511 -135.65674,-0.12738 -0.9155,0.9155 -1.2,22.47577 -1.2,90.94098 0,49.35754 -0.36973,89.96949 -0.82162,90.24878 -0.45189,0.27928 -10.91439,0.58003 -23.25,0.66833 l -22.42838,0.16054 -0.5,-68.35931 -0.5,-68.35932 -22,0 -22,0 -0.5,68.5 -0.5,68.5 -22.77416,0.26884 c -17.67944,0.20869 -22.88111,-0.015 -23.25228,-1 z" + id="path3697" /> + <path + style="fill:#e4002b;fill-opacity:1" + d="m 567.13302,617.3174 c -0.2648,-0.69275 -0.36494,-31.85984 -0.22253,-69.25984 l 0.25892,-68 23,0 23,0 0.5,45 0.5,45 22,0.5 22,0.5 0,23.5 0,23.5 -45.27747,0.26021 c -35.68808,0.2051 -45.37943,-0.007 -45.75892,-1 z" + id="path2921" /> + <text + xml:space="preserve" + style="font-size:40px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Adore64;-inkscape-font-specification:Adore64" + x="152.65131" + y="714.11517" + id="text3744"><tspan + sodipodi:role="line" + id="tspan3746" + x="152.65131" + y="714.11517" + style="font-size:85px;fill:#e4002b;fill-opacity:1">42::/16</tspan></text> +</svg> diff --git a/cholerab/bling/krebs_plain.svg b/cholerab/bling/krebs_plain.svg new file mode 100644 index 00000000..3d048097 --- /dev/null +++ b/cholerab/bling/krebs_plain.svg @@ -0,0 +1,75 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + id="svg2876" + version="1.1" + inkscape:version="0.47 r22583" + width="891" + height="743" + sodipodi:docname="Screen Shot 2011-08-04 at 04.13.20.png"> + <metadata + id="metadata2882"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title></dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <defs + id="defs2880"> + <inkscape:perspective + sodipodi:type="inkscape:persp3d" + inkscape:vp_x="0 : 0.5 : 1" + inkscape:vp_y="0 : 1000 : 0" + inkscape:vp_z="1 : 0.5 : 1" + inkscape:persp3d-origin="0.5 : 0.33333333 : 1" + id="perspective2884" /> + </defs> + <sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1436" + inkscape:window-height="856" + id="namedview2878" + showgrid="false" + inkscape:snap-to-guides="true" + inkscape:snap-grids="true" + inkscape:snap-bbox="true" + inkscape:zoom="0.81830417" + inkscape:cx="445.5" + inkscape:cy="371.5" + inkscape:window-x="4" + inkscape:window-y="0" + inkscape:window-maximized="1" + inkscape:current-layer="svg2876" /> + <path + style="fill:#e4002b;fill-opacity:1" + d="m 244.0219,617.03493 c -0.21558,-0.56245 -0.27058,-11.13745 -0.12223,-23.5 l 0.26974,-22.47737 22,-0.5 22,-0.5 0.26031,-44.76841 0.26031,-44.7684 23.23969,0.2684 23.23969,0.26841 0.257,67.7787 c 0.20362,53.70074 -0.004,67.87425 -1,68.23871 -2.76038,1.01019 -90.01678,0.97154 -90.40451,-0.04 z" + id="path3699" /> + <path + style="fill:#e4002b;fill-opacity:1" + d="m 382.14297,617.3264 c -0.26297,-0.69786 -0.5896,-41.99384 -0.72584,-91.76884 l -0.24772,-90.5 -68,0 -68,0 -0.5,22.5 -0.5,22.5 -21.97012,0.27012 c -13.36172,0.16427 -22.37364,0.67349 -23,1.29959 -0.67593,0.67568 -1.20172,24.12474 -1.52988,68.22989 l -0.5,67.2004 -21.93,0.27 c -12.06149,0.14851 -22.28992,-0.0899 -22.72984,-0.52984 -0.43992,-0.43992 -0.82782,-31.38642 -0.86202,-68.77 l -0.0622,-67.97016 22.79201,-0.5 22.79201,-0.5 0.5,-46 0.5,-46 45,-0.5 45,-0.5 0,-22 0,-22 -68.5,-0.5 -68.5,-0.5 -0.26044,-44.96044 c -0.1701,-29.364 -0.62018,-45.32106 -1.29748,-46 -0.61887,-0.62038 -9.58642,-1.24117 -22.23955,-1.53956 l -21.20253,-0.5 -0.5,-44.20083 c -0.32035,-28.31979 -0.87003,-44.57056 -1.52988,-45.22989 -0.62605,-0.62554 -9.644729,-1.13497 -23.000009,-1.29916 l -21.97011,-0.27012 0,-46.49999 0,-46.500003 22.5,-0.5 22.499999,-0.5 0.5,-22.5 0.5,-22.500001 23,0 23,0 0.5,69.000001 0.5,68.999993 22.5,0 22.5,0 0.5,-68.999993 0.5,-69.000001 22.5,0 22.5,0 0,114.999994 0,115 -21.20253,0.5 c -13.06388,0.30807 -21.61243,0.91088 -22.27041,1.57041 -0.70812,0.7098 -0.97678,8.28986 -0.79747,22.5 l 0.27041,21.42959 43.93935,0.26065 c 29.90385,0.17739 44.27815,-0.0774 45,-0.79755 0.64951,-0.64801 1.25447,-9.47074 1.56065,-22.76065 l 0.5,-21.70245 21.20125,-0.5 c 15.49421,-0.36541 21.55085,-0.8496 22.5,-1.79875 0.94915,-0.94915 1.43334,-7.00579 1.79875,-22.5 l 0.5,-21.20125 21.4221,-0.27039 c 13.74507,-0.17349 21.89799,-0.66533 22.75,-1.37244 1.86497,-1.54779 1.93794,-42.34431 0.0779,-43.54815 -0.6875,-0.44496 -10.925,-1.03402 -22.75,-1.30902 l -21.5,-0.5 -0.26043,-44.93956 c -0.14323,-24.716769 0.0913,-45.291272 0.52112,-45.721122 0.42985,-0.42985 21.24704,-0.821311 46.26043,-0.869914 l 45.47888,-0.08837 0.5,68.309476 0.5,68.30949 45.5,0 45.5,0 0,-21.5 0,-21.5 -23,-0.5 -23,-0.5 0,-46.49999 0,-46.500005 46.5,0 46.5,0 0.25532,90.903935 c 0.1807,64.33897 0.57702,91.29158 1.35619,92.23042 0.83731,1.0089 6.16306,1.39102 22.24469,1.59606 l 21.1438,0.26958 0.5,21.70245 c 0.30615,13.2884 0.91117,22.11267 1.56054,22.76054 0.72197,0.7203 15.24754,0.97491 45.5,0.79755 l 44.43946,-0.26054 0.27041,-21.42959 c 0.17932,-14.2111 -0.0893,-21.79015 -0.79755,-22.5 -0.66039,-0.66191 -9.35028,-1.26123 -22.77041,-1.57041 l -21.70245,-0.5 -0.5,-44.20083 c -0.32022,-28.30803 -0.87016,-44.57069 -1.52947,-45.22947 -0.62361,-0.62311 -9.494,-1.13529 -22.5,-1.29917 l -21.47053,-0.27053 0,-46.49999 0,-46.500005 22,-0.5 22,-0.5 0.5,-22.5 0.5,-22.500001 23.5,0 23.5,0 0.5,69.000001 0.5,68.999995 22,0 22,0 0.5,-68.999995 0.5,-69.000001 23,0 23,0 0,115.499996 0,115.5 -22.5,0.5 -22.5,0.5 -0.5,45.5 -0.5,45.5 -68.5,0.5 -68.5,0.5 0,22 0,22 45.5,0.5 45.5,0.5 0.5,46 0.5,46 22.5,0.5 22.5,0.5 0,69 0,69 -23,0 -23,0 -0.25705,-67.95705 c -0.17172,-45.39696 -0.60248,-68.30329 -1.29755,-69 -0.62555,-0.62702 -9.69546,-1.24235 -22.74295,-1.54295 l -21.70245,-0.5 -0.27081,-20.92262 c -0.17312,-13.3749 -0.66822,-21.40146 -1.37245,-22.25 -1.53612,-1.85091 -133.80901,-1.97511 -135.65674,-0.12738 -0.9155,0.9155 -1.2,22.47577 -1.2,90.94098 0,49.35754 -0.36973,89.96949 -0.82162,90.24878 -0.45189,0.27928 -10.91439,0.58003 -23.25,0.66833 l -22.42838,0.16054 -0.5,-68.35931 -0.5,-68.35932 -22,0 -22,0 -0.5,68.5 -0.5,68.5 -22.77416,0.26884 c -17.67944,0.20869 -22.88111,-0.015 -23.25228,-1 z" + id="path3697" /> + <path + style="fill:#e4002b;fill-opacity:1" + d="m 567.13302,617.3174 c -0.2648,-0.69275 -0.36494,-31.85984 -0.22253,-69.25984 l 0.25892,-68 23,0 23,0 0.5,45 0.5,45 22,0.5 22,0.5 0,23.5 0,23.5 -45.27747,0.26021 c -35.68808,0.2051 -45.37943,-0.007 -45.75892,-1 z" + id="path2921" /> +</svg> diff --git a/cholerab/cholerab-live/README b/cholerab/cholerab-live/README new file mode 100644 index 00000000..b778b98c --- /dev/null +++ b/cholerab/cholerab-live/README @@ -0,0 +1,6 @@ + +view.py: contains view classes for cholerab +cholerab.py: main file + +start with : +python cholerab.py diff --git a/cholerab/cholerab-live/chol_net.py b/cholerab/cholerab-live/chol_net.py new file mode 100644 index 00000000..ee0f5378 --- /dev/null +++ b/cholerab/cholerab-live/chol_net.py @@ -0,0 +1,82 @@ +from socket import socket, AF_INET,SOCK_DGRAM,IPPROTO_UDP,SOL_SOCKET,SO_REUSEADDR,IP_MULTICAST_TTL,IP_MULTICAST_LOOP,INADDR_ANY,inet_aton,IP_ADD_MEMBERSHIP,IPPROTO_IP +import struct +import threading +import logging +log = None +from select import select +GROUP = '224.110.42.23' +PORT = 42023 +log = logging.getLogger('CholerabNet') +class CholerabMulicastNet(threading.Thread): + def __init__(self,cholerab,group=GROUP,port=PORT): + threading.Thread.__init__(self) + self.cholerab=cholerab + self.group=group + self.port=port + self.initSocket() + def send_char(self,x,y,char): + """ translates given params into network message """ + self.send_mc("%s %d %d" %(str(ord(char)),x,y)) + def send_mc(self,arg): + """ Sends message via multicast""" + try: + log.debug("Sending '%s' to %s:%d" % (arg,self.group,self.port)) + self.ignore_next += 1# we need this to work together correctly with reused sockets + self.s.sendto("%s" % arg,0,(self.group,self.port)) + except Exception ,e: + self.ignore_next -=1 + log.error("IN send_mc:%s"%str(e)) + + def initSocket (self,rcv=1): + ''' Initializes a Multicast socket ''' + host = '' + log.debug("Setting up Multicast Socket") + self.s = socket(AF_INET,SOCK_DGRAM, IPPROTO_UDP) + self.s.setsockopt(SOL_SOCKET, SO_REUSEADDR, 1) + self.s.setsockopt(IPPROTO_IP, IP_MULTICAST_TTL, 32) + self.s.setsockopt(IPPROTO_IP,IP_MULTICAST_LOOP,1) # we do not want our own packets to be replayed + if rcv==1: + log.debug("Configuring for Read AND Write") + self.s.bind((host,PORT)) + mreq = struct.pack("4sl", inet_aton(GROUP), INADDR_ANY) + self.s.setsockopt(IPPROTO_IP,IP_ADD_MEMBERSHIP,mreq) + def run(self): + self.running = 1 + self.ignore_next = 0 + while self.running: + # break if we do not want to loop on + ready,output,exception = select([self.s],[],[],1) # try every second + for r in ready: + if r == self.s: + log.debug(str(self.ignore_next)) + (data,addr) = self.s.recvfrom(1024) + if not self.ignore_next: + log.debug("Received Data from %s, data %s"%(str(addr),str(data))) + self.receive_net(addr,data) + else: + self.ignore_next -= 1 + + def send_stupid(self,addr): + """ sends YOU ARE MADE OF STUPID to the right host """ + #TODO implement me + pass + + def receive_net(self,addr,data): + """ resolves which nick sent the message + TODO handle user resolution in mulicast """ + try: + address,port = addr + arr = str(data).split() + char = arr[0] + x = arr[1] + y = arr[2] + self.cholerab.write_char(int(x),int(y),chr(int(char))) + except Exception, e: + log.error("Triggered YOU ARE MADE OF STUPID: %s" % str(e)) + self.send_stupid(addr) + + def stop(self): + ''' + stops the whole treading stuff gracefully + ''' + self.running=0 diff --git a/cholerab/cholerab-live/chol_net.pyc b/cholerab/cholerab-live/chol_net.pyc Binary files differnew file mode 100644 index 00000000..0694ad6d --- /dev/null +++ b/cholerab/cholerab-live/chol_net.pyc diff --git a/cholerab/cholerab-live/cholerab.py b/cholerab/cholerab-live/cholerab.py new file mode 100755 index 00000000..eb9e66df --- /dev/null +++ b/cholerab/cholerab-live/cholerab.py @@ -0,0 +1,36 @@ +#!/usr/bin/python2 +# -*- coding: utf-8 -*- +import curses,time +from view import CursesView +from chol_net import CholerabMulicastNet +import logging +logging.basicConfig(filename='here.log',level=logging.DEBUG) +log = logging.getLogger('main') +class Cholerab: + def __init__(self): + self.view = CursesView(cholerab=self) + self.transport = CholerabMulicastNet(cholerab=self) + def send_char(self,x,y,char): + log.info("Sending %s at (%d,%d) to connected peers" %(char,x,y)) + self.transport.send_char(x,y,char) + + def write_char(self,x,y,char): + log.info("Writing %s at (%d,%d) to view" %(char,x,y)) + self.view.write_char(x,y,char,user=2) + def stop(self): + self.view.stop() + self.transport.stop() + def main(self): + self.view.start() + self.transport.start() + self.view.join() + #after view dies, kill the transport as well + self.transport.stop() + self.transport.join() +def main(): + log.debug('started main') + chol = Cholerab() + chol.main() + +if __name__ == "__main__": + main() diff --git a/cholerab/cholerab-live/view.py b/cholerab/cholerab-live/view.py new file mode 100644 index 00000000..6a75f655 --- /dev/null +++ b/cholerab/cholerab-live/view.py @@ -0,0 +1,112 @@ +#!/usr/bin/python2 + +from curses import * +import socket +import threading +import logging +log = logging.getLogger('cholerab-curses') + +class CursesView(threading.Thread): + def addch(self,char): + """ + adds a char at the current cursor position + abstraction to the curses win.addch() + """ + try: self.win.addch(char) + except: pass + self.cholerab.send_char(self.x,self.y,chr(char)) + def stop(self): + #TODO setting back the whole terminal currently does not work correctly, fix me harder + self.running = False + self.clear() + self.win.refresh() + nocbreak(); self.scr.keypad(0); echo() + #endwin() + + def run(self): + """ + input loop + + TODO add Unicode Input Support + """ + self.running = True + def try_move(x,y): + if x >= self.width: x = 0;y = y+1 + if x < 0 : x = self.width-1; y= y-1 + if y >= self.height : x = x+1;y = 0 + if y < 0 : x = x-1; y = self.height-1 + self.win.move(y,x); return x,y + + while self.running: + c = self.scr.getch() #get_char(self.scr) + #TODO UTF8 here, get_wch not yet implemented + log.debug("Pressed : %d" % c) + if c == KEY_LEFT : self.x -=1 + elif c == KEY_RIGHT : self.x +=1 + elif c == KEY_UP : self.y -=1 + elif c == KEY_DOWN : self.y +=1 + elif c == ord('q') : self.stop() + elif c == 127 or c == KEY_BACKSPACE: + log.info('backspace pressed') + self.x -=1; + self.x,self.y = try_move(self.x,self.y) + self.addch(ord(' ')) + elif c == ord('\n'): + log.info('enter pressed') + self.y +=1; + self.x,self.y = try_move(self.x,self.y) + else : + self.addch(c) + self.x +=1 + self.x,self.y = try_move(self.x,self.y) + self.refresh() + + def write_char(self,x,y,char,user=1): + user = user % 3 + 1 + self.win.addch(y,x,char,color_pair(user)) + self.win.move(self.y,self.x) + self.refresh() + def write_str(self,x,y,string,user=1): + self.win.addstr(y,x,string,color_pair(user)) + self.win.move(self.y,self.x) + self.refresh() + def refresh(self): + self.scr.refresh() + self.win.refresh() + def clear(self): + self.win.clear() + pass + def write_field(self,ar): + """ + writes the whole field with given 2-dimensional array + """ + self.clear() + pass + + def __init__(self,height=24,width=80,cholerab=None,scr=None): + # TODO handle sessions somehow + if scr: + self.scr = scr + else: + self.scr = initscr() + start_color() + init_pair(1,COLOR_WHITE,COLOR_BLACK) + init_pair(2,COLOR_RED,COLOR_BLACK) + init_pair(3,COLOR_GREEN,COLOR_BLACK) + init_pair(3,COLOR_CYAN,COLOR_BLACK) + threading.Thread.__init__(self) + self.cholerab = cholerab + + noecho() + cbreak() + self.scr.keypad(1) + try: curs_set(2) + except: pass # go home with your non-standard terminals! + + begin_x = 0;begin_y = 0 + self.height = height + self.width = width + self.x = 0 ; self.y = 0 + + self.win = newwin(height,width,begin_y,begin_x) + self.clear() diff --git a/cholerab/clive-2 b/cholerab/clive-2 new file mode 100644 index 00000000..1370486e --- /dev/null +++ b/cholerab/clive-2 @@ -0,0 +1,45 @@ + +# Krebs Cholerab Live Instruction Set Mark 2 + +## Taunt + + taunt : <anything> + + +## Character Punch + + terminal character punch : <row> <column> <utf8-character> + + +# Envelope + +Every Krebs Cholerab Live Instruction is issued as an HTTP-JSON-RPC +request/response as this section demonstrates. + +## Request + + POST /namespace HTTP/1.1
+ Host: krebs:1337
+ Content-Type: application/vnd.krebs.clive-2+json +
+ { "method": "taunt", "params": "lol", "id": 42 } + + +## Positive Response + + HTTP/1.1 200 OK
+
+ { "result": true, "id": 42 } + + +## Negative Response +Negative responses should reflect the JSON-RPC error as hard as possible. + + HTTP/1.1 400 You are made of stupid!
+
+ { "error": { + "code": 1, + "message": "You are made of stupid!" + }, + "id": 42 + } diff --git a/cholerab/coda b/cholerab/coda new file mode 100644 index 00000000..b6442631 --- /dev/null +++ b/cholerab/coda @@ -0,0 +1,4 @@ +ok + coda + Ostracoda + Basaliom diff --git a/cholerab/enterprise/README b/cholerab/enterprise/README new file mode 100644 index 00000000..03c1c068 --- /dev/null +++ b/cholerab/enterprise/README @@ -0,0 +1,52 @@ +Enterprise Patterns +================== +Stellt sicher, dass das richtige passiert, egal was gemacht wird + +Enterprise Loop +--------------- + +Enterprise Exception Handling +----------------------------- +ggf ersetzbar durch enterprise loop. + + +Enterprise Installation +----------------------- + +Rebooting +---------- + +Enterprise Einschalter (eon) +---------------------------- +Device that turns something on as soon as possible. + +Supernintendo Pattern +--------------------- + +Enterprise Root +--------------- +scripts which need root access but are called with lower privileges. The Enterprise Root Pattern provides a Solution for this issue by calling the script itself as sudo. +<code> +if test "${nosudo-false}" != true -a `id -u` != 0; then + echo "we're going sudo..." >&2 + exec sudo "$0" "$@" + exit 23 # go to hell +fi +</script> // enterprise ist, wenn <code> ... </script> trotzdem matcht + +Enterprise Shutdown +------------------ +Mittel der Wahl um einen Shutdown zu erzwingen + +Bsp: das Not-Aus in der Maschinensicherheit + +Enterprise Deep Copy +-------------------- +Bsp: var copy = JSON.parse(JSON.stringify(source)) + +Enterprise Thinking +------------------- +Prozess um auf Enterprise Patterns zu kommen + +Bug-Driven Development +--------------------- diff --git a/cholerab/manifest b/cholerab/manifest new file mode 100644 index 00000000..fca99561 --- /dev/null +++ b/cholerab/manifest @@ -0,0 +1,4 @@ +# KREBS MANIFEST +1. Everything is compromised +2. Enterprise-patterns are FTW +3. When in doubt, do the right thing diff --git a/cholerab/pleni/2011-06-04 b/cholerab/pleni/2011-06-04 new file mode 100644 index 00000000..1a45a5af --- /dev/null +++ b/cholerab/pleni/2011-06-04 @@ -0,0 +1,30 @@ +2011-06-04 Plenum MoC + +# File Sharing + +Auto-Torrenter wird von pfleidi und Lassulus gemacht. +AP1: Pfleidi + + +# Camp +In finowfurt 10-14. August 2011 +tv kann ggf net mitkommen + +## Siebdruck T-shirt +AP2: Pfleidi Nachfragen wegen T-Shirts fuer Camp +Gute Rote T-Shirts mit schwarzem Logo +42::/16 + +## Banner +aehnlich Banner vom Shack +AP3: tv sucht banner, wenn nicht, dann wird gesprayed + +## 42::/16 +AP5: Miefda kuemmert sich um die RIPE, dass wir /16 benutzen + +## Zelte in Zelten (... not) +Mannschafszelt +Unabhaengig von Shack-village +Tische organisieren + +krebs-schrein diff --git a/cholerab/proto b/cholerab/proto new file mode 100644 index 00000000..8f773be8 --- /dev/null +++ b/cholerab/proto @@ -0,0 +1,39 @@ + + + +- The Good One + - Krebslogo + - /etc/issue + - sshd_config banner + - $EDITOR + - rm nano + - install vim + - add the good parts into /etc/vimrc + - syntax highlighting + - install, try harder(!!) + - enterprise retiolum + - append /krebs/bin to PATH + - activated modules have symlinks from /krebs/bin to /krebs/... + - tell about krebs candidate modules + - krebs suggest (crowd sourcing) + - async krebs notifications in focus terminal + - krebs shell w/ rest interface + - cholerab live + - multi user combat editor + - peer to peer [multiunicast] + - origin: 1,1,0 + + - Protocol + - Space-separated vector of ascii-encoded unicode code-points + - otherwise you are made of stupid and you deserve to get punched from + anybody, anyoften with the Error punch "You are made of stupid!" <1> + + - move meaning + - <> Taunt + - <0 char dim*> Character punches + - <1> ∃rror punch + - <2 101 1> Status punch; Attack; punch-how? + - <2 103 1 addrs+> Status punch; Counter; i-punch addr... + - <3 0 addrs+> Notification punch; these-are-fuckers addrs... + - <3 1 addrs+> Notification punch; the-good-ones addrs... + - <23 addr reason...> Finishing move; punch addr b/c of reason... diff --git a/cholerab/shirts/bestellliste b/cholerab/shirts/bestellliste new file mode 100644 index 00000000..d097ff7d --- /dev/null +++ b/cholerab/shirts/bestellliste @@ -0,0 +1,23 @@ +tv: 2 M + 1 S +ulrich: 1 M +felix: 2 M + 1 S +Lassulus: 2 M +Pfleidi: 1 L +Tensai: 1 L +Momo: 1 XXL +hadez: 1 L + 1 M +Phil: 1 S +Lukas: 1 M +Jan: 1 2XL +Ronny: 1 M +Marc: 1 L +Lotho: 1 XL +Sascha: 1 XL +Moritz: 1 M +RIPE: 1 XL +kh: 1 L +miefda: 1 L + 1 XL diff --git a/evan/satz-liste b/evan/satz-liste index 47aad70a..663aa572 100644 --- a/evan/satz-liste +++ b/evan/satz-liste @@ -4,10 +4,10 @@ ein sauberer scheck ist ein guter scheck auch du weißt wie man den geschirrspüler einräumt wer die toilette putzt kommt in den himmel der große bruder sieht es gerne wenn die genossen die vereinsräume in stand halten -henry der staubsauger saugt für dich muelltrennung bringt gutes karma -saubere mitglieder sind glückliche mitglieder +dokumentiere deine projekte +werbe neue mitglieder fnord -bewässere die Pfalnzen +bewässere die Pflanzen Öffne ein Fenster wische die tische diff --git a/infest/skel/home/.ssh/authorized_keys b/infest/skel/home/.ssh/authorized_keys index 8bd54293..21f8bf26 100644 --- a/infest/skel/home/.ssh/authorized_keys +++ b/infest/skel/home/.ssh/authorized_keys @@ -5,3 +5,4 @@ ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAp83zynhIueJJsWlSEykVSBrrgBFKq38+vT8bRfa+csqy ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAvZvfMwszjeUcmrs5Tpd4XJDVNDNUu3Qn3ZxgJzwuoys5LXxPcMikTO++dyrXl2kyexxgSMk6SZtuh34Xg0f9JDb5pN+DJwoeYv96lqTZ5QY4dn+1F0CoP+cK692GH14Kh1wBQyiL50Wj/iWR5/QHpRzrOLsepcZim1nL9FjsW6S2l+uDnUwC4x1EhsRezqJESJlqEsiS+kbhtiPybs7KcY0U4SkpYjfNjlpFE9eLrvSouoyQOUcIVjplcGIma/SVOVYWng4wQA0d5TkCAWAU0OZb0377KynDa7F8K/wN0hRGLGZGFbs3kNDJHqR1lt+sals8M6JO7qk1VVJJj1OsUw== pfleidi@pfleidimobile ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQB2G4SpJ/UYxmTidUl8ytT6bdNGTdYvv2nmhQyaFBroNit3xdDOVxKvaMEGDuR6ncRugw5BBvrv6iPMTCFluHJxjuh6lk3JrrsJ8CT22ZOGsA593hRoXZOCrs5SxcFkw9EBiCuaHHlWiS9+Dffr6/zpkhH3djTz05uGnDrvtKuV/Zmu5XHAurNn+X3C5S/zk/y0n8o62iSQHVKeNBGO2WYhVce9d65Ucek5dOvXZYVKSe1LeAOKyeHWv+VWP8QlObmfVrQ5l1Pou6WV6Wpo85KBa/mmBJIygC9rrG+gx/1LX7JxStbCu/WoUlUwkSaP2qxWaET9KaSO8+2Wrg5i34ax== samuel@localhost ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDTciEeSjcXQ++lfI262rGVVwRM8AJJxrxs+6tl51VGuIGJbIkm0ErO4T338FeXabsmK2T26ZD8CB3FGzm1fKiEaXqZPQzE1hib6n5mdbk1C3HjqXrGFCHui29Nayh+SEHfGwIBFhLGTfaJl9D1cllYjZ23TNQKRMZJO0o3XzrtSgBgS8FPG50+OY4J3MA+9WYkefTDCHOi22pWnTthYLSry35EizUuRxS2T0htKTMls/Tie0M15dN6mgr5104jO0c8IrBroAm9eLBoJl6DNbobLNqflMkiTaoQE6YCaxb1s12dSj9no2XSv/hEtQri9yZR82h+V1Qoypx3Kg6J+ZXf miefda@miefda901 +ssh-dss AAAAB3NzaC1kc3MAAACBAJE2uV+hM74kPr6IwIp5sDKBmbwDnugLxail3MeVCSPtoLLJ9fRj/HBissAubX2/20d3jPkV5DjipWJGZCxMuNl9pEDrlxL/jOp1HERoq0hj7XdIj/ka+wmLKWU9mLu3gX77M/QzrcpDNBrhYX8FePBHgMZr/gXap2raDZBAE8CjAAAAFQD4QaW+3N07Mvfh1yC/WVsEZ+6nUwAAAIAiQvhzUWUNon5e+UZlvGBlFV8B0isLDf87qxUZHRY0siSSXIlekEtAB0i4aXEVtBOJwsDdJjrCygoBtKT6VMsWCrXnAqvVAd3oVl9YeZ7R4zDPpWTYhERagTFla8yBEOTvEdHZ6Lfn72RDg0IDSnofdMzs6XwlD7c6uo6dRZ7+zgAAAIEAhakAD84QgbPRCwvRBVs4HAbnWps8GTQQx7WN2FC8Twv+Gkltha2RZtD7Artcm7d79kofiGax2NQrrzFKY1/gsBuIe15XhNiLpVqdSj3aK/LRRoNNOOCWvc6uQWXEN7gOVE8JTXyi+RDvzeP4Fn9jp+Ub6OGvWvsaBb9Z6IyfTHo= momo diff --git a/kachelmann/Makefile b/kachelmann/Makefile new file mode 100644 index 00000000..277a5421 --- /dev/null +++ b/kachelmann/Makefile @@ -0,0 +1,5 @@ +.PHONY: infect +INSTALL_DIR = /root/bin +infect: + mkdir -p /tmp/kachelmann/ + cp kachelmann ${INSTALL_DIR} diff --git a/kachelmann/conditions.pl b/kachelmann/conditions.pl index c61e0b8b..6d8b5541 100644..100755 --- a/kachelmann/conditions.pl +++ b/kachelmann/conditions.pl @@ -1,6 +1,7 @@ #!/usr/bin/perl use XML::Simple; -system("w3m -dump \"http://www.google.com/ig/api?weather=70327-stuttgart&hl=de\" > weather.xml"); +system("w3m -dump \"http://www.google.com/ig/api?weather=70327-stuttgart&hl=de\" > /tmp/kachelmann/weather.xml"); my $xml = new XML::Simple; -my $data = $xml->XMLin("weather.xml"); -print "Die Wetterkondition ist: $data->{weather}->{current_conditions}->{condition}->{data}\n bei $data->{weather}->{current_conditions}->{temp_c}->{data} Grad Celsius\n"; +my $data = $xml->XMLin("/tmp/kachelmann/weather.xml"); +my $sentence = "Die Wetterkondition ist: $data->{weather}->{current_conditions}->{condition}->{data}\n bei $data->{weather}->{current_conditions}->{temp_c}->{data} Grad Celsius\n"; +system("espeak \"$sentence\""); diff --git a/kachelmann/weather.xml b/kachelmann/weather.xml new file mode 100644 index 00000000..8a785308 --- /dev/null +++ b/kachelmann/weather.xml @@ -0,0 +1 @@ +<?xml version="1.0"?><xml_api_reply version="1"><weather module_id="0" tab_id="0" mobile_row="0" mobile_zipped="1" row="0" section="0" ><forecast_information><city data="Stuttgart, Baden-Württemberg"/><postal_code data="70327-stuttgart"/><latitude_e6 data=""/><longitude_e6 data=""/><forecast_date data="2011-08-05"/><current_date_time data="2011-08-05 21:50:00 +0000"/><unit_system data="SI"/></forecast_information><current_conditions><condition data="Klar"/><temp_f data="63"/><temp_c data="17"/><humidity data="Feuchtigkeit: 88 %"/><icon data="/ig/images/weather/sunny.gif"/><wind_condition data="Wind: NO mit 6 km/h"/></current_conditions><forecast_conditions><day_of_week data="Fr."/><low data="16"/><high data="26"/><icon data="/ig/images/weather/chance_of_storm.gif"/><condition data="Vereinzelt stürmisch"/></forecast_conditions><forecast_conditions><day_of_week data="Sa."/><low data="16"/><high data="26"/><icon data="/ig/images/weather/mostly_sunny.gif"/><condition data="Teils sonnig"/></forecast_conditions><forecast_conditions><day_of_week data="So."/><low data="11"/><high data="22"/><icon data="/ig/images/weather/chance_of_rain.gif"/><condition data="Vereinzelt Regen"/></forecast_conditions><forecast_conditions><day_of_week data="Mo."/><low data="11"/><high data="21"/><icon data="/ig/images/weather/chance_of_storm.gif"/><condition data="Vereinzelt stürmisch"/></forecast_conditions></weather></xml_api_reply> diff --git a/refactory/bin/git-clone-into b/refactory/bin/git-clone-into new file mode 100755 index 00000000..67e820e6 --- /dev/null +++ b/refactory/bin/git-clone-into @@ -0,0 +1,48 @@ +#! /bin/sh +# +# usage: git-clone-into repository directory +# +set -euf + +tempdir() { + set -- `tempnam $1` + mkdir $1 + echo $1 +} + +## [prefix] -> tempnam +tempnam() { + until set -- $1 ${1-}`candnam` && ! test -e $2; do :; done + echo $2 +} + +candnam() { + uuidgen 2>/dev/null || date +%s%N +} + + + + tmp_remote=`candnam` + tmp_branch=`candnam` + + subdir=$2 + if test -e $subdir; then + echo 'You are made of stupid!' >&2 + exit 23 + fi + tmpdir=`tempdir /tmp/tempdir-` + #trap "test -d $tmpdir && rm -vfR $tmpdir" EXIT + trap "test -d $tmpdir && rm -fR $tmpdir" EXIT + repository="${1-$repository}" + git clone "$repository" $tmpdir + (cd $tmpdir + subdir="$subdir" git filter-branch --tree-filter ' + if ! test -d $subdir; then + mkdir -p $subdir + git ls-tree -z --name-only $GIT_COMMIT | xargs -I. --null mv . $subdir + fi + ' + git checkout -b $tmp_branch) + git remote add $tmp_remote $tmpdir + git fetch $tmp_remote + git merge $tmp_remote/$tmp_branch # TODO configurable branch diff --git a/streams/streams b/streams/streams index c5e9e471..607fd9e5 100755 --- a/streams/streams +++ b/streams/streams @@ -50,7 +50,7 @@ function status() #tmux list-sessions 2>/dev/null #return $RET - EV="`ps -ef | grep tmux`" + EV="`ps -ef | grep mplayer`" if echo "$URLS" | while read URL NAME; do if [ "`echo "$EV" | grep \"$URL\"`" ] ;then echo "** $NAME running ($URL)" diff --git a/util/bin/galileo b/util/bin/galileo new file mode 100755 index 00000000..8ca7d834 --- /dev/null +++ b/util/bin/galileo @@ -0,0 +1,2 @@ +#!/bin/sh +./wiki.firstpar http://de.m.wikipedia.org/wiki/::Random | xargs ./naturalvoices.att diff --git a/util/bin/naturalvoices.att b/util/bin/naturalvoices.att index e329694f..9a944d8b 100755 --- a/util/bin/naturalvoices.att +++ b/util/bin/naturalvoices.att @@ -5,6 +5,10 @@ A=Mozilla baseURL="http://192.20.225.36" url="$baseURL/tts/cgi-bin/nph-talk" +if test -h "$0"; then + voice="${voice-"`basename "$0"`"}" +fi + pwd="$(dirname "$(readlink -f "$0")")" for x in \ @@ -29,7 +33,7 @@ done node "$(readlink -f "$pwd/../../submodules/github/visionmedia/query")" "\$@" } curl -sS -A "\${A-Mozilla}" \\ - -d "voice=\${voice-klara}" \\ + -d "voice=\${voice-`basename "$0"`}" \\ -d "txt=\$text" \\ -d "downloadButton=DOWNLOAD" \\ "$url" | diff --git a/util/bin/wiki.firstpar b/util/bin/wiki.firstpar new file mode 100755 index 00000000..d2181f1b --- /dev/null +++ b/util/bin/wiki.firstpar @@ -0,0 +1,23 @@ +#! /bin/bash +set -euf + +A=Mozilla + +pwd="$(dirname "$(readlink -f "$0")")" + +for x in \ + "$pwd/../../submodules/github/tmpvar" \ + "$pwd/../../submodules/github/mikeal" \ + "$pwd/../../submodules/github/NV" \ + "$pwd/../../submodules/github/tautologistics" \ +; do + export NODE_PATH="`readlink -f "$x"`${NODE_PATH+:$NODE_PATH}" +done + +# ensure query is ready +(cd "$pwd/../.." && git submodule update --init) + +query() { + node "$(readlink -f "$pwd/../../submodules/github/visionmedia/query")" "$@" +} +curl -b redirect=seen -L -e http://de.wikipedia.org/wiki/$RANDOM -sS -A "\${A-Mozilla}" "$1" | query 'p' 'first' |w3m -T text/html -dump| cut -c -750 diff --git a/util/bin/wikipedia b/util/bin/wikipedia new file mode 100755 index 00000000..cad0d8b1 --- /dev/null +++ b/util/bin/wikipedia @@ -0,0 +1,5 @@ +#! /bin/sh +set -euf +for w in "$@"; do + dig +short txt "$w.wp.dg.cx" +done |