]> git.somenet.org - pub/jan/ctf-seminar.git/blob - writeups/litplus/otw19/24-proc.sh
Add werite-up for OTW day-24: Got shell?
[pub/jan/ctf-seminar.git] / writeups / litplus / otw19 / 24-proc.sh
1 echo "HELLO";
2 coproc p1 {
3 ./flag_reader;
4 };
5 read line <&${p1[0]};
6 echo " -> $line <-";
7 read -d "=" captcha <&${p1[0]};
8 solution=$(echo $captcha | timeout 1s awk '{ sum = $1 + $3 ;
9   printf "%.0f", sum }');
10 echo "hey solute $solution";
11 echo "$solution" >&${p1[1]};
12 echo "hi";
13 cat <&${p1[0]}