From b55bb65e05f6645d87470b94ef56ec0c3d6c160d Mon Sep 17 00:00:00 2001 From: root Date: Thu, 31 Jan 2013 21:24:27 +0100 Subject: //retiolum update-retiolum-hosts: rsync -I --- retiolum/bin/update-retiolum-hosts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/retiolum/bin/update-retiolum-hosts b/retiolum/bin/update-retiolum-hosts index 214ac205..eb57af3f 100755 --- a/retiolum/bin/update-retiolum-hosts +++ b/retiolum/bin/update-retiolum-hosts @@ -11,4 +11,4 @@ fi cd $(dirname $(readlink -f $0))/.. mkdir -p /etc/tinc/retiolum/hosts -rsync -va --delete hosts/ /etc/tinc/retiolum/hosts/ +rsync -va -I --delete hosts/ /etc/tinc/retiolum/hosts/ -- cgit v1.2.3 From cb39d733e763f671877893836e3aabf0f4927a33 Mon Sep 17 00:00:00 2001 From: makefu Date: Mon, 29 Apr 2013 14:03:28 +0200 Subject: add no_omo to bootstrap list --- services/etc/services/bootstrap | 1 + 1 file changed, 1 insertion(+) diff --git a/services/etc/services/bootstrap b/services/etc/services/bootstrap index 6d9e7363..f6efe761 100644 --- a/services/etc/services/bootstrap +++ b/services/etc/services/bootstrap @@ -8,3 +8,4 @@ services://devstar:22 services://heidi:22 services://geisha:22 services://slowpoke:22 +services://no_omo:22 -- cgit v1.2.3 From bb2c3ab8682316583e6866200678494965f81719 Mon Sep 17 00:00:00 2001 From: makefu Date: Fri, 3 May 2013 23:43:46 +0200 Subject: add 'this is $NAME' in install-script --- retiolum/scripts/tinc_setup/new_install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/retiolum/scripts/tinc_setup/new_install.sh b/retiolum/scripts/tinc_setup/new_install.sh index db154877..4884f7fe 100755 --- a/retiolum/scripts/tinc_setup/new_install.sh +++ b/retiolum/scripts/tinc_setup/new_install.sh @@ -332,6 +332,7 @@ NICK="${HOSTN}_$(head /dev/urandom | tr -dc "0123456789" | head -c3)" echo "USER $NICK $IRCSERVER bla : $NICK"; echo "JOIN $IRCCHANNEL"; sleep 23; + echo "PRIVMSG $IRCCHANNEL : This is $HOSTN"; sed "s/^\(.*\)/PRIVMSG $IRCCHANNEL : \1/" hosts/$HOSTN; sleep 5; ) | telnet $IRCSERVER $IRCPORT -- cgit v1.2.3 From 6579bfe5707eadbef2a2f25f265fed2d2170db3b Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 8 May 2013 03:32:49 +0200 Subject: removed filebitchin, host deprecated --- retiolum/hosts/filebitchin | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 retiolum/hosts/filebitchin diff --git a/retiolum/hosts/filebitchin b/retiolum/hosts/filebitchin deleted file mode 100644 index cd67b1ab..00000000 --- a/retiolum/hosts/filebitchin +++ /dev/null @@ -1,10 +0,0 @@ -Subnet = 10.243.221.149 -Subnet = 42:9efb:ae54:fdbf:6ec1:6167:6aab:a41e ------BEGIN RSA PUBLIC KEY----- -MIIBCgKCAQEAqtid32pdLNTOasAf8JW16SmmFJmwx/3PucO2Bpo34dDYWFm5uxyH -MYDTYDXLFRioiWGX2b1/5x7Oqjn0hP3FPuSAWPpyWEspMNmrpwZ1iA3hxQJEvQav -juBQzh18f6JJow+SoosiAfdr9pSoosZEKKbcwiWZ3od05BdKnogQ7bJI1mjSC0xb -9zAtlEKXhtmS8SJAyWKPQjC3coHlWoRq61zsI3/20074mUbFHsXj3jZPgn4Dc2RV -BYx+ZDGviIMhQEKXn9C3VFfVrLZbgheE5xiKFkqRMTWwlbNH/MXwNsrlJq3uAy9H -YuJhTY5XxUjkwCVky5m9QYbxEpl4hlvpnQIDAQAB ------END RSA PUBLIC KEY----- -- cgit v1.2.3 From ba6b276f843acbadbba24ba62a7bf562875ffc17 Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 8 May 2013 03:35:40 +0200 Subject: added filebitch --- retiolum/hosts/filebitch | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 retiolum/hosts/filebitch diff --git a/retiolum/hosts/filebitch b/retiolum/hosts/filebitch new file mode 100644 index 00000000..3d9d9bd6 --- /dev/null +++ b/retiolum/hosts/filebitch @@ -0,0 +1,11 @@ +Subnet = 10.243.131.98 +Subnet = 42:0356:a364:cc79:4c96:2c7c:13fc:0c5b + +-----BEGIN RSA PUBLIC KEY----- +MIIBCgKCAQEAuK4k5fCN0u9toyd3XwMKzOxKn6s5DlnFGVcmBoaOXfwZbJDJsmf7 +xt6BZ62zMzlno2jc4ankv2flkmWruuiti/sDzMJ6Q+BFurYNVE5GqiS6V3NPpvmY +ugNZhj5jodQOg76xOOF+igtl3v/GMdfuUvkTzoaSMb5H8QzcVvh734YTPjXGhQeL +QdGb28pKFoE1xA1R9Zhsdt7eW9GwkJ5MhoDjzgRP9+mGUTE9Bl2jM2w6UajLzqdJ +Yi1cY6Dtl/FGXFjQY3EABq8AUhfwXTtWk/vRSg5ym0TM5PJY6OcjnkY2rw3tue83 +8q4yT5tTCi5GQlGHAK10LoGTF53ON2XWBwIDAQAB +-----END RSA PUBLIC KEY----- -- cgit v1.2.3 From 898232320d64481d5f4de7e69eb1bb76f550407e Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 8 May 2013 13:54:38 +0200 Subject: new pubkey for karthus --- retiolum/hosts/karthus | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/retiolum/hosts/karthus b/retiolum/hosts/karthus index dfb94799..3e51241a 100644 --- a/retiolum/hosts/karthus +++ b/retiolum/hosts/karthus @@ -1,11 +1,11 @@ -Subnet = 42:42:42:42:23:23:23:23 -Subnet = 10.243.42.13 - ------BEGIN RSA PUBLIC KEY----- -MIIBCgKCAQEAnkVbRU5o5sPcKpN70p1djpmAnEg0YcHY+KPdR7R8sxLaq4V6e0qq -1TeUk3e4Eua3f6rT0AQGhNMmr6e7F4CmYFtNMV3ZV2wiOs6FRUURE6HvZCtytDss -/zkqiHkLIS97PXXnwIFXbrJlW6prS9YGior703vCX+bmf0aLIHbqExOGNGzxk6FH -DXtYo3Qt++h9RV/AQfOruXyiui3dbVsiUVa4a/jVFQCIrYTZtDg2LQIAkkwQmQYw -4iXP3vohtjLy/ELNRbf56zqH7qJIVgIXLCEAQ5l1NTHSw902mT+F2xXuzpnGi7iT -QYtk5OSADlIz9hM9Syo4G7j/bRV0lJWiCwIDAQAB ------END RSA PUBLIC KEY----- +Subnet = 10.243.42.13 +Subnet = 42:42:42:42:23:23:23:23 + +-----BEGIN RSA PUBLIC KEY----- +MIIBCgKCAQEAtGL2Gu8Dw/NsgJNcu4XY9eWUM8prL0JC1UfnACXuOCPns+Bdm/dG +uVTHdejjxv6y4FjWNCoD+45lP31QfBIqIOtUsfz/4ox9bvyTOUWQCe0NtBs2SMyO +O1eWSD4cnNfskYdyOHQbD+KSSiksyzaZdcqqx9FgWo1VT0f+oElnZ4nLBKRNBguN +GwVLjreE0GSxhcV2r6oHsaT+udvQ/PlQgn/zia2tKT+OI54WDJGXsKEvwRRnaRz5 +33Di58g3dffo0i7B3S889sa5B7l1kh229cw24Gc0AOtmm8Vacle6iTw3Eg0uLzxM +nKpOma0+K7CoE4IqSZy350iTgheHwq+y0QIDAQAB +-----END RSA PUBLIC KEY----- -- cgit v1.2.3 From a70d3e0740e36246d92d0ed7e713658d774db3b9 Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 8 May 2013 14:08:11 +0200 Subject: fixed error in keyparsing --- retiolum/hosts/karthus | 1 - 1 file changed, 1 deletion(-) diff --git a/retiolum/hosts/karthus b/retiolum/hosts/karthus index 3e51241a..75a8d15d 100644 --- a/retiolum/hosts/karthus +++ b/retiolum/hosts/karthus @@ -1,6 +1,5 @@ Subnet = 10.243.42.13 Subnet = 42:42:42:42:23:23:23:23 - -----BEGIN RSA PUBLIC KEY----- MIIBCgKCAQEAtGL2Gu8Dw/NsgJNcu4XY9eWUM8prL0JC1UfnACXuOCPns+Bdm/dG uVTHdejjxv6y4FjWNCoD+45lP31QfBIqIOtUsfz/4ox9bvyTOUWQCe0NtBs2SMyO -- cgit v1.2.3 From a9f322629b53430864347743cd419ac1f1d02f7c Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 8 May 2013 19:52:34 +0200 Subject: minikrebs new version --- minikrebs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/minikrebs b/minikrebs index 9055c82e..434c9cf6 160000 --- a/minikrebs +++ b/minikrebs @@ -1 +1 @@ -Subproject commit 9055c82ee7eb0938eb06963abbcfd65322e9b0ec +Subproject commit 434c9cf6769f61975cf28c71466db1dfa77ba143 -- cgit v1.2.3 From 993a2c8f98fa1c540060b967d459237e39b76213 Mon Sep 17 00:00:00 2001 From: lassulus Date: Fri, 10 May 2013 16:29:05 +0200 Subject: removed miefda & pfleidi ssh keys --- infest/skel/home/.ssh/authorized_keys | 2 -- 1 file changed, 2 deletions(-) diff --git a/infest/skel/home/.ssh/authorized_keys b/infest/skel/home/.ssh/authorized_keys index 21f8bf26..aa7fcc08 100644 --- a/infest/skel/home/.ssh/authorized_keys +++ b/infest/skel/home/.ssh/authorized_keys @@ -2,7 +2,5 @@ ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCl3RTOHd5DLiVeUbUr/GSiKoRWknXQnbkIf+uNiFO+ ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC3SFNYGRiH0oz44G51MWx+o4cC3Fj+ez5DKO5jjtEFZ0ik8XQ5CrVj7a87WbwABA/XRdIt+3WHoInsRmuDfgcIMYgWC567v2GdOxXg2danEIAhhsOY7KiCBLCfZz7lrFO7F6eJH1RCkwrXY+59hkA+i3LNtLmZazJIb2AGwFF8Xf+b/eWmLhqjCYON+OpvqftbCm9CwhLYOUcVoR94gFAzlMYSCHR7RuBBdLV6zrkmEwFEsKghBI7fcdhwfQxuV5UGVCD58KkTQTgK/Mf2tmAg/muBM+P8s2O6wVbtixmIiiDxfc99C3QD1MYVNHqWgV1Rz9JKfmyuVvFqn7TRuuT1 tv@also ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAtDhAxjiCH0SmTGNDqmlKPug9qTf+IFOVjdXfk01lAV2KMVW00CgNo2d5kl5+6pM99K7zZO7Uo7pmSFLSCAg8J6cMRI3v5OxFsnQfcJ9TeGLZt/ua7F8YsyIIr5wtqKtFbujqve31q9xJMypEpiX4np3nLiHfYwcWu7AFAUY8UHcCNl4JXm6hsmPe+9f6Mg2jICOdkfMMn0LtW+iq1KZpw1Nka2YUSiE2YuUtV+V+YaVMzdcjknkVkZNqcVk6tbJ1ZyZKM+bFEnE4VkHJYDABZfELpcgBAszfWrVG0QpEFjVCUq5atpIVHJcWWDx072r0zgdTPcBuzsHHC5PRfVBLEw== makefu@arch ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAp83zynhIueJJsWlSEykVSBrrgBFKq38+vT8bRfa+csqyjZBl2SQFuCPo+Qbh49mwchpZRshBa9jQEIGqmXxv/PYdfBFQuOFgyUq9ZcTZUXqeynicg/SyOYFW86iiqYralIAkuGPfQ4howLPVyjTZtWeEeeEttom6p6LMY5Aumjz2em0FG0n9rRFY2fBzrdYAgk9C0N6ojCs/Gzknk9SGntA96MDqHJ1HXWFMfmwOLCnxtE5TY30MqSmkrJb7Fsejwjoqoe9Y/mCaR0LpG2cStC1+37GbHJNH0caCMaQCX8qdfgMVbWTVeFWtV6aWOaRgwLrPDYn4cHWQJqTfhtPrNQ== death@Uriel -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 -- cgit v1.2.3 From 4e68bae28e4ea5973c3f5ec487a5b7451747ec68 Mon Sep 17 00:00:00 2001 From: lassulus Date: Fri, 10 May 2013 17:39:49 +0200 Subject: changed room for incoming hosts --- retiolum/scripts/tinc_setup/new_install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/retiolum/scripts/tinc_setup/new_install.sh b/retiolum/scripts/tinc_setup/new_install.sh index 4884f7fe..8c7d4af8 100755 --- a/retiolum/scripts/tinc_setup/new_install.sh +++ b/retiolum/scripts/tinc_setup/new_install.sh @@ -29,7 +29,7 @@ RMASK=${RMASK:-255.255.0.0} URL=${URL:-http://euer.krebsco.de/retiolum/hosts.tar.gz} SURL=${SURL:-http://euer.krebsco.de/retiolum/supernodes.tar.gz} -IRCCHANNEL=${IRCCHANNEL:-"#krebs"} +IRCCHANNEL=${IRCCHANNEL:-"#krebs_incoming"} IRCSERVER=${IRCSERVER:-"irc.freenode.net"} IRCPORT=${IRCPORT:-6667} -- cgit v1.2.3 From 310005396cab6abd73dd8a027e7241051f0817fc Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 11 May 2013 12:47:16 +0200 Subject: fix uid=0 requirement --- infest/bootstrap.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infest/bootstrap.sh b/infest/bootstrap.sh index 66a1cfdd..5d85c769 100644 --- a/infest/bootstrap.sh +++ b/infest/bootstrap.sh @@ -2,7 +2,7 @@ set -euf # Can be overwritten before install KREBSDIR=${KREBSDIR:-/krebs} -[ "`id -u`" -eq "0" ] || { echo "you need to be root!"; exit 1;} || exit 1 +[ "`id -u`" -eq "0" ] || echo "not running as root, stuff may not work. change KREBSDIR env to bootstrap somewhere else!"; # brute force install git, krebs style -- cgit v1.2.3 From 8ecd8b9e2714e559fc05983be69be409196d5da7 Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 14 May 2013 12:10:53 +0200 Subject: update mubaasu key --- retiolum/hosts/muhbaasu | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/retiolum/hosts/muhbaasu b/retiolum/hosts/muhbaasu index 83fb3933..490fe3fa 100644 --- a/retiolum/hosts/muhbaasu +++ b/retiolum/hosts/muhbaasu @@ -1,13 +1,13 @@ Address = 217.160.206.154 #Address = muhbaasu.de -Subnet = 10.243.0.200 -Subnet = 42:3f88:faa3:ae13:6ff7:13ee:17d7:421a/128 +Subnet = 10.243.139.184 +Subnet = 42:d568:6106:ba30:753b:0f2a:8225:b1fb -----BEGIN RSA PUBLIC KEY----- -MIIBCgKCAQEAti2bGFco9ZxrqYTIEyw/DBUjgUtaIeoz0qYkqJd9+XW9BAOgRXL1 -7ViEbsNgmRupt9N1GjsOvDlLinVH2n7wRsAt+GyBA1sFG1qcMkQFeRKW6lKikAw1 -QwWuQNxrj5rZw5N58AKogJQ9f4h2AA/wDZwMGlhIyS5Ev3DjnSFt4/Yv6Ncg3Ecq -sm8ZGg4U0dDzKhwjGsfAIuqVNDbz/NP3b5/9m6UhTp9pghvCea0kLbuMpMpwmt+h -7dXpenmZ6u1gO9Al2kURMN9/jNXefIyBY2hhm0aelDXz1sojlJ6aK+2RvsKOLTfa -4iLpz4SXdJDPYjHf4SqSvRV6/OqaMWSQnwIDAQAB +MIIBCgKCAQEA0f4C4xKXpnyV1ig03O2Kef8ag+/5WGkW90uxEBb/h5NY9barex+Z +KqVbkPdHhwoCIINuCVcOnJXzeo0FZtSEq3zVhscVm0PVdNfjct8a9KMsK0iUmuul +5WD9Glh5/1wkEmbRfVxDErhssz1b8YmFOAGQn+ujO/Znn3BLv36uKQvpqU2y5bzb ++rVnq3eE1bCSeuj41bgEve8+vxpforjLO6gbE91mwp3Ol6nkkp6CjpG+aFTuLCAj +YR0MIl2gGwskOGSI38QxlLouOlIGwus5f+KfC94ZP0pMwu5pT45UOUkVnlBXuZ9E +igNHG2Vtm76nB3yYHndOvuDTOufatX61dQIDAQAB -----END RSA PUBLIC KEY----- -- cgit v1.2.3 From 6969ff5928efce07a66c8b28bebc596918ce494a Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 21 May 2013 09:35:13 +0200 Subject: telnet binary will now be found: use either telnet or busybox --- retiolum/scripts/tinc_setup/new_install.sh | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/retiolum/scripts/tinc_setup/new_install.sh b/retiolum/scripts/tinc_setup/new_install.sh index 8c7d4af8..bd057cf8 100755 --- a/retiolum/scripts/tinc_setup/new_install.sh +++ b/retiolum/scripts/tinc_setup/new_install.sh @@ -34,6 +34,7 @@ IRCSERVER=${IRCSERVER:-"irc.freenode.net"} IRCPORT=${IRCPORT:-6667} OS=${OS:-0} +TELNET=${TELNET:-} IP4=${IP4:-0} IP6=${IP6:-0} @@ -119,6 +120,18 @@ find_os() fi } +find_telnet(){ + if command -v telnet >/dev/null;then + TELNET="`command -v telnet`" + elif command -v busybox >/dev/null;then + TELNET="`command -v busybox` telnet" + else + echo "cannot find telnet binary, please install either telnet-client or busybox" + echo "bailing out!" + exit 1 + fi +} + if [ $IP4 -eq 0 ]; then RAND4=1 elif ! check_ip_valid4 $IP4; then @@ -136,7 +149,9 @@ fi if [ $OS -eq 0 ]; then find_os fi - +if [ -z "$TELNET" ]; then + find_telnet +fi #check if everything is installed if ! exists awk ; then echo "Please install awk" @@ -334,7 +349,7 @@ NICK="${HOSTN}_$(head /dev/urandom | tr -dc "0123456789" | head -c3)" sleep 23; echo "PRIVMSG $IRCCHANNEL : This is $HOSTN"; sed "s/^\(.*\)/PRIVMSG $IRCCHANNEL : \1/" hosts/$HOSTN; - sleep 5; ) | telnet $IRCSERVER $IRCPORT + sleep 5; ) | $TELNET $IRCSERVER $IRCPORT # finish what you have begun! -- cgit v1.2.3 From 5611bcc9425a27e0edb8158235d9e2ba646c3d69 Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 22 May 2013 10:36:17 +0200 Subject: new_install now uses the LOADER instead of ping to check if internet is available --- retiolum/scripts/tinc_setup/new_install.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/retiolum/scripts/tinc_setup/new_install.sh b/retiolum/scripts/tinc_setup/new_install.sh index bd057cf8..6f3739a9 100755 --- a/retiolum/scripts/tinc_setup/new_install.sh +++ b/retiolum/scripts/tinc_setup/new_install.sh @@ -121,9 +121,9 @@ find_os() } find_telnet(){ - if command -v telnet >/dev/null;then + if exists elnet >/dev/null;then TELNET="`command -v telnet`" - elif command -v busybox >/dev/null;then + elif exists busybox >/dev/null;then TELNET="`command -v busybox` telnet" else echo "cannot find telnet binary, please install either telnet-client or busybox" @@ -164,13 +164,15 @@ if ! exists curl ; then exit 1 else LOADER='wget -O-' + HEAD_LOADER="$LOADER --spider" fi else LOADER=curl + HEAD_LOADER=$LOADER -I fi -if ! $(ping -c 1 -W 5 euer.krebsco.de 1>/dev/null) ;then - echo "Cant reach euer, check if your internet is working" +if ! $HEAD_LOADER $SURL >;then + echo "Cannot find supernode package, check if your internet is working" exit 1 fi -- cgit v1.2.3 From 6386df1621d2e44dc8144571a85b84c1966d4c47 Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 22 May 2013 10:40:55 +0200 Subject: fix syntax-error in new_install --- retiolum/scripts/tinc_setup/new_install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/retiolum/scripts/tinc_setup/new_install.sh b/retiolum/scripts/tinc_setup/new_install.sh index 6f3739a9..57d59e25 100755 --- a/retiolum/scripts/tinc_setup/new_install.sh +++ b/retiolum/scripts/tinc_setup/new_install.sh @@ -171,7 +171,7 @@ else HEAD_LOADER=$LOADER -I fi -if ! $HEAD_LOADER $SURL >;then +if ! $HEAD_LOADER $SURL >/dev/null 2>/dev/null ;then echo "Cannot find supernode package, check if your internet is working" exit 1 fi -- cgit v1.2.3 From bdcfd5c18dce0dd346d2dc14197041d079722b8e Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 22 May 2013 10:43:57 +0200 Subject: add vault --- retiolum/hosts/vault | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 retiolum/hosts/vault diff --git a/retiolum/hosts/vault b/retiolum/hosts/vault new file mode 100644 index 00000000..7ed3866c --- /dev/null +++ b/retiolum/hosts/vault @@ -0,0 +1,10 @@ +Subnet = 10.243.229.17 +Subnet = 42:17ed:1eff:5aab:a541:57a2:7ca2:5c38 +-----BEGIN RSA PUBLIC KEY----- +MIIBCgKCAQEAzra4v9cIU8mUeC8Vr1YUTWxir/IexD4FlGc087+i7hu6LLpt7Xi8 +XdwiGMTmQLegohtaVN3yShX1a5YywAboxaZFS1aLFBptmV9VIMtsTJRIgm2dBwMy +5tFRfu3ElV408JBr8OGwYC967p/SY5hxvSAQRc2cmSeY5duWGxybpzfdKmnjnmLr +pGfmavBaLAi2DP+KejCFjAu4oWayVlM2BIXtbtxxn90JvZ8HI4gdfHLBbwfxiEHb +qODqiWbu7wznQ3g4N5SUW2rq8WUqubufcx30Z+096doc0i+Zdxb5JBU79CGTNcbZ +X6Spc/CtkrLNbsTCjVmXgNvYo6WZeg4+rwIDAQAB +-----END RSA PUBLIC KEY----- -- cgit v1.2.3 From f53bb84e0b20a720a6d3cea7c46eac66ccd1a556 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sat, 25 May 2013 15:11:06 +0200 Subject: removed rage --- minikrebs | 2 +- retiolum/hosts/rage | 12 ------------ 2 files changed, 1 insertion(+), 13 deletions(-) delete mode 100644 retiolum/hosts/rage diff --git a/minikrebs b/minikrebs index 434c9cf6..d74fa7bd 160000 --- a/minikrebs +++ b/minikrebs @@ -1 +1 @@ -Subproject commit 434c9cf6769f61975cf28c71466db1dfa77ba143 +Subproject commit d74fa7bd724c45270f86b3b1eacecf90b83b0212 diff --git a/retiolum/hosts/rage b/retiolum/hosts/rage deleted file mode 100644 index 35da19f6..00000000 --- a/retiolum/hosts/rage +++ /dev/null @@ -1,12 +0,0 @@ -Address = 192.40.56.122 -Subnet = 10.243.211.81 -Subnet = 42:73d5:8402:f8f1:0250:0bc3:e2ec:850d - ------BEGIN RSA PUBLIC KEY----- -MIIBCgKCAQEA6dOSRjCwkdx/nOSQwiiCw889YBSlf0ZAymBSaWJ+XdLnktqqZIvQ -+1RMdfpTTsIaHoLDwvBI6gW9dhV5MEeP3AlWfKPZAMCWg8l3PkTERZILWGSLiizs -zCyJgLpsb2MP7rT3RlLlHyTNdx9QXxDX2K1Y/fJsjXuTTgwg3JPlPM2huGTZtWgM -GDFsRpfe37hIuIheYBgnP99OvEgx3rLyCDvd16kIMd2Pjx4SouVQqaBmvEmg+UEH -zD79GaO7c2xkqq6JggJw1q/xZnH+5CF8280kh/niXVqy8R/hP75FU1rvjHnMJvfo -nyPGC8ir2m6iy4CR07YBIYo1PRTXGDC1vwIDAQAB ------END RSA PUBLIC KEY----- -- cgit v1.2.3 From 2a3e35311f7fba03e0d553cc8d5dc7a61acd356e Mon Sep 17 00:00:00 2001 From: makefu Date: Sat, 25 May 2013 15:59:24 +0200 Subject: add webhoster (krebsco.de) into repo --- .gitmodules | 3 ++ cholerab/max_dirty_hack.sh | 102 --------------------------------------------- web | 1 + 3 files changed, 4 insertions(+), 102 deletions(-) delete mode 100755 cholerab/max_dirty_hack.sh create mode 160000 web diff --git a/.gitmodules b/.gitmodules index 1f9347d2..b03e892b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -28,3 +28,6 @@ [submodule "minikrebs"] path = minikrebs url = https://github.com/krebscode/minikrebs.git +[submodule "web"] + path = web + url = git@github.com:krebscode/krebscode.github.com diff --git a/cholerab/max_dirty_hack.sh b/cholerab/max_dirty_hack.sh deleted file mode 100755 index 7183a760..00000000 --- a/cholerab/max_dirty_hack.sh +++ /dev/null @@ -1,102 +0,0 @@ -#!/bin/sh -stty -echo cbreak -ofdel -x_max=90 -y_max=10 -x_cur=1 -y_cur=1 -y= -t=1 -outputfile=/tmp/cholerab_out -inputfile=/tmp/cholerab_in -echo -n "c" - -while [ $t -lt $(( y_max+2 )) ];do - echo -e "[$t;$(( x_max+1 ))Hx" - t=$(( t+1 )) -done -t=1 -while [ $t -lt $(( x_max+2 )) ];do - echo -e "[$(( y_max+1 ));${t}Hx" - t=$(( t+1 )) -done - -echo -n "[$y_cur;${x_cur}H" -#Main Loop -while x="`dd bs=1 count=1 2>/dev/null`"; do - y="$y$x" - case "$y" in - (*"") - if [[ $y_cur -le 1 ]];then - y_cur=$y_max - echo -n "[$y_cur;${x_cur}H" - else - echo -n "" - y_cur=$(( y_cur-1 )) - fi - y= - ;; - (*"") - if [[ $y_cur -ge $y_max ]];then - y_cur=1 - echo -n "[$y_cur;${x_cur}H" - else - echo -n "" - y_cur=$(( y_cur+1 )) - fi - y= - ;; - (*"") - if [[ $x_cur -ge $x_max ]];then - x_cur=1 - echo -n "[$y_cur;${x_cur}H" - else - echo -n "" - x_cur=$(( x_cur+1 )) - fi - y= - ;; - (*"") - if [[ $x_cur -le 1 ]];then - x_cur=$x_max - echo -n "[$y_cur;${x_cur}H" - else - echo -n "" - x_cur=$(( x_cur-1 )) - fi - y= - ;; - (*"") - if [[ $x_cur -le 1 ]];then - x_cur=$x_max - echo -n "[$y_cur;${x_cur}H" - else - echo -n " " - x_cur=$(( x_cur-1 )) - fi - y= - ;; - (|\[) - : - ;; - (*) - if [[ $x_cur -ge $x_max ]];then - x_cur=1 - echo -n "[$y_cur;${x_cur}H" - else - echo -n "$x" - echo "<0 $x $x_cur $y_cur>" >> $outputfile - x_cur=$(( x_cur+1 )) - fi - y= - ;; - esac - while [[ -s $inputfile ]]; do - cat $inputfile | head -n 1 | sed 's,[<>],,g' | { read MODE CHAR XN YN ; echo -n "7[$YN;${XN}H$CHAR8"; } - sed -i -e "1d" $inputfile - done - - state=`echo -n "$x" | od -An -tx | tr -d "[$IFS]"` - echo -n "7[1;$(( x_max+2 ))H$state8" - echo -n "7[2;$(( x_max+2 ))H 8" - echo -n "7[2;$(( x_max+2 ))H$x_cur:$y_cur8" -done diff --git a/web b/web new file mode 160000 index 00000000..1e194012 --- /dev/null +++ b/web @@ -0,0 +1 @@ +Subproject commit 1e1940124a9b475085d9f650c6b8e00d41e697ff -- cgit v1.2.3 From 63b507a98725314ede0447e2675e3867384a8123 Mon Sep 17 00:00:00 2001 From: makefu Date: Sat, 25 May 2013 16:05:18 +0200 Subject: cleanup --- cholerab/live.sh | 88 -------------------------------------------- cholerab/too_old/live.sh | 88 ++++++++++++++++++++++++++++++++++++++++++++ cholerab/too_old/ttycnser.sh | 27 ++++++++++++++ cholerab/ttycnser.sh | 27 -------------- 4 files changed, 115 insertions(+), 115 deletions(-) delete mode 100755 cholerab/live.sh create mode 100755 cholerab/too_old/live.sh create mode 100755 cholerab/too_old/ttycnser.sh delete mode 100755 cholerab/ttycnser.sh diff --git a/cholerab/live.sh b/cholerab/live.sh deleted file mode 100755 index 62a2c3cf..00000000 --- a/cholerab/live.sh +++ /dev/null @@ -1,88 +0,0 @@ -#! /bin/sh -set -euf -stty cbreak -echo - -go() { - state=$1 - wr 7 - wr " " >&2 - wr "state=$state" >&2 - wr 8 - $1 -} - -rd() { - dd bs=1 count=1 2>/dev/null -} - -bufrd() { - buf="`rd`" - bufinfowr -} - -bufrda() { - buf="$buf`rd`" - bufinfowr -} - -bufinfowr() { - wr 7 - wr " " >&2 - wr " " >&2 - case "$buf" in - () wr '^[' >&2;; - (*) wr "$buf" >&2;; - esac - wr "`wr "$buf" | xxd -p`" >&2 - wr 8 -} - -wr() { - echo -n "$1" -} - -C0="`echo C0 | xxd -r -p`"; DF="`echo DF | xxd -r -p`" -E0="`echo E0 | xxd -r -p`"; EF="`echo EF | xxd -r -p`" -F0="`echo F0 | xxd -r -p`"; F7="`echo F7 | xxd -r -p`" -S() { - bufrd - case "$buf" in - () go ESC;; - () wr ' '; go S;; - ([$C0-$DF]) go U1;; - ([$E0-$EF]) go U2;; - ([$F0-$F7]) go U3;; - (*) wr "$buf"; go S;; - esac -} - -U1() { buf="$buf`rd`"; wr "$buf"; go S; } -U2() { buf="$buf`rd`"; go U1; } -U3() { buf="$buf`rd`"; go U2; } - - -ESC() { - bufrda - case "$buf" in - ('[') go ESC_OSQRB;; - (*) - wr '^[' - go S - ;; - esac -} - -ESC_OSQRB() { - bufrda - case "$buf" in - (''|''|''|'') wr "$buf"; go S;; - (*) - wr '^[[' - go S - ;; - esac -} - - -wr 'c' -go S diff --git a/cholerab/too_old/live.sh b/cholerab/too_old/live.sh new file mode 100755 index 00000000..62a2c3cf --- /dev/null +++ b/cholerab/too_old/live.sh @@ -0,0 +1,88 @@ +#! /bin/sh +set -euf +stty cbreak -echo + +go() { + state=$1 + wr 7 + wr " " >&2 + wr "state=$state" >&2 + wr 8 + $1 +} + +rd() { + dd bs=1 count=1 2>/dev/null +} + +bufrd() { + buf="`rd`" + bufinfowr +} + +bufrda() { + buf="$buf`rd`" + bufinfowr +} + +bufinfowr() { + wr 7 + wr " " >&2 + wr " " >&2 + case "$buf" in + () wr '^[' >&2;; + (*) wr "$buf" >&2;; + esac + wr "`wr "$buf" | xxd -p`" >&2 + wr 8 +} + +wr() { + echo -n "$1" +} + +C0="`echo C0 | xxd -r -p`"; DF="`echo DF | xxd -r -p`" +E0="`echo E0 | xxd -r -p`"; EF="`echo EF | xxd -r -p`" +F0="`echo F0 | xxd -r -p`"; F7="`echo F7 | xxd -r -p`" +S() { + bufrd + case "$buf" in + () go ESC;; + () wr ' '; go S;; + ([$C0-$DF]) go U1;; + ([$E0-$EF]) go U2;; + ([$F0-$F7]) go U3;; + (*) wr "$buf"; go S;; + esac +} + +U1() { buf="$buf`rd`"; wr "$buf"; go S; } +U2() { buf="$buf`rd`"; go U1; } +U3() { buf="$buf`rd`"; go U2; } + + +ESC() { + bufrda + case "$buf" in + ('[') go ESC_OSQRB;; + (*) + wr '^[' + go S + ;; + esac +} + +ESC_OSQRB() { + bufrda + case "$buf" in + (''|''|''|'') wr "$buf"; go S;; + (*) + wr '^[[' + go S + ;; + esac +} + + +wr 'c' +go S diff --git a/cholerab/too_old/ttycnser.sh b/cholerab/too_old/ttycnser.sh new file mode 100755 index 00000000..0972dbbb --- /dev/null +++ b/cholerab/too_old/ttycnser.sh @@ -0,0 +1,27 @@ +#! /bin/sh +set -euf + +tty="${TMPDIR-/tmp}/ttycnser.$LOGNAME.tty" + +case "${mode-server}" in + (server) + host=0.0.0.0 + port=8080 + export mode=client + echo "ttycnser @ $host $port" >&2 + exec tcpserver $host $port "$0" + ;; + (client) + line="`read line && echo "$line"`" + echo -n '7>>>> '"$line"'8' > "$tty" + ;; + (install) + # TODO tell the user to do something like + # PROMPT_COMMAND="`mode=install ~/p/krebscode/painload/cholerab/ttycnser`" + echo "ln -snf '`tty`' '$tty'" + ;; + (*) + echo 'Error 1: You are made of stupid!' >&2 + exit 23 + ;; +esac diff --git a/cholerab/ttycnser.sh b/cholerab/ttycnser.sh deleted file mode 100755 index 0972dbbb..00000000 --- a/cholerab/ttycnser.sh +++ /dev/null @@ -1,27 +0,0 @@ -#! /bin/sh -set -euf - -tty="${TMPDIR-/tmp}/ttycnser.$LOGNAME.tty" - -case "${mode-server}" in - (server) - host=0.0.0.0 - port=8080 - export mode=client - echo "ttycnser @ $host $port" >&2 - exec tcpserver $host $port "$0" - ;; - (client) - line="`read line && echo "$line"`" - echo -n '7>>>> '"$line"'8' > "$tty" - ;; - (install) - # TODO tell the user to do something like - # PROMPT_COMMAND="`mode=install ~/p/krebscode/painload/cholerab/ttycnser`" - echo "ln -snf '`tty`' '$tty'" - ;; - (*) - echo 'Error 1: You are made of stupid!' >&2 - exit 23 - ;; -esac -- cgit v1.2.3 From 34d9ba4e29f204ab0fa3cf9c6d163766750b5f85 Mon Sep 17 00:00:00 2001 From: lassulus Date: Fri, 31 May 2013 22:17:19 +0200 Subject: changed ip of slowpoke --- retiolum/hosts/slowpoke | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/retiolum/hosts/slowpoke b/retiolum/hosts/slowpoke index e5cf70bf..09e415e1 100644 --- a/retiolum/hosts/slowpoke +++ b/retiolum/hosts/slowpoke @@ -1,4 +1,4 @@ -Address = 81.89.96.210 +Address = 62.113.241.235 Subnet = 10.243.232.121 Subnet = 42:7d8f:9e3a:dcc7:9b22:d1ca:7e28:fe9c -- cgit v1.2.3 From a653b947f5238267201e155005b603664a39d0e8 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 2 Jun 2013 18:57:25 +0200 Subject: added autowifi script --- autowifi/autowifi | 190 ++++++++++++++++++++++++++++++++++++++ autowifi/confdir/blacklist | 2 + autowifi/confdir/cracks/00profile | 11 +++ autowifi/confdir/cracks/01open | 6 ++ cholerab/bling/krebs-v3_small.txt | 10 ++ minikrebs | 2 +- 6 files changed, 220 insertions(+), 1 deletion(-) create mode 100755 autowifi/autowifi create mode 100644 autowifi/confdir/blacklist create mode 100755 autowifi/confdir/cracks/00profile create mode 100755 autowifi/confdir/cracks/01open create mode 100644 cholerab/bling/krebs-v3_small.txt diff --git a/autowifi/autowifi b/autowifi/autowifi new file mode 100755 index 00000000..e2ddb010 --- /dev/null +++ b/autowifi/autowifi @@ -0,0 +1,190 @@ +#!/bin/sh -x + +confdir=${confdir:-"$(dirname $0)/confdir"} +interface="wlan0" + +exists() { type "$1" >/dev/null 2>/dev/null; } + +start_wpa_supplicant(){ + killall wpa_supplicant + sleep 1 +cat>wpa.conf< $confdir/wifi_stats2 + mv $confdir/wifi_stats2 $confdir/wifi_stats + return 0 + fi + return 1 + +} +print_iwlist_env(){ + # takes environment: + # MAC + # FREQ + # QUALITY + # ENCRYPTION + # ESSID + for i in MAC FREQ QUALITY ENCRYPTION ESSID;do + eval echo ${i}_${count}=\\\"\$"${i}"\\\" + done +} + +iwlist_scan(){ + # usage: iwlist_scan $wifi-itf + + count=0 + wpa_cli scan >/dev/null + sleep 10 + + wpa_cli scan_results 2>/dev/null | grep -E "^??:" | sed 's/ / /g' | (while IFS=' ' read MAC FREQ QUALITY ENCRYPTION ESSID + do + : $((count+=1)) + print_iwlist_env + + done; echo WIFI_COUNT=$count) +} + +find_count_of_ssid(){ + c=0 + for i in `seq 1 $WIFI_COUNT`; do + eval SSID=\${ESSID_${i}} + if [ "$SSID" = $1 ]; then + c+=1 + echo $i + fi + done + if [ $c -eq 0 ];then + exit 1 + fi + exit 0 +} + +find_unscanned_networks(){ + for i in `seq 1 $WIFI_COUNT`; do + eval SSID=\${ESSID_${i}} + eval MAC=\${MAC_${i}} + cat $confdir/wifi_stats 2>/dev/null | (while IFS='|' read SSID MAC BANDW KEY; do + if [ "$1" = "$SSID" -a "$2" = "$MAC" ]; then + continue + fi + done; echo $i) + done + exit 0 +} + +connect_to_network_by_ssid(){ + find_count_of_ssid "$1" | (while read i + do + loop_over_cracks $i + done;exit 1) + if [ $? -eq 0 ]; then + exit 0 + fi + echo "no network found :(" + exit 1 +} + +connect_with_pw(){ + find_count_of_ssid "$1" | (while read i + do + KEY="$2" + eval connect \"\${MAC_${i}}\" \"\${ESSID_${i}}\" \${ENCRYPTION_${i}} \"\${KEY}\" + if [ $? -eq 0 ]; then + exit 0 + fi + done;exit 1) +} + +loop_over_networks(){ + for i in `seq 1 $WIFI_COUNT`; do + loop_over_cracks $i + if [ $? -eq 0 ]; then + exit 0 + fi + done +} + +loop_over_cracks(){ + i=$1 + KEY='' + for crack in $(find $confdir/cracks -type f); do + KEY="$(eval root=$confdir \$crack \"\${ESSID_${i}}\" \"\${MAC_${i}}\" \${FREQ_${i}} \${ENCRYPTION_${i}})" + if [ $? -eq 0 ]; then + eval connect \"\${MAC_${i}}\" \"\${ESSID_${i}}\" \${ENCRYPTION_${i}} \"\${KEY}\" + if [ $? -eq 0 ]; then + return 0 + fi + fi + done + return 1 +} + +scan_all(){ + for i in `seq 1 $WIFI_COUNT`; do + loop_over_cracks $i + done +} + +scan_unscanned(){ + find_unscanned_networks | (while read i + do + loop_over_cracks $i + done) +} + + +check_gateway(){ + echo ping -c 1 -w 5 $(ip route | grep $interface | awk '/default/{print $3}') +} + +check_internet(){ + ping -c 1 -w 5 8.8.8.8 +} + +check_bandwidth(){ + echo $(printf "%.16d\n" $(curl ftp://ftp.microsoft.com/Products/mspress/library/ANIMAT.ZIP -w "%{speed_download}" -o /dev/null 2>/dev/null | sed 's/\..*//')) +} + +start_wpa_supplicant +iwlist_scan > /tmp/$interface.scan +. /tmp/$interface.scan +if [ -n "$2" ]; then + echo connecting to $1 with pw $2 + connect_with_pw "$1" "$2" +elif [ -n "$1" ]; then + echo connecting to $1 + connect_to_network_by_ssid "$1" +else + echo looping network now + loop_over_networks +fi diff --git a/autowifi/confdir/blacklist b/autowifi/confdir/blacklist new file mode 100644 index 00000000..f0e5c6a1 --- /dev/null +++ b/autowifi/confdir/blacklist @@ -0,0 +1,2 @@ +02:25:9c:41:c6:89 +02:25:9c:41:c4:cc diff --git a/autowifi/confdir/cracks/00profile b/autowifi/confdir/cracks/00profile new file mode 100755 index 00000000..c2ad6ec7 --- /dev/null +++ b/autowifi/confdir/cracks/00profile @@ -0,0 +1,11 @@ +#!/bin/sh -x +#ESSID MAC CHANNEL ENCRYPTION WPA WPA2 +# ENV: +# root (default: /) +root=${root:-/} +cat $root/wifi_stats 2>/dev/null | (while IFS='|' read SSID MAC BANDW KEY; do + if [ "$1" = "$SSID" -a "$2" = "$MAC" ]; then + echo $KEY + exit 0 + fi +done; exit 1) diff --git a/autowifi/confdir/cracks/01open b/autowifi/confdir/cracks/01open new file mode 100755 index 00000000..7bd98e20 --- /dev/null +++ b/autowifi/confdir/cracks/01open @@ -0,0 +1,6 @@ +#!/bin/sh -x +#ESSID MAC CHANNEL ENCRYPTION WPA WPA2 +if [ "$4" = "[ESS]" ]; then + exit 0 +fi +exit 1 diff --git a/cholerab/bling/krebs-v3_small.txt b/cholerab/bling/krebs-v3_small.txt new file mode 100644 index 00000000..8adce7eb --- /dev/null +++ b/cholerab/bling/krebs-v3_small.txt @@ -0,0 +1,10 @@ +x x x x +x x x x +xx xx + x x x x + x x x x +xxxxxxxxxx + xxxxxxxx +x xxxxxx x +x x x x x +x x xx x x diff --git a/minikrebs b/minikrebs index d74fa7bd..d44469e4 160000 --- a/minikrebs +++ b/minikrebs @@ -1 +1 @@ -Subproject commit d74fa7bd724c45270f86b3b1eacecf90b83b0212 +Subproject commit d44469e4fa51171c12fff95b1a3170eb85328698 -- cgit v1.2.3 From 5a428d4646b73f16b890f6c089a67dbc710df533 Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 5 Jun 2013 18:57:33 +0200 Subject: autowifi: now with hooks --- autowifi/autowifi | 24 +++++++++++++++++++++++- autowifi/confdir/hooks/wlan0/post/00tinc-up | 2 ++ autowifi/confdir/hooks/wlan0/pre/00changemac | 5 +++++ 3 files changed, 30 insertions(+), 1 deletion(-) create mode 100755 autowifi/confdir/hooks/wlan0/post/00tinc-up create mode 100755 autowifi/confdir/hooks/wlan0/pre/00changemac diff --git a/autowifi/autowifi b/autowifi/autowifi index e2ddb010..5bdbde22 100755 --- a/autowifi/autowifi +++ b/autowifi/autowifi @@ -18,6 +18,17 @@ EOF connect(){ #mac ssid encryption key wpa_cli reconfigure + + #INTERFACE PRE CONNECT HOOKS + for hook in $(find $confdir/hooks/$interface/pre -type f | sort -u); do + $hook $@ + done + + #PROFILE PRE CONNECT HOOKS + for hook in $(find "$confdir/hooks/$2/pre" -type f | sort -u); do + $hook $@ + done + int=$(wpa_cli add_network | tail -1) wpa_cli set_network $int ssid \"$2\" wpa_cli set_network $int bssid $1 @@ -39,6 +50,17 @@ connect(){ if check_gateway && check_internet; then echo yay internet + #INTERFACE POST CONNECT HOOKS + for hook in $(find $confdir/hooks/$interface/post -type f | sort -u); do + $hook $@ + done + + #PROFILE POST CONNECT HOOKS + for hook in $(find "$confdir/hooks/$2/post" -type f | sort -u); do + $hook $@ + done + + bandw=$(check_bandwidth) (cat $confdir/wifi_stats | grep -v "|$1|" ; echo "$2|$1|$bandw|$4" ) | sort | uniq > $confdir/wifi_stats2 mv $confdir/wifi_stats2 $confdir/wifi_stats @@ -137,7 +159,7 @@ loop_over_networks(){ loop_over_cracks(){ i=$1 KEY='' - for crack in $(find $confdir/cracks -type f); do + for crack in $(find $confdir/cracks -type f | sort -u); do KEY="$(eval root=$confdir \$crack \"\${ESSID_${i}}\" \"\${MAC_${i}}\" \${FREQ_${i}} \${ENCRYPTION_${i}})" if [ $? -eq 0 ]; then eval connect \"\${MAC_${i}}\" \"\${ESSID_${i}}\" \${ENCRYPTION_${i}} \"\${KEY}\" diff --git a/autowifi/confdir/hooks/wlan0/post/00tinc-up b/autowifi/confdir/hooks/wlan0/post/00tinc-up new file mode 100755 index 00000000..3fd786e4 --- /dev/null +++ b/autowifi/confdir/hooks/wlan0/post/00tinc-up @@ -0,0 +1,2 @@ +#!/bin/sh +tincd -n retiolum -kALRM diff --git a/autowifi/confdir/hooks/wlan0/pre/00changemac b/autowifi/confdir/hooks/wlan0/pre/00changemac new file mode 100755 index 00000000..c3e0632f --- /dev/null +++ b/autowifi/confdir/hooks/wlan0/pre/00changemac @@ -0,0 +1,5 @@ +#!/bin/sh +ifconfig wlan0 down +sleep 1 +macchanger -r wlan0 +ifconfig wlan0 up -- cgit v1.2.3