Notices
Non Scooby Related Anything Non-Scooby related

executing an exe from an asp page

Thread Tools
 
Search this Thread
 
Old 19 February 2001, 12:03 AM
  #1  
Fosters
Scooby Regular
Thread Starter
 
Fosters's Avatar
 
Join Date: Jul 2000
Location: Islington
Posts: 2,145
Likes: 0
Received 0 Likes on 0 Posts
Post

I actually found a freeware product called DynuExec, which does the job wonderfully.

Thanks for the replies. I did know about the #exec and was a little worried about the security holes, but not being a guru wondered what other solutions people would come up with!

cheers
Fosters
Old 19 February 2001, 09:16 AM
  #2  
Fosters
Scooby Regular
Thread Starter
 
Fosters's Avatar
 
Join Date: Jul 2000
Location: Islington
Posts: 2,145
Likes: 0
Received 0 Likes on 0 Posts
Post

Strange that you get more technical response from here than other technical BBSs!!

Anyone got a fool proof method of executing an exe from an asp page (VBscript), including whatever server changes might be necessary? I also need to pass a command string too, eg test.exe 111111.

help very much appreciated!

Fosters

Old 19 February 2001, 11:51 AM
  #3  
chiark
Scooby Regular
 
chiark's Avatar
 
Join Date: Jun 2000
Posts: 13,735
Likes: 0
Received 0 Likes on 0 Posts
Post

You would use the #exec directive to do this, but IIS has the facility disabled as standard (http://www.microsoft.com/technet/security/iischk.asp) so it most likely will not be available on your site...

If you have control over the server, and are happy to add this massive security hole, add the following key to your server's registry

Location CurrentControlSetServicesW3SVCParameters
Key nameSSIEnableCmdDirective
Value 1
Type REG_DWORD


I think that you can do it from PERL using the system() command if you need the return code, or the backticks method ($a = `command.exe` will give you the output to a variable. This may not be possible due to security constraints, too.

Most ISPs support both ASP and PERL.

If you can code it as an ActiveX object and are able to register objects on the server, that may be a more secure way to do this, as if your HTML page was compromised you wouldn't be allowing people to execute their own malicious code...

[This message has been edited by chiark (edited 19 February 2001).]
Old 19 February 2001, 11:57 AM
  #4  
chiark
Scooby Regular
 
chiark's Avatar
 
Join Date: Jun 2000
Posts: 13,735
Likes: 0
Received 0 Likes on 0 Posts
Post

Just to be perfectly clear: you can configure your server to allow this, but it's a Bad Idea.

Better idea would be to compile your code as an activeX object, register it on the server then use server.createobject() and a method call on it to invoke the necessary code.

If you already have the executable and cannot change it, code an ActiveX wrapper for it.

Drop me a mail if you want more help.
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
Darrell@Scoobyworx
Trader Announcements
26
30 January 2024 01:27 PM
Rbon91
ScoobyNet General
49
21 November 2018 03:23 PM
south_scoob
ScoobyNet General
22
03 October 2015 01:05 PM
powerwrx
Non Scooby Related
12
14 September 2015 08:35 PM



Quick Reply: executing an exe from an asp page



All times are GMT +1. The time now is 11:12 PM.