# Underhanded launcher [closed]

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.

• 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.

## closed as off-topic by cat, Blue, a spaghetto, DennisApr 18 '16 at 17:52

• This question does not appear to be about programming puzzles or code golf within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

• Usually, underhanded contests specify the "legitimate" task the program should perform. It helps focus the efforts. – ugoren Nov 20 '12 at 19:23
• 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 – cat Apr 18 '16 at 15:24

## Tcl

Simple.

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


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.

• +1. Ps. The same trick works also in Perl, and in any other language that has a suitable "magic open" feature. – Ilmari Karonen Aug 2 '13 at 12:25
• “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 – manatwork Aug 2 '13 at 13:15
• Intresting. I used this "feature" a lot with webmin's custom commands. Need a list of all domains in a dropdown? Use this feature. – Johannes Kuhn Aug 2 '13 at 15:12

# JavaScript

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.

• 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(); – Mason Wheeler Mar 19 '15 at 20:57