forked from tildeverse/SLBR
Merge branch 'master' of https://tildegit.org/tildeverse/SLBR into testing
This commit is contained in:
commit
bfba4730fd
35
README.md
35
README.md
|
@ -1,2 +1,35 @@
|
|||
# SLBR
|
||||
# SUICIDE LINUX BATTLE ROYALE
|
||||
coming soon! check #slbr on irc for updates!
|
||||
|
||||
typo? you're out.
|
||||
|
||||
when you play, you'll be dropped in a fresh vm. on the way to your goal, any mistyped command will delete your vm and you'll be eliminated.
|
||||
|
||||
contact ~ben or sose on tilde.chat (in the #slbr channel) to sign up.
|
||||
|
||||
## Prerequisites
|
||||
- LXC
|
||||
- LXD with an lxdbr0 device configured
|
||||
- BSD style netcat
|
||||
- Tmux
|
||||
- Python 3
|
||||
- An open ssh port
|
||||
|
||||
## Setup
|
||||
- Switch to the directory you would like to run SLBR in.
|
||||
- `git clone https://tildegit.org/tildeverse/SLBR`
|
||||
- `cd SLBR`
|
||||
- `ln -s $PWD/* ..`
|
||||
- `cd ..`
|
||||
|
||||
## Running the game
|
||||
- Run `./listen.py` to start the death listener.
|
||||
- Run `./newuser.sh [user]` to create new users as you see fit.
|
||||
- Run `./deluser.sh [user]` to delete a user. (this is done automatically when a user types a command incorrectly)
|
||||
- Once all of your users are created and logged in, run `echo "1" > gamestatus` to start the game.
|
||||
|
||||
## TODO
|
||||
- Handling of ssh keys and/or passwords
|
||||
- Install-time configuration (setting proper ips, hostname, etc.)
|
||||
|
||||
This is a ~ work in progress ~
|
||||
|
|
|
@ -21,7 +21,7 @@ def clientthread(conn):
|
|||
log.close()
|
||||
|
||||
print("sending message")
|
||||
os.system("tail -n1 gamelog.txt | ./sendmsg.sh") # oh noooooo
|
||||
os.system("./sendmsg.sh \"$(tail -n1 gamelog.txt)\"") # oh noooooo
|
||||
print("sent message: " + message)
|
||||
|
||||
userisdead = (
|
||||
|
|
14
sendmsg.sh
14
sendmsg.sh
|
@ -1,9 +1,7 @@
|
|||
#!/bin/bash
|
||||
function send {
|
||||
ADDRESSES=$(lxc list | cut -f 4 -d '|' \
|
||||
| grep -Eo "[0-9]*\\.[0-9]*\\.[0-9]*\\.[0-9]*")
|
||||
for ADDRESS in $ADDRESSES
|
||||
do
|
||||
echo "$1" | nc -q2 "$ADDRESS" 9090
|
||||
done
|
||||
}
|
||||
ADDRESSES=$(lxc list | cut -f 4 -d '|' \
|
||||
| grep -Eo "[0-9]*\\.[0-9]*\\.[0-9]*\\.[0-9]*")
|
||||
for ADDRESS in $ADDRESSES
|
||||
do
|
||||
echo "$1" | nc -q2 "$ADDRESS" 9090
|
||||
done
|
||||
|
|
|
@ -54,5 +54,7 @@ if [ ! -e "$HOME/.sudo_as_admin_successful" ] && [ ! -e "$HOME/.hushlogin" ] ; t
|
|||
fi
|
||||
|
||||
function command_not_found_handle {
|
||||
echo "$(hostname) has been eliminated by '$1'" | nc -q2 10.161.77.1 9191
|
||||
echo "$(hostname) has been eliminated by '$1'" | nc -q2 test.tilde.team 9090 &
|
||||
echo "====YOU HAVE BEEN ELIMINATED===="
|
||||
sleep 2
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue