diff options
Diffstat (limited to 'filehooker/root-image/krebs/bin')
5 files changed, 56 insertions, 0 deletions
diff --git a/filehooker/root-image/krebs/bin/filehooker_configure_ncdc.ship b/filehooker/root-image/krebs/bin/filehooker_configure_ncdc.ship new file mode 100755 index 00000000..62d3b4f7 --- /dev/null +++ b/filehooker/root-image/krebs/bin/filehooker_configure_ncdc.ship @@ -0,0 +1,15 @@ +#!/usr/bin/env ship +#TODO waiting for ship2 +#@info +#@strict +set -euf +#@include filehooker +. /krebs/lib/filehooker + +dc_hub="adcs://elch.nsupdate.info:2781" +nick="$(cat /etc/hostname)" + +ncdc_install + +ncdc_configure_nick "$nick" +ncdc_configure_hub "$dc_hub" diff --git a/filehooker/root-image/krebs/bin/filehooker_configure_netshare.ship b/filehooker/root-image/krebs/bin/filehooker_configure_netshare.ship new file mode 100755 index 00000000..f45ffeac --- /dev/null +++ b/filehooker/root-image/krebs/bin/filehooker_configure_netshare.ship @@ -0,0 +1,7 @@ +#!/bin/sh +#@info +#@strict +#@include filehooker +#for i in $(prepare_netshares) ;do + #ncdc_configure_netshare "$i" "${i##*/}" +#done diff --git a/filehooker/root-image/krebs/bin/filehooker_set_hostname.sh b/filehooker/root-image/krebs/bin/filehooker_set_hostname.sh new file mode 100755 index 00000000..cb9b0170 --- /dev/null +++ b/filehooker/root-image/krebs/bin/filehooker_set_hostname.sh @@ -0,0 +1,5 @@ +#!/usr/bin/bash +hostn="filehooker$RANDOM" +echo "$hostn" > /etc/hostname +hostname $hostn + diff --git a/filehooker/root-image/krebs/bin/tor_announce.ship b/filehooker/root-image/krebs/bin/tor_announce.ship new file mode 100755 index 00000000..bf9d58dc --- /dev/null +++ b/filehooker/root-image/krebs/bin/tor_announce.ship @@ -0,0 +1,17 @@ +#!/bin/sh +#@include core +. /krebs/lib/core +#@include network +. /krebs/lib/network +#@include tor +. /krebs/lib/tor + +test -w "$torrc" || ( error "$torrc is not writable!"; exit 1 ) || exit 1 + +configure_hidden_service +test ! -e $hidden_service_dir/hostname && \ + info "hidden service file does not exist, restarting tor" && \ + systemctl restart tor && \ + sleep 1 + +cat $hidden_service_dir/hostname | send_irc diff --git a/filehooker/root-image/krebs/bin/tor_publish_ssh.ship b/filehooker/root-image/krebs/bin/tor_publish_ssh.ship new file mode 100755 index 00000000..2ecee9fb --- /dev/null +++ b/filehooker/root-image/krebs/bin/tor_publish_ssh.ship @@ -0,0 +1,12 @@ +#!/usr/bin/env ship +#@include core +. /krebs/lib/core +#@include network +. /krebs/lib/network +#@include tor +. /krebs/lib/tor + +test -w "$torrc" || ( error "$torrc is not writable!"; exit 1 ) || exit 1 + +configure_hidden_service +cat $hidden_service_dir/hostname | send_irc |