$ sudo apt-get update - update distribution to latest (optional)
$ sudo apt-get upgrade - upgrade distribution to latest (optional)
$ sudo apt-get install arp-scan - install arp-scan package
$ sudo apt-get install mysql-server - install mysql server
$ sudo apt-get install -y nodejs
$ git clone https://<your_username>@bitbucket.org/haruttosunyan/slackbot.git
(You may need to install git first "sudo apt-get install git")
$ cd /path/to/project
$ npm install
Open config.js file and edit
Config | Value |
---|---|
HOST | database host |
DB_NAME | database name |
DB_USERNAME | database user |
DB_PASSWORD | database password |
SLACK_TOKEN | YOUR_TOKEN_HERE |
SLACK_BOT_NAME | YOUR_BOT_NAME |
Set up a minutely cron task under root that runs php presence scan.
$ sudo crontab -e
Then add in this line at the end.
*/1 * * * * node /full/path/to/project/presence scan
The command "node presence bot" will start up the bot, it needs root permission to do the arp scan, so either sudo or use root. Make sure you're in the presence-bot directory and run the following commands
sudo node presence database #This will start the database
sudo node presence bot #This will start the bot
the bot is triggered via presence
register xx:xx:xx:xx:xx:xx
to associate yourself with a mac addressremove xx:xx:xx:xx:xx:xx
to undo previous associationblacklist xx:xx:xx:xx:xx:xx
to blacklist a mac addresswho is here
,whoishere
,who's here
I'll let you know who is in the housetop x
listing of the most active users 1-10whoami
tells you what devices are registered to you.