The ever-fabulous Need to Know brings us the story of an amazing hack in the current issue. It's called Subterfugue, and it:

lets you insert [...] code between the OS and an application, mangling and filtering any data along the way.

It works by letting you write "tricks", which are essentially wrappers that let you get in the communication channel between the application and kernel, via the system calls the app makes, and the signals raised by the kernel.

It lets you do things like:

And of course, tricks can be written in a high-level language (i.e. not C).

Got you salivating yet? When I hear "code", "filtering" and "data" in the same sentence, I naturally think of Perl. Unfortunately, the only high-level language supported is Python. In fact, it's just a very clever Python hack.

So, if you have a spare week-end or two, why don't you write Subterfugue in Perl? That would be cool.


and it's subterfugue, not, as I orginally wrote, subterfuge. Thanks, vsarkiss.


print@_{sort keys %_},$/if%_=split//,'= & *a?b:e\f/h^h!j+n,o@o;r$s-t%t#u'

Replies are listed 'Best First'.
Re: Subterfugue for Linux
by vladb (Vicar) on Apr 09, 2002 at 13:46 UTC
    Actually, Subterfugue is in dire need of a new caretaker who'd maintain and enhance it. I have just been to the subterfugue.org and the author is saying that he's too buys to continue with its development. So, it might be a good idea to actually taking over and maintain a perl version of it (and let the Python version die?)

    However, despite of how much I love coding Perl, it might not be the perfect language for writing "tricks" which demand greater pefromance (speed). Although, I assume this requirement may vary depending on type of particular application.

    Cheers,

    "There is no system but GNU, and Linux is one of its kernels." -- Confession of Faith