removed "cat -" pipe, it works fine as is

This commit is contained in:
localhost_frssoft 2023-07-22 22:42:54 +03:00
parent 83194c4083
commit 0412550d45

View File

@ -26,8 +26,8 @@ mkdir -p -m 700 access_granted
generator_session=$(zcat -f $system_dict | shuf -n 2 | tr -d "\n'") generator_session=$(zcat -f $system_dict | shuf -n 2 | tr -d "\n'")
randpadding=$(head -c 8 /dev/urandom | base64) randpadding=$(head -c 8 /dev/urandom | base64)
printf "$randpadding\t$generator_session\n" printf "$randpadding\t$generator_session\n"
cat - |
while read -r cmd mesg; do while read -r cmd mesg; do
if [ "$cmd" = "reg" ]; then if [ "$cmd" = "reg" ]; then
key=$(echo "$mesg" | cut -d' ' -f 2) key=$(echo "$mesg" | cut -d' ' -f 2)
session=$(echo "$mesg" | cut -d' ' -f 1) session=$(echo "$mesg" | cut -d' ' -f 1)
@ -63,6 +63,6 @@ cat - |
*) die; break ;; *) die; break ;;
esac esac
printf 'bbs > ' printf 'bbs > '
done done
rm access_granted/"$remote_ip" rm access_granted/"$remote_ip"
echo 'session was close' echo 'session was close'