Twitter Whisperer + Panic

In my last post I showed you how to control a computer remotely by tweeting your commands in your Twitter account. In that same post I also mentioned the possibility of adding the feature of the Panic Button by redpois0n.

In this post I am including the updated Twitter Whisperer that adds that functionality (I am only using the portion of the code that we need to make it work via Twitter).

If you check the Panic Button’s code, you will be able to see that what it does is that it detaches any TrueCrypt drives before shutting the computer down. Again, this could come in very handy for any activist or someone very concerned with his/her privacy that does not have access to SSH or to a Python shell in his computer network.

So by just tweeting the word “panic” without the quotes and in small caps, the script will detach the TrueCrypt drive(s) and shut the computer down. You can definitely change the word that triggers the Panic Button, and you can even add a specific key if you want to make sure that you are the only one being able to trigger it.

It should work on any platform (Windows, OS X, Linux or BSD).

Here you have the code for the Twitter Whisperer + Panic:

from bs4 import BeautifulSoup as soupy
import urllib.request
import re
import subprocess
import sys
import os

html = urllib.request.urlopen("<Your account here>").read()
soup = soupy(html, "lxml")

x = soup.find("meta", {"name": "description"})['content']
command = re.findall('"([^"]*)"', x)

def panic():

print("Shutting down")

if "win" in sys.platform:
os.popen("shutdown /p /f")
elif "darwin" in sys.platform:
os.popen("shutdown -s now")
elif "linux" in sys.platform or "bsd" in sys.platform:

if "win" in sys.platform:
os.popen("truecrypt /d")
os.popen("truecrypt -d")

if command[0] == "panic":

If you want to try it without detaching the TrueCrypt drives, you can comment out the truecrypt lines.

So again, you just have to tweet:


Run the script (or your scheduled task picks it up) and your console prints Shutting down


Detaches the drives and shuts down.

No run and drill them the F*** out!


You can get the code here.


Create a free website or blog at

Up ↑