daedalus Posted April 30, 2008 Share Posted April 30, 2008 I recently read an article on lifehacker that explained how to shut down windows with a text message. (http://lifehacker.com/software/remote-comp...sage-172873.php) Although I think this is a really cool idea, I don't own microsoft outlook and I wanted to figure out a more portable way to go about setting up this project on my computer. With an add-on and a few tweaks, it is possible configure this, with a portable copy of Mozilla Thunderbird. This should take < 10 minutes to set up and configure. Step 1 - Get thunderbird portable Download a copy of portable thunderbird: http://portableapps.com/apps/internet/thunderbird_portable and extract it by running the exe. Step 2 - Setup thunderbird & install add-on First of all, set up an email account. I created a gmail account just for this project. Go through thunderbird's setup process and make sure your email account is configured properly. You'll probably need to login to your account and enable POP/IMAP settings. Now that you have a portable, working copy of mozilla thunderbird, download this add-on: https://addons.mozilla.org/en-US/thunderbird/addon/2610 This is what makes it all work. To install this into the thunderbird portable folder, open ThunderbirdPortable, and go to Tools -> Add-ons and click install. Direct thunderbird to the .xpi file you downloaded and it will install the add-on. Restart thunderbird to proceed. Step 3 - Configure inbox Before you can configure the options for the add-on, you'll need to create a folder that will hold the text messages. Right click on "Inbox" and click new folder. Name this something memorable. I named mine "SMS" Next, click Tools -> Message Filters. Here you will pick the requirements your text message must meet in order to shut down your computer. Click "New" and create a filter. Configure your filter to meet some requirements in the top box, and configure the second box to move the message into the folder you created earlier. Step 4 - Configure add-on Before the add-on can run, it needs a command to run. Create a batch file in the portable thunderbird program directory that contains something like this: shutdown.exe -s In my example, I'm naming it shutdown.bat Next, open up your portable thunderbird and click on the folder you created earlier ("SMS" in my case). Then, go to Tools -> Mailbox Alert Preferences IMPORTANT : Make sure that you have selected your folder BEFORE editing the mailbox alert preferences. Otherwise, you will end up shutting down your computer every time you receive an email. Check the Execute a command: checkbox as I have above, and point it to the shutdown batch file. Hit OK. To decrease the delay between the sending of the text message to the shutting down of the computer, go to Tools -> Account Settings... click "Server Settings" on the left side under the account you will be receiving text messages on. Under the server settings part of the box, change Check for new messages every _30_ minutes to every _1_ minute. Well done. Running this portable program will enable you to shutdown your computer from anywhere, as long as your computer is connected to the internet and you have a phone. Try it out - send a message to your email address that meets the criteria you set up in the filter. If everything works out, next time thunderbird checks for messages, it should get your SMS and shutdown. This concludes the practical part of the guide, but, as I'm sure you've processed, this could potentially be used from ANY computer connected to the internet to run ANY program. This has quite a lot of potential, so I decided to see what I could whip up in a couple of minutes. idea - run the program invisibly, in the background This is fairly easy to set up. Download nircmd (http://www.nirsoft.net/utils/nircmd.html) and place it in your thunderbird folder. Nircmd is a really cool tool that can be configured to do quite a lot of things. Read the .chm in the zip to see all of the options. After you have placed the executable in the folder (nircmdc.exe), create another batch file. put this in the file: @echo off start ThunderbirdPortable.exe nircmdc cmdwait 5000 win hide ititle "Thunderbird" This is a fairly simple batch file, which will open thunderbird in a new process, wait 5 seconds (for thunderbird to initialize and start up) and then hide the window. The program is still viewable in the your processes, but it isn't viewable in the taskbar. Now all you need to do is double click the batch file you have just created, wait a few seconds, and you will have a portable thunderbird running in the background, ready to shutdown your computer when it receives the right message. I'm sure you can think of many more ideas to add to this, so contribute whatever you're thinking. My apologies if I left out anything important in this guide. Please let me know if I did. If you get it working, let me know how it goes. daedalus Quote Link to comment Share on other sites More sharing options...
SomeoneE1se Posted April 30, 2008 Share Posted April 30, 2008 I don't have much use for this but it's damn cool. VERY nice work! Quote Link to comment Share on other sites More sharing options...
daedalus Posted April 30, 2008 Author Share Posted April 30, 2008 Thanks. I haven't tried this thunderbird setup on linux yet, but i'd imagine that it would work for any OS that can run thunderbird. Also, here are the two articles I originally read on lifehacker: How to shutdown your mac via SMS - http://tinyurl.com/54d6pb How to shutdown windows (with outlook) via SMS - http://tinyurl.com/mpe5o I also played around a bit more with it, and now it's set up to show the blue screen of death and shutdown when "BSOD" is sent to it. Using this, I BSOD'd a few computers in my house at the same time. Not very practical, but fun nonetheless. daedalus Quote Link to comment Share on other sites More sharing options...
nicatronTg Posted May 1, 2008 Share Posted May 1, 2008 Ooo, thanks! I only have one complaint: Thunderbird takes up too much ram for an old server machine. Other than that, it seems to be a good idea for server admins. Quote Link to comment Share on other sites More sharing options...
911alertme Posted May 1, 2008 Share Posted May 1, 2008 I like it. I set up something like this with Outlook before. We definitely need more threads like this one. Good work. Quote Link to comment Share on other sites More sharing options...
Phredsir Posted May 1, 2008 Share Posted May 1, 2008 This would be funny to do at school. Quote Link to comment Share on other sites More sharing options...
daedalus Posted May 1, 2008 Author Share Posted May 1, 2008 I've been trying to think of ways to make this more portable, so I came up with this. Scenario: You have a computer you want to shut down via SMS and a USB drive, with portable thunderbird on it. Normally, you would need to find a place to copy it to on the computer, edit all of the paths, and then start it up. Here's an easier way. First of all, copy the folder over to your USB drive. Make the rest of the changes in there. Next, you want to open your portable copy of thunderbird. Click on the folder you created ("SMS" in my case), and go to Tools -> Mailbox Alert Preferences. Edit the box following "Execute a command:", and change it to: "C:program filesThunderbirdshutdown.bat" . Next, in your folder, create a batch file in the thunderbird folder (I called mine copy.bat). Put this in there: @echo off c: mkdir "c:program filesThunderbird" xcopy /Q /E /Y /H * "c:program filesThunderbird" cd "c:program filesThunderbird" del copy.bat run.bat This does a few things. First, it turns off echoing and navigates to the c: drive. Next, it makes a directory called "Thunderbird" in the program files, and copies all the files in the current folder to it. If it's in the same folder as the thunderbird portable stuff, this should work correctly. The xcopy options tell it not to be verbose (/Q), copy subdirectories (/E), overwrite without prompt (/Y), and copy hidden and system files (/H). Only the /Q switch is really nessesary, so i'm pretty sure it would be okay to take out any others you are unsure about. These switches (/Q, /E, /Y, and /H) conform to vista's syntax, so you may need to change it if you are running XP. The rest of the batch file navigates to the directory, removes the copy batch file, and runs run.bat . Now, you should be able to double click this and have the program copied to the computer, then started locally. If thunderbird takes a long time to start up after copying, you might need to edit the "nircmdc cmdwait 5000 win hide ititle "Thunderbird" " command in the run.bat script to a number larger than 5000 (5000 = 5 seconds). Also, if you wanted to quickly remove the program, put this in a batch script (named mine "remove.bat") @echo off c: cd "c:program files" del /S /Q Thunderbird rmdir Thunderbird The /S /Q switches delete all subdirectories and make the program quiet, respectively. Let me know how this goes for you. daedalus Quote Link to comment Share on other sites More sharing options...
Joerg Posted May 2, 2008 Share Posted May 2, 2008 Is it possible to do the same with the stricter rights management on a linux based system? According to my console, I need to be root in order to shutdown the system and providing the root passwort is not the best idea. Quote Link to comment Share on other sites More sharing options...
SomeoneE1se Posted May 2, 2008 Share Posted May 2, 2008 create a dir that ONLY you're user can see or write to, and create a root cron job to check to see if /home/user/secret/dir/shutdown.file exists if it does delete it and shutdown... Quote Link to comment Share on other sites More sharing options...
nicatronTg Posted May 3, 2008 Share Posted May 3, 2008 Is it possible to do the same with the stricter rights management on a linux based system? According to my console, I need to be root in order to shutdown the system and providing the root passwort is not the best idea. using root, change the permissions for your account to be able to run the halt command. Quote Link to comment Share on other sites More sharing options...
Sparda Posted May 3, 2008 Share Posted May 3, 2008 http://www.linuxquestions.org/questions/sl...as-user-350891/ Quote Link to comment Share on other sites More sharing options...
Joerg Posted May 3, 2008 Share Posted May 3, 2008 Thanks Quote Link to comment Share on other sites More sharing options...
911alertme Posted May 3, 2008 Share Posted May 3, 2008 Congrats. You made a post on Lifehacker. http://lifehacker.com/386811/shutdown-wind...derbird-edition Quote Link to comment Share on other sites More sharing options...
sablefoxx Posted May 4, 2008 Share Posted May 4, 2008 Congrats. You made a post on Lifehacker. http://lifehacker.com/386811/shutdown-wind...derbird-edition EPIC! Soon We'll Hit Digg, and then the servers will die. :-( PS: Who's gonna make this into a switchblade payload? Quote Link to comment Share on other sites More sharing options...
Joerg Posted May 4, 2008 Share Posted May 4, 2008 I don't think that integrating Thunderbird into the Switchblade would be a good idea as it costs space and ram. An alternative would be a "wget-like" command which checks if a file on a web server exists and then calls a program which shuts the machine down. Quote Link to comment Share on other sites More sharing options...
Blue Dragon Posted May 4, 2008 Share Posted May 4, 2008 Great article! I really like it. But how the hell do I send a text message from my phone to an emailadress? I only have an old siemens A60 wich does little more then sending text messages (SMS) and phoning some friends. When I send an SMS I can only put in the phone numer of someone as far as I know. How can I put in a gmail-adress? Do I need something like the iPhone to do this? Sry for my stupidity, just hope someone can help me! Edit: Well, after some googling I found out that there are different websites that offer a phone number you can send a message to. In this message you have to first type the emailadress and then the text you want to be sent. Quote Link to comment Share on other sites More sharing options...
911alertme Posted May 4, 2008 Share Posted May 4, 2008 You could try sending an email to your phone. Your email address would be 1-areacode-phonenumber@whateveryourserviceprovidersthingis you can probably find it somewhere on the internet. Once you have this email on your phone then you can probably hit reply and it will go to the email address. Quote Link to comment Share on other sites More sharing options...
Deveant Posted May 4, 2008 Share Posted May 4, 2008 Great article! I really like it. But how the hell do I send a text message from my phone to an emailadress? I only have an old siemens A60 wich does little more then sending text messages (SMS) and phoning some friends. When I send an SMS I can only put in the phone numer of someone as far as I know. How can I put in a gmail-adress? Do I need something like the iPhone to do this? Sry for my stupidity, just hope someone can help me! Edit: Well, after some googling I found out that there are different websites that offer a phone number you can send a message to. In this message you have to first type the emailadress and then the text you want to be sent. Older phone possibly wont work, im using a Nokia 6110 Navigator, and i can send MMS to my email address, or i can send direct emails. but not an a standard SMS. Quote Link to comment Share on other sites More sharing options...
daedalus Posted May 4, 2008 Author Share Posted May 4, 2008 I did this from a motorola razr on at&t. If you are unsure what your phone's email address is, this link: http://www.sms411.net/2006/07/how-to-send-...l-to-phone.html may help you figure it out. With that, you could try 911alertme's suggestion of trying to reply. daedalus Quote Link to comment Share on other sites More sharing options...
jmac Posted May 6, 2008 Share Posted May 6, 2008 Daedalus: Nice guide, that is really cool... Quote Link to comment Share on other sites More sharing options...
TheZ Posted May 10, 2008 Share Posted May 10, 2008 Awesome, we need more stuff like this in the forums! Quote Link to comment Share on other sites More sharing options...
DLSS Posted May 10, 2008 Share Posted May 10, 2008 there's easyer ways to do this (+ also have the ability to boot the pc by sending an sms , i had an old article bout this , but currently dont feel like digging around in my old junk searching for the computer mag it was in (yes i keep all (well most , i tend to lose stuff) of my old computer mags (hey they were expensive enough and there's some usefull info in there >.>) Quote Link to comment Share on other sites More sharing options...
SomeoneE1se Posted May 10, 2008 Share Posted May 10, 2008 sms to e-mail one another computer to use WOL? Quote Link to comment Share on other sites More sharing options...
trausti15 Posted March 3, 2009 Share Posted March 3, 2009 Great article! I really like it. But how the hell do I send a text message from my phone to an emailadress? I only have an old siemens A60 wich does little more then sending text messages (SMS) and phoning some friends. When I send an SMS I can only put in the phone numer of someone as far as I know. How can I put in a gmail-adress? Do I need something like the iPhone to do this? Sry for my stupidity, just hope someone can help me! Edit: Well, after some googling I found out that there are different websites that offer a phone number you can send a message to. In this message you have to first type the emailadress and then the text you want to be sent. can you send me website you found for this ?? cause im having the same "problem" Quote Link to comment Share on other sites More sharing options...
DingleBerries Posted March 4, 2009 Share Posted March 4, 2009 I was thinking of doing something like this to my server. I was going to filter messages by my cell# that way if spam got threw with SMS in the tittle, not likely, it wouldnt shut down. Didnt look at the time stamp lol... By Adam Pash, 9:30 AM on Sat May 3 2008 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.