0

I want to windows command prompt and run the ping program but the ActiveXObject is not available on google chrome. This what I want to achieve:

cmd.exe ping 127.0.0.1

Just open the prompt with that command that's what the client is asking for.

Etta
  • 339
  • 4
  • 10
  • 3
    You cannot do that. – Pointy Jul 17 '20 at 23:35
  • 2
    Can you just imagine the types of malicious code you could write if this were possible? – Scott Marcus Jul 17 '20 at 23:51
  • @ScottMarcus I imagined. But the app is for the public but a small group of admins. It's the client that wants it that way. I think they are asking for it because back then they used to have functionalities like this with internet explorer. – Etta Jul 17 '20 at 23:58
  • Internet Explorer utilized ActiveX controls, which were compiled programs that ran inside the browser. They were a security nightmare, which is why they aren’t around anymore. – Scott Marcus Jul 18 '20 at 00:10
  • ActiveX controls are depreciated now. If it was possible, it would allow user to do remote code execution in the server. – Wasif Jul 18 '20 at 05:53
  • "But the app is for the public but a small group of admins" - doesn't matter. Just because some people wouldn't abuse such a feature does not mean said feature is a good idea. "It's the client that wants it that way" - you will have to explain to the client that this is not possible for security reasons, and this cannot be changed (thank goodness). – Bill_Stewart Jul 20 '20 at 23:27

1 Answers1

1

That would violate all kinds of security, so that's unlikely to happen unfortunately. You'd have to get the user's permission to execute anything, so you'd need different technology.

feelie75
  • 21
  • 4
  • Browsers can send commands to desktop applications using [custom URL protocols](https://stackoverflow.com/a/52336242/975097), so it is probably possible to run shell commands in this way. – Anderson Green Jan 06 '22 at 01:56