OK, turing.

<- leave blank

Wed Mar 13 12:29:56 EDT 2019

#!/bin/rc
# Designed to be used with aux/listen1
# EX: aux/listen1 firewall /lib/blacklist aux/trampoline ...

while(~ $1 -*){
	switch($1){
	case -l
		shift
		sed 's/!.*//' $net/remote >> $1
	}

	shift
}

if(test $#* -lt 2){
	echo 'usage: firewall [-l logfile] blacklist command args...' >>
	/fd/2
	exit
}

if(grep -s `{sed 's/!.*//' $net/remote} $1)
	exit 'blocked by firewall'

shift
exec $*