KrystianD

Hack The Game!

Nov 17th, 2013
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.56 KB | None | 0 0
  1. #!/bin/bash
  2. exec 3<>/dev/tcp/krakow.hackerspace.pl/666
  3.  
  4. echo "take guitar" >&3
  5.  
  6. A=$(timeout 0.5 cat <&3)
  7.  
  8. echo "$A"
  9. while [ 1 = 1 ]; do
  10.     echo "|$A|"
  11.  
  12.     if [[ "$A" == *"pink cir"* ]]; then
  13.         echo "press pink button" >&3
  14.     elif [[ "$A" == *"yellow cir"* ]]; then
  15.         echo "press yellow button" >&3
  16.     elif [[ "$A" == *"red cir"* ]]; then
  17.         echo "press red button" >&3
  18.     elif [[ "$A" == *"blue cir"* ]]; then
  19.         echo "press blue button" >&3
  20.     elif [[ "$A" == *"green cir"* ]]; then
  21.         echo "press green button" >&3
  22.     fi
  23.  
  24.     A=$(timeout 0.3 cat <&3)
  25.     sleep 0.1
  26. done
Add Comment
Please, Sign In to add comment