Your goal is to write a super-secret program which launches another (independent) program. You don't have to provide the payload in your answer, it can be any program name your program will launch.

However, the challenge is to keep this behavior a secret. Upon casual inspection of the code, it should be impossible or very hard to notice that your program actually executes a foreign program. Bonus if this "hidden feature", once discovered, can reasonably be explained away as an unintentional bug. This is why the code has to be as clear as possible, and everything should have an alibi for being there, otherwise someone inspecting your code might become suspicious.

Remember, this is not a code-golf, but an underhanded contest.

  • Your code has to be clear and readable.
  • The causes of the change have to be hidden. Even if discovered, they should look more like bugs than malice.

You should provide an explanation, best in spoiler.

like this

The winner will be selected as the highest voted answer not sooner than 10 days after the first valid answer. Yes, I know it's subjective, but this is the only criteria adequate for underhanded contests.

Voters should value the standard "underhanded" qualities, like how clear the code is and how well hidden the reason is.

I made this competition for compiled languages, but you can also use interpreted languages if you find two different notable interpreters for it.

  • \$\begingroup\$ Usually, underhanded contests specify the "legitimate" task the program should perform. It helps focus the efforts. \$\endgroup\$
    – ugoren
    Commented Nov 20, 2012 at 19:23
  • 3
    \$\begingroup\$ I'm voting to close this question as off-topic because underhanded challenges are no longer on-topic on this site. meta.codegolf.stackexchange.com/a/8326/20469 \$\endgroup\$
    – cat
    Commented Apr 18, 2016 at 15:24

2 Answers 2




proc main {} {
    set fd [open filenames.txt]
    while {[gets $fd line] ne ""} {
        set other [open $line w]
        puts $other [clock format [clock seconds]]

Ilmari Karonen is right:
If you supply a filename with a | as first character, it will treat the rest as command. IIRC for Perl it has to be at the end.

  • 2
    \$\begingroup\$ +1. Ps. The same trick works also in Perl, and in any other language that has a suitable "magic open" feature. \$\endgroup\$ Commented Aug 2, 2013 at 12:25
  • 2
    \$\begingroup\$ “IIRC for Perl it has to be at the end.” – Actually it has to be placed according to the intended direction of data transfer. pastebin.com/ZnTr7ezg \$\endgroup\$
    – manatwork
    Commented Aug 2, 2013 at 13:15
  • \$\begingroup\$ Intresting. I used this "feature" a lot with webmin's custom commands. Need a list of all domains in a dropdown? Use this feature. \$\endgroup\$ Commented Aug 2, 2013 at 15:12


if(document.location.href = 'http://www.example.com') foo();

"document.loaction.href = 'http;//www.example.com'" sets the page location to "http;//www.example.com" instead of testing for the page location to be "http;//www.example.com".

It's an interpretted language, so here are two interpretters: SpiderMonkey and Google Chrome.

  • 2
    \$\begingroup\$ That's actually pretty obvious. It's known as "the world's last bug," due to an old joke that the WWIII would start due to some C code in the form If (AlertValue = RED) LaunchNukes(); \$\endgroup\$ Commented Mar 19, 2015 at 20:57

Not the answer you're looking for? Browse other questions tagged or ask your own question.