O'Reilly logo

Skype Hacks by Andrew Sheppard

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Hack #73. Run Commands Remotely Using Chat

Have you ever wanted to run a shell command on a remote machine? This hack shows a simple way you can do this using Skype chat as the communications mechanism.

Works with: Windows version of Skype.

Have you ever wanted to run a command on a remote machine? If so, this hack is for you.

By leaving Skype and this script, run_command.vbs, running on a remote machine, you can use Skype chat to send commands—in fact, any command you could run from the command line were you sitting at that computer—to be executed on the remote machine. Moreover, as commands will be executed only for a named Skype user, and because Skype chat is encrypted end to end, you can run the commands in a relatively secure fashion.

Record and play back your voicemail greeting

Figure 8-3. Record and play back your voicemail greeting

 ' File: run_command.vbs ' To use this script yourself, you will need to change: ' 1) The name of the Skype user, held in strSkypeHostName, ' on the host machine that will run commands. ' 2) The name of the remote Skype user, held in ' strSkypeRemoteName, who is allowed to run commands ' on the host machine. Dim objShell, objSkype, objExec, strChatID Dim strSkypeHostName, strSkypeRemoteName Set objShell = WScript.CreateObject ("WSCript.shell") Set objSkype = WScript.CreateObject("SkypeAPI.Access", _ "SkypeAPI_") ' Only process commands on this host for this remote user strSkypeHostName = "ajtsheppard" ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required