diff --git a/Makefile b/Makefile index 46d955f..5d44d68 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -VER := 0.5.6rc1 +VER := 0.5.6p1 all: make -C router diff --git a/contrib/sfwg b/contrib/sfwg index e28fa52..5ff420d 100755 --- a/contrib/sfwg +++ b/contrib/sfwg @@ -261,7 +261,7 @@ wt_dl() command -v tar >/dev/null || ERREXIT 255 "tar not found. Try ${CDC}apt install tar${CN}" - arch=$(uname -m) + arch=$(uname -m 2>/dev/null) url="https://github.com/sandialabs/wiretap/releases/download/v0.2.1/wiretap_0.2.1_${OS}_amd64.tar.gz" if [[ $arch == aarch64 ]] || [[ $arch == arm64 ]]; then url="https://github.com/sandialabs/wiretap/releases/download/v0.2.1/wiretap_0.2.1_${OS}_arm64.tar.gz" @@ -316,7 +316,6 @@ wt_up() local pid local pidstr local cmd_checkrunning - local arg local n local killname @@ -370,6 +369,7 @@ wt_up() if [[ -z $SF_DEBUG ]]; then PATH=".:$PATH" exec -a '[updated]' wiretap serve -q --allowed "${peer_addr}" &>/dev/null & + pid=$! else PATH=".:$PATH" ./wiretap serve --allowed "${peer_addr}" fi @@ -407,7 +407,7 @@ Alternatively use ${CDM}WireGuard:${CDC} echo -e "\ ${CDG}SUCCESS${CN} - ${CDM}Wiretap${CN} started as ${CDY}[updated]${CN}${pidstr} in the background. ----> To stop : ${CDC}${CMD_PKILL} '${killname}'${CN}" +---> To stop : ${CDC}${CMD_PKILL} '${killname}'${CN} or ${CDC}kill ${pid:--1}${CN}" } [[ -z $X ]] && ERREXIT 255 "The variable ${CDY}X=${CN} is not set. Try diff --git a/contrib/unban.sh b/contrib/unban.sh new file mode 100755 index 0000000..c9e0d20 --- /dev/null +++ b/contrib/unban.sh @@ -0,0 +1,16 @@ +#! /usr/bin/env bash + +## In the format of: +# HOSTS+=("adm") +# HOSTS+=("lgm") + +source .env_hosts || exit + +unip="${1//[^0-9.:]}" +fn="banned/ip-${unip:?}" +[ ! -f "${fn}" ] && { echo >&2 "Not found: $fn"; exit; } +rm -f "${fn:?}" + +for h in "${HOSTS[@]}"; do + ssh "${h}" "rm -f /sf/config/db/${fn}" +done diff --git a/docker-compose.yml b/docker-compose.yml index 4027828..b536850 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -51,7 +51,7 @@ services: - "${SF_SHMDIR:-/dev/shm/sf}/run/redis/sock:/redis-sock" - "/sys/fs/cgroup:/sys/fs/cgroup" - # Note: If this one fails to start then most likelly bad ENCFS password. + # Note: If this one fails to start then most likely bad ENCFS password. # level=fatal msg="no such file or directory": unknown sf-destructor: build: encfsd diff --git a/guest/Dockerfile b/guest/Dockerfile index 8792753..1ebd31b 100644 --- a/guest/Dockerfile +++ b/guest/Dockerfile @@ -830,7 +830,9 @@ RUN /pkg-install.sh DEV ghbin helix-editor/helix '-%arch%-linux.tar.xz' hx \ && /pkg-install.sh DEV ghbin dandavison/delta '_%arch1%.deb' \ && /pkg-install.sh DEV ghbin watchexec/watchexec '%arch%-unknown-linux-musl.deb' '' '' '' --force-overwrite RUN /pkg-install.sh HACK pipx install yxdump \ - && /pkg-install.sh HACK ghbin hackerschoice/dsniff 'linux-%arch%' dsniff "/usr/sbin" + && /pkg-install.sh HACK ghbin hackerschoice/dsniff 'linux-%arch%' dsniff "/usr/sbin" \ + && /pkg-install.sh HACK bin https://paste.c-net.org/pbenc pbenc \ + && /pkg-install.sh HACK pipx install xortool RUN sed 's/deb-src.*//' -i /etc/apt/sources.list \ && apt-get autoremove -y \ && apt-get update