开发者

Using javascript to open a shell

开发者 https://www.devze.com 2023-01-16 13:09 出处:网络
Is the开发者_如何学JAVAre a reliable crossbrowser way to open up a shell using javascript (e.g. explorer.exe)?This is not possible as it would be a (gaping) security risk.No, that is not possible for

Is the开发者_如何学JAVAre a reliable crossbrowser way to open up a shell using javascript (e.g. explorer.exe)?


This is not possible as it would be a (gaping) security risk.


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

That way, you can create links like my_custom_protocol://helloworld.txt that cause an explorer window to be opened in 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. Make sure you are aware of the security implications; depending on your situation, it might work for you, though.

0

精彩评论

暂无评论...
验证码 换一张
取 消