From 6ff9745ec32d4688773461d40e2661a73930ab89 Mon Sep 17 00:00:00 2001 From: SkyperTHC Date: Mon, 15 May 2023 12:30:59 +0100 Subject: [PATCH] destruct2 --- guest/Dockerfile | 1 + guest/fs-root/sf/bin/destruct | 17 +++++++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/guest/Dockerfile b/guest/Dockerfile index d2b23d9..2ddca1e 100644 --- a/guest/Dockerfile +++ b/guest/Dockerfile @@ -672,6 +672,7 @@ RUN /pkg-install.sh LARGE ghdir gophish/gophish 'linux-64bit.zip$' /usr/gophish && echo -e "#! /bin/bash\ncd /usr/gophish && exec ./gophish \"\$@\"" >/usr/bin/gophish \ && chmod 755 /usr/bin/gophish; }' RUN /pkg-install.sh HUGE npm install -g wscat +RUN /pkg-install.sh HUGE bash -c 'mkdir -p /usr/share/wordlists; curl -fsSL https://crackstation.net/files/crackstation-human-only.txt.gz | gunzip >/usr/share/wordlists/crackstation-human-only.txt' RUN sed 's/deb-src.*//' -i /etc/apt/sources.list \ && apt-get autoremove -y \ && apt-get update diff --git a/guest/fs-root/sf/bin/destruct b/guest/fs-root/sf/bin/destruct index 1fe14c9..fac9410 100755 --- a/guest/fs-root/sf/bin/destruct +++ b/guest/fs-root/sf/bin/destruct @@ -16,13 +16,14 @@ encrypted data will remain until next log in (with the correct SECRET). This system will ${CRY}SELF-DESTRUCT${CN} in 10 seconds." read -r -n8 -t10 str && { - echo -e "${CDR}Self-Destruct cancelled...${CDY}*phew*${CN}" - [[ $str == "halt" ]] && { - echo -e "HALT instead..." - halt + [[ $str != "now" ]] && { + echo -e "${CDR}Self-Destruct cancelled...${CDY}*phew*${CN}" + [[ $str == "halt" ]] && { + echo -e "HALT instead..." + halt + } exit 255 } - [[ $str != "now" ]] && exit 255 } } @@ -35,6 +36,10 @@ echo -e "${CDR}***DESTRUCT***${CN}" shopt -s dotglob rm -rf /onion/* rm -rf "/everyone/${SF_HOSTNAME,,}/"* -rm -rf /sec/* +# Bloody at-spi-bu re-creates a fuse-hidden file when the parent directory is deleted. +# Force kill it. +rm -rf /sec/* 2>/dev/null +find /sec/root/.cache/dconf -exec fuser -k {} \; &>/dev/null +rm -rf /sec/root/* echo -e "${CDG}DONE.${CN}" halt