0

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?

Jason94
  • 13,320
  • 37
  • 106
  • 184
  • Go to PirateBay. Look for any torrent. Right click the link, then 'copy link address'. Edit: Do you want the magnet link to be handled on the server or the client? – leppie Jul 04 '12 at 13:12

1 Answers1

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

Community
  • 1
  • 1
Steve B
  • 36,818
  • 21
  • 101
  • 174