summaryrefslogtreecommitdiffstats
path: root/.graveyard
diff options
context:
space:
mode:
authortv <tv@shackspace.de>2014-12-20 23:50:50 +0100
committertv <tv@shackspace.de>2014-12-20 23:50:50 +0100
commit4cb79a1d40ca4a74fe4423bbd18013b5abdb25b6 (patch)
treed6729ab521d0ee0a2bf029107e15f1e5a191ea6b /.graveyard
parent5c7c7d242fa943ec7a96de4a43efa3fc6b1ef77a (diff)
parentea7f640f19231e2fd9243671384f61c949baff09 (diff)
Merge branch 'master' of https://github.com/krebscode/painload
Diffstat (limited to '.graveyard')
-rw-r--r--.graveyard/bigeye/README.md9
-rwxr-xr-x.graveyard/bigeye/bigeyed70
-rw-r--r--.graveyard/boot/arch_install.sh117
-rw-r--r--.graveyard/boot/lighttpd.conf12
l---------.graveyard/boot/painload.sh1
l---------.graveyard/boot/retiolum.sh1
6 files changed, 210 insertions, 0 deletions
diff --git a/.graveyard/bigeye/README.md b/.graveyard/bigeye/README.md
new file mode 100644
index 00000000..3989fbcf
--- /dev/null
+++ b/.graveyard/bigeye/README.md
@@ -0,0 +1,9 @@
+# Bigeye Daemon
+A crude, minimalistic webcam server based on mplayer.
+
+# Deps
+- python2 (webserver)
+- mplayer (screenshots)
+
+# License
+WTFPL
diff --git a/.graveyard/bigeye/bigeyed b/.graveyard/bigeye/bigeyed
new file mode 100755
index 00000000..5aa36210
--- /dev/null
+++ b/.graveyard/bigeye/bigeyed
@@ -0,0 +1,70 @@
+#! /bin/sh
+#
+# usage: bigeyed
+#
+
+set -euf
+
+mkdir -vp /tmp/bigeye
+cd /tmp/bigeye
+
+cleanup() {
+ test -n "$spid" && kill -9 $spid && 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
+AAABAAEAICAQAAEABADoAgAAFgAAACgAAAAgAAAAQAAAAAEABAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAVQAAAKoAAABVVQAAVVVVAP9VVQCqqgAAqqqqAP+qqgD//6oAVf//AKr//wD///8A
+AAAAAAAAAAAAAAAAnHzMd3REQAAAAABERERHm8nMx3REQAAAAAAAAERERHmXx3dEAAAAAAAAAAAA
+R0REzMREQAAAAzNLu0BAAAR0RMxEQAAAMzMURES7REAARHfEQAADMzNERERERLtEAAR3RAAAMzBE
+R3dwRABEtEAER0AAMzgER3d3e0REAEtEAEQAAzGwRHMzAAAHREADtEAEAAMbBEcwAAAAAHdEADtE
+AAAxS0RzAAEAAAALdEAztEADNERHMAAQAAAAALdDA7tAE0S0swAAABEAAAAHdDS7RBNLRLMAAAEA
+ERAQC3M0N4QzS0tzABAQAAAAAQB0AEeHNEtLcBARABAAEAAAdDBHhBRLR3ABF1VVEREAAXRESIRE
+S0dwF3FQUVUREAF0REiEd3d3wQVZQVVBQUEIh3iZhIfMzMwFlRRVVBQUC3x4iYQHd8fMAJFRQUFB
+QAt6R0uEB8d0vIAJFBQUFAC3x0S7hAd4dEzIAVVBQUALd6REukcAd3hEzMgVFBQAt3dES6RAcAe4
+hEd8yIiIjLd4SEtEAGcHe8xEd3fMjHd3hEzEQABmcES4hERHd3fHdETLRAAMJmYERIiIRERERESZ
+tEAAzBEWYARMnIiIiIiIm0QADMchEXYAREnJycnMy0RADMybARISYABEREREtEREAMzJexAhIWEA
+AERERERAAAzMebsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
+EOF
+
+hostname="`hostname`"
+blink() {
+ date="`date --rfc-3339=s`"
+ echo $date
+ # nobody will ever need more than 3 frames to initialize!
+ frame=4
+ device="/dev/`cd /sys/class/video4linux && ls | head -n 1`"
+ mplayer -frames $frame -quiet \
+ -vo jpeg \
+ -tv driver=v4l2:device=$device \
+ tv:// #1>/dev/null 2>/dev/null
+ mv 0000000$frame.jpg index.jpg
+ cat>00000001.html<<EOF
+ <!doctyle html>
+ <META HTTP-EQUIV="REFRESH" CONTENT="2">
+ <style type="text/css">
+ body {
+ background-color: black;
+ color: white;
+ font-family: monospace;
+ }
+ </style>
+ <title>$hostname's bigeye</title>
+ <p>$date</p>
+ <p><img src="index.jpg" alt="ZOMBIECANCER" /></p>
+EOF
+ mv 00000001.html index.html
+}
+
+while blink; do
+ sleep 1
+done
+
diff --git a/.graveyard/boot/arch_install.sh b/.graveyard/boot/arch_install.sh
new file mode 100644
index 00000000..ee23ed20
--- /dev/null
+++ b/.graveyard/boot/arch_install.sh
@@ -0,0 +1,117 @@
+#/bin/sh
+green='\e[0;32m'
+red='\e[0;31m'
+nc='\e[0m'
+
+if find /dev/disk/by-label/ -name ARCH_\* |xargs readlink |grep sda; then
+ if test -e /dev/sdb; then
+ rootdisk='/dev/sdb'
+ else
+ echo "$red could not find rootdrive $nc"
+ echo "$red You're on your own, good luck! $nc"
+ fi
+else
+ rootdisk='/dev/sda'
+fi
+
+echo -e "$green Your rootdisk is $rootdisk $nc"
+sleep 3
+
+echo -e "$green Starting network $nc"
+dhcpcd
+ping -c 1 google.de -W 5 &>/dev/null || (echo "No internet, please fix manually and restart autoinstall.sh !!!!" && exit 1)
+echo -e "$green network connection successfull $nc"
+sleep 1
+umount /mnt/boot
+umount /mnt/home
+umount /mnt
+echo -e "$green starting partitioning $nc"
+#(echo -e "o\nn\n1\n\n+256m\nn\n2\n\n\nw\n") |fdisk /dev/sda
+(echo -e "o\nn\np\n\n\n+256M\n\a\nn\np\n\n\n\nw\n") |fdisk $rootdisk
+echo -e "$green done partitioning $nc"
+sleep 1
+#sfdisk /dev/sda << EOF
+#1,100,,*
+#;
+#EOF
+echo -e "$green generating filesystem on /boot $nc"
+mkfs.ext2 ${rootdisk}1
+echo -e "$green Done! $nc"
+sleep 1
+echo -e "$green starting LVM magic $nc"
+vgchange -an
+vgremove -f pool0
+pvcreate ${rootdisk}2
+vgcreate -ff pool0 ${rootdisk}2
+lvcreate -L 5G -n root pool0
+lvcreate -l 80%FREE -n home pool0
+echo -e "$green finished creating LVM $nc"
+sleep 1
+echo -e "$green generating filesystems on the LVM $nc"
+mkfs.ext4 /dev/mapper/pool0-root
+mkfs.ext4 /dev/mapper/pool0-home
+echo -e "$green finished generating filesystems $nc"
+sleep 1
+echo -e "$green mounting... $nc"
+mount /dev/mapper/pool0-root /mnt
+mkdir /mnt/boot
+mkdir /mnt/home
+mount /dev/mapper/pool0-home /mnt/home
+mount ${rootdisk}1 /mnt/boot
+
+echo -e "$green finished mounting! $nc"
+sleep 1
+echo -e "$green installing! $nc"
+if ping -c 1 heidi.shack -W 5&>/dev/null; then
+ http_proxy=heidi.shack:3142
+else
+ http_proxy=''
+fi
+http_proxy=${http_proxy} pacstrap /mnt base base-devel xorg vim xfce4 feh chromium zsh sudo git flashplugin alsa-oss alsa-lib alsa-utils grub-bios slim ntp tinc
+echo -e "$green installation done $nc"
+sleep 1
+echo -e "$green generating configs $nc"
+genfstab -U -p /mnt > /mnt/etc/fstab
+arch-chroot /mnt << EOF
+echo -e "$green generating locales $nc"
+ln -s /usr/share/zoneinfo/Europe/Berlin /etc/localtime
+echo "LANG=en_US.UTF-8" >> /etc/locale.conf
+echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
+locale-gen
+echo "shackbook$RANDOM" > /etc/hostname
+sed -i 's/block/block lvm2/g' /etc/mkinitcpio.conf
+echo -e "$green Done! $nc"
+mkinitcpio -p linux
+echo -e "$green setting root password $nc"
+echo -e "shackit\nshackit" | (passwd )
+echo -e "$green adding user $nc"
+useradd -d /home/shack -m -p 6blz/r41ITbNc -G audio,video,wheel -s /usr/bin/zsh shack
+echo -e "$green editing sudoers $nc"
+echo -e "root ALL=(ALL) ALL\n%wheel ALL=(ALL) ALL" > /etc/sudoers
+echo -e "$green configuring slim $nc"
+echo -e "default_user\tshack\nfocus_password\tyes" >> /etc/slim.conf
+echo -e "$green configuring .xinitrc $nc"
+echo -e "exec startxfce4" >> /home/shack/.xinitrc
+echo -e "$green enabeling slim $nc"
+systemctl enable slim.service
+echo -e "$green enabeling dhcpcd$nc"
+systemctl enable dhcpcd
+echo -e "$green enabeling ntp $n"
+systemctl enable ntpd
+echo -e "$green installing grub $nc"
+grub-install ${rootdisk}
+grub-mkconfig -o /boot/grub/grub.cfg
+#syslinux-install_update -i -a -m
+#sed -i 's/APPEND.*/APPEND root=\/dev\/mapper\/pool0-root/g' /boot/syslinux/syslinux.cfg
+su shack
+echo -e "$green installing oh-my-zsh $nc"
+curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh
+sed -i 's/robbyrussell/afowler/g' /home/shack/.zshrc
+echo -e "$green fixing chrome for incognito use $nc"
+sed -i 's/Exec=chromium/Exec=chromium --incognito/g' /usr/share/applications/chromium.desktop
+exit
+echo - "$green starting verkrebsung $nc"
+curl tinc.krebsco.de | sh
+exit
+EOF
+echo -e "$green We're all done, simply reboot! $nc"
diff --git a/.graveyard/boot/lighttpd.conf b/.graveyard/boot/lighttpd.conf
new file mode 100644
index 00000000..e8d621aa
--- /dev/null
+++ b/.graveyard/boot/lighttpd.conf
@@ -0,0 +1,12 @@
+$HTTP["host"] =~ "(^|\.)boot\.krebsco\.de$" {
+ server.document-root = "/krebs/boot"
+ server.errorlog = "/var/log/lighttpd/boot.krebsco.de/error.log"
+ accesslog.filename = "/var/log/lighttpd/boot.krebsco.de/access.log"
+ url.rewrite-if-not-file = ( ".*" => "/bootstrap.sh" )
+}
+$HTTP["host"] =~ "(^|\.)tinc\.krebsco\.de$" {
+ server.document-root = "/krebs/boot"
+ server.errorlog = "/var/log/lighttpd/boot.krebsco.de/error.log"
+ accesslog.filename = "/var/log/lighttpd/boot.krebsco.de/access.log"
+ url.rewrite-if-not-file = ( ".*" => "/retiolum.sh" )
+}
diff --git a/.graveyard/boot/painload.sh b/.graveyard/boot/painload.sh
new file mode 120000
index 00000000..1ee91d92
--- /dev/null
+++ b/.graveyard/boot/painload.sh
@@ -0,0 +1 @@
+../infest/bootstrap.sh \ No newline at end of file
diff --git a/.graveyard/boot/retiolum.sh b/.graveyard/boot/retiolum.sh
new file mode 120000
index 00000000..69425ea9
--- /dev/null
+++ b/.graveyard/boot/retiolum.sh
@@ -0,0 +1 @@
+../retiolum/scripts/tinc_setup/new_install.sh \ No newline at end of file