Posts Tagged grunt

Using procmail to remote-control your comp

My computer at IITM is jailed onto the local network due to NAT, Proxy server etc.

Thus, my computer back there has access to internet, but the internet doesn’t have access to it. So, how do I run commands on it remotely? Here’s a simplified crappy version that works to do this.

My system is on almost all the time and connected to the IITM intranet. It keeps downloading my mail from a mail server (that is accessible both from the intranet and the internet) using a cronjob running getmail and passes all received mail to procmail. If your setup uses procmail to filter mail and it is invoked through a cronjob (or by a daemon or something), you could get procmail to execute command lists from your e-mail. In .procmailrc, you’d add something like this:

    # —– STARTS HERE —–
:0 fbHB
^<some test cases to identify if the email is a command list>
| bash # I do something better than this, but the code is dirty.Will post after improvisation.
/dev/null
# —– ENDS HERE —–

Of course, there’s a lot more scope for improvisation, like verifying PGP signature to ensure that the message is really from somebody who’s authorized to control the computer.

1 comment December 11, 2007


Pages

a

Archives

Tags

aKademy asteroid magnitudes astronomy Astrophotography AWK BASH Bugfix camera camstream Carnatic Flute Carnatic Music Carnatic Vocal Commit D-Bus DBus Debian diffraction FOSS.IN GNOKII GNU grunt GSoC Hackathon IIT IITM IIT Madras KDE KDE.IN kstars Linux mail merge Mass SMS mcabber Parallel Port Philips ToUcam Photography PlanetKDE procmail Saarang segfault streamer SVN The GIMP Violin Webcam

Recent Comments

Jaiswar Hemant H. on A summer at TIFR
Aditya shanker raghu… on A summer at TIFR
Aditya shanker raghu… on About Me
Aditya shanker raghu… on A summer at TIFR
Wolf16 on About Me