Skip to content

Commit

Permalink
insane
Browse files Browse the repository at this point in the history
  • Loading branch information
zardus committed Sep 7, 2024
1 parent 79c65be commit d347092
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions input-restrictions/19-next-3/run
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ WORKDIR=$(mktemp -d)
cp "$1" "$WORKDIR/dangerous-script.sh"
cd $WORKDIR

# thanks to armax00 for finding this insane hack
source <(bind -l | grep -vE "next-history|previous-history|backward-char|forward-char|accept-line|self-insert" | awk '{print "bind -u " $0}')

doit() {
echo -n ""
cat dangerous-script.sh | tr -cd "[\n \-/0-9a-z]" | grep -E "^(echo|read) " > safe-script.sh
Expand Down

0 comments on commit d347092

Please sign in to comment.