I’m making a small webpage that is going to execute links, en specifics magnet links. But the webserveruserrole does not carry enough mojo (rights, Process.Start()) to make that happen.
I’ve tried to look for this user role but could not find it.
How do I make the webserver execute/start magnet:?xt links?
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
If starting a process from a webpage was possible, this would be a highway for viruses.
Of course, I assume you understand the http model. The webpage is actually executed on the server, all the code runs on the server. The client browser only display the html received from the one time http request/response.
You can however, as you guessed, create custom url Scheme (yourapp://yourquery). The client side has to register an application to handle such urls (that’s how the magnet links works).
More information on the msdn page: Registering an Application to a URL Protocol.
However, I emphasis what Microsoft says :
Security Alert Applications that handle URL
protocols must consider how to respond to malicious data. Because
handler applications can receive data from untrusted sources, the URL
and other parameter values passed to the application may contain
malicious data that attempts to exploit the handling application.
This can lead to serious problem if the application does not know how to handle malicious data.
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0
Security Alert Applications that handle URL