I asked "How to run a executable file from a web page?"
Many people told me that's impossible, but my colleague find a piece of JavaScript code that could execute any process. I can not believe ActiveX is so dangerous.
How could this happen? Why this is not forbidden by IE?
<SCRIPT language=JavaScript>
function Run(strPath) {
try {
var objShell = new ActiveXObject("wscript.shell");
objShell.Run(strPath);
objShell = null;
}
catch (e){alert('Can not find "'+strPath)
}
}
</SCRIPT>
<BUTTON class=button onclick="Run('notepad')">notepad</BUTTON><br>
<BUTTON class=button onclick="Run('mspaint')">mspaint</BUTTON><br>
<BUTTON class=button onclick="Run('calc')">calc</BUTTON><br>
<BUTTON class=button onclick="Run('format c:')">format c:</BUTTON><br>