Senior R&D Manager (Data Science) at Synopsys Software Integrity Group and Treasurer at Farset Labs & Bsides Belfast
After a long time in the oven, Farset Labs is up and running. Unforanately we don’t have any of the crazy equipment yet, since we’re broke.
Basically, first person pushes the BRB down in the morning, then one of the directors key-unlocks the space to ‘close’ it.
This was accomplished using the Velleman K8055 USB interface board and a lot of speaker wire.
Simple enough, but a process fruaght with stupid mistakes, such as:
Whoops, have to run as sudo to access the USB device
Whoops, OAuth2 is a pain in the ass
Whoops, have to change each message slightly or Twitter thinks I’m spamming the joint
Whoops, have to do PING/PONG responses to the IRC server (easier to use
irclibsince it manages that for you)
Whoops, need to keep talking to the IRC server otherwise it disconnects us (hence the
irc.process_once()call in the main
Whoops, Ruby isn’t any better than python at OAuth2
sudo apt-get install build-essential libusb-dev python-dev python-setuptools python-irclib sudo easy_install oauth2 sudo mkdir /opt/bin
cd /tmp/ wget package from <a href="http://sourceforge.net/projects/python-k8055/">http://sourceforge.net/projects/python-k8055/</a> tar -xvjf python-k8055-0.2.tar.bz2 cd python-k8055-0.2 sudo python setup.py install cd /opt/bin/ sudo wget <a href="http://pastebin.com/KqCKhKG6" target="_blank" title="Occupy Farset Python Script">occupy-farset.py</a> cd /etc/init/ sudo wget <a href="http://pastebin.com/mzRZWP75" target="_blank" title="Occupy Farset Upstart Conf File">occupy-farset.conf</a> sudo initctl reload-configuration sudo service occupy-farset start sudo service occupy-farset status
Copy our customised (but highly customisable) python script that talks to IRC, Twitter, and the interface board
Copy and install the Ubuntu Upstart conf file to use the script as a service
Fire off the service and test that it’s still up.
That’s all folks!