I've got a class exercise that involves a virtual game of Werewolves/Mafia. We're not really taught how to do anything in this class, which makes it hard for everyone to do the labs.
The idea is that for certain rounds of the game, the bad guys vote for people to kill, then in the next round everyone starts guessing about who the bad guys are and tries to kill them instead.
This is set up as:
- a python server used by a moderator
- a python client launched by everyone to send/receive server messages (we can modify this)
- everyone uses ssh to connect to one machine (so server & clients run on one machine)
- they communicate through named pipes (tucked away in protected directories)
We need to either:
- as the good guys: find out when the werewolves are communicating with the server so we can vote to kill that user
- or as the bad guys: not get caught communicating with the server
Some ideas that I'm trying to work with but am too much of a network/linux noob to use:
/proc/pid#/sched There should be useful stuff in here. I think I can check for voluntary context switches to see when a user is typing. Unfortunately I'm no good with scripting. Also, I'm not sure how to get the pid#. Maybe pipe top into grep "python"?
check the ssh connections to the machine, and somehow listen to the socket for communications?
I'm thoroughly stumped, so any advice would be awesome.