[英]Using javascript to open a shell
是否有可靠的跨浏览器方式使用javascript(例如explorer.exe)打开外壳?
这是不可能的,因为这将是(漏洞)安全风险。
No, that is not possible for security reasons. 不,出于安全原因,这是不可能的。 Accessing client machine is the problme here !
访问客户端计算机是这里的问题!
If you have access to the client machine, and the client machines are all Windows XP or later, there actually is a way by defining a custom protocol as described in this SO question (Mozillazone article here ). 如果您可以访问客户端计算机,并且客户端计算机都是Windows XP或更高版本,则实际上有一种方法可以定义一个自定义协议,如本SO问题 ( 此处为 Mozillazone文章)所述。
That way, you can create links like my_custom_protocol://helloworld.txt
that cause an explorer window to be opened in Windows. 这样,您可以创建诸如
my_custom_protocol://helloworld.txt
类的链接,这些链接会导致在Windows中打开资源管理器窗口。
This potentially opens a (however remote) security hole, as connecting a custom protocol to explorer.exe
could be used to send arbitrary parameters to that executable. 由于将自定义协议连接到
explorer.exe
可以用来向该可执行文件发送任意参数,因此这可能会打开一个(但是是远程的)安全漏洞。 Make sure you are aware of the security implications; 确保您了解安全隐患; depending on your situation, it might work for you, though.
不过,根据您的情况,它可能适合您。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.