Skip to content

Commit

Permalink
hardening and cleanup --- gah
Browse files Browse the repository at this point in the history
  • Loading branch information
zardus committed May 24, 2023
1 parent fddf516 commit 2647778
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion input-restrictions/20/run
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

PATH=/usr/bin

WORKDIR=$(mktemp -d) || exit 1
WORKDIR=$(mktemp -p $(mktemp -d /tmp/XXXXXXX) -d XXXXXXXX) || exit 1
cd $WORKDIR

# some cleanup
Expand Down
4 changes: 1 addition & 3 deletions input-restrictions/23/run
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@

PATH=/usr/bin

WORKDIR=$(mktemp -d) || exit 1
WORKDIR=$(mktemp -p $(mktemp -d /tmp/XXXXXXX) -d XXXXXXXX) || exit 1
cd $WORKDIR

# some cleanup
HOME=$WORKDIR
unset OLDPWD

cp /flag $WORKDIR

while [ "$INPUT" != "exit" ]
do
read -r INPUT
Expand Down
2 changes: 1 addition & 1 deletion input-restrictions/25/run
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

PATH=/usr/bin

WORKDIR=$(mktemp -d) || exit 1
WORKDIR=$(mktemp -p $(mktemp -d /tmp/XXXXXXX) -d XXXXXXXX) || exit 1
cd $WORKDIR

# some cleanup
Expand Down
4 changes: 1 addition & 3 deletions input-restrictions/30/run
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@

PATH=/usr/bin

WORKDIR=$(mktemp -d) || exit 1
WORKDIR=$(mktemp -p $(mktemp -d /tmp/XXXXXXX) -d XXXXXXXX) || exit 1
cd $WORKDIR

# some cleanup
HOME=$WORKDIR
unset OLDPWD

cp /flag .

while [ "$INPUT" != "exit" ]
do
read -r INPUT
Expand Down

0 comments on commit 2647778

Please sign in to comment.