Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Aug 1st, 2009, 12:16 AM   #1
*Pyro
Computer Engineer
 
*Pyro's Avatar
 
Join Date: Feb 2009
Posts: 37
Rep Power: 0 *Pyro is on a distinguished road
Running Windows Commands from a Web Page

Is there any way that I could run a windows command within a web page? I was just wondering for a project I was working on.
*Pyro is offline   Reply With Quote
Old Aug 1st, 2009, 10:16 AM   #2
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 7,869
Rep Power: 14 DaWei will become famous soon enoughDaWei will become famous soon enough
Re: Running Windows Commands from a Web Page

One of the purposes of browser design is to prevent malicious people from doing this. Some succeed then poke holes in their own boat. I prefer that people who want to do things like this really break a sweat and spend a lot of time researching and learning, rather than get black arts handed to them on a platter.

Just personal opinion, of course. Possibly you would agree if you came to my website and I executed "del *.*" or similar on your machine.
__________________
The person who coined the phrase, "There's no such thing as a stupid question," hasn't hung around here much.

Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
Politically Incorrect
DaWei is offline   Reply With Quote
Old Aug 1st, 2009, 5:29 PM   #3
CoderGuru
Professional Programmer
 
Join Date: Jan 2009
Location: Dallas, Texas, USA
Posts: 329
Rep Power: 2 CoderGuru is on a distinguished road
Re: Running Windows Commands from a Web Page

What language are you using? A lot of servers by default will not allow you to execute most functions, but PHP has about 4 methods to do such including "EXEC". Asp.net has several too such as "Shell". Again keep in mind most won't allow you to execute as IIS and Apache usually run under their own user account and that user wont have execute permissions on most command files. You can however manually give them permission, as I had to do a lot of times such as when I want to access ffmpeg or ImageMagic. As explained above though, this is not always ideal
CoderGuru is offline   Reply With Quote
Old Aug 1st, 2009, 9:40 PM   #4
Benoit
The Silent Cryptographer
 
Benoit's Avatar
 
Join Date: Sep 2004
Posts: 725
Rep Power: 6 Benoit is on a distinguished road
Re: Running Windows Commands from a Web Page

Are you trying to execute commands server-side or client-side?
__________________
Vs lbh nfxrq Oehpr Fpuarvre gb qrpelcg guvf, ur'q pehfu lbhe fxhyy jvgu uvf ynhtu.
Benoit is offline   Reply With Quote
Old Aug 1st, 2009, 10:01 PM   #5
*Pyro
Computer Engineer
 
*Pyro's Avatar
 
Join Date: Feb 2009
Posts: 37
Rep Power: 0 *Pyro is on a distinguished road
Re: Running Windows Commands from a Web Page

Well I wanted to create a website that people would be able to come to and basically have an IDE online. Everything would be held remotely, all of your files could then be mobile, and you could even compile online, a cloud compiler / programmer so to speak. I wanted to figure out how to use the commands through a web page because I have no other way of calling a compiler otherwise, and not sure of any way to do this. Any held is much appreciated.
*Pyro is offline   Reply With Quote
Old Aug 2nd, 2009, 6:24 AM   #6
NinjaDev
Proffessional Programmer
 
NinjaDev's Avatar
 
Join Date: Jul 2009
Location: London, England
Posts: 27
Rep Power: 0 NinjaDev is on a distinguished road
Re: Running Windows Commands from a Web Page

Quote:
Originally Posted by *Pyro View Post
Well I wanted to create a website that people would be able to come to and basically have an IDE online. Everything would be held remotely, all of your files could then be mobile, and you could even compile online, a cloud compiler / programmer so to speak. I wanted to figure out how to use the commands through a web page because I have no other way of calling a compiler otherwise, and not sure of any way to do this. Any held is much appreciated.
For clientside abuse, you could use activex, Microsoft seem to get away with plenty using that method.

I would have to check but I believe the WPF BAP applications also have full access to the client machine.

The only issue with both of these is they are windows based, so users in linux/Mac etc may not be able to use your site.
NinjaDev is offline   Reply With Quote
Old Aug 1st, 2009, 10:22 PM   #7
CoderGuru
Professional Programmer
 
Join Date: Jan 2009
Location: Dallas, Texas, USA
Posts: 329
Rep Power: 2 CoderGuru is on a distinguished road
Re: Running Windows Commands from a Web Page

Pyro again what language are you speaking? There are a lot of security issues at hand there, but as long as u restrict them to simply compile then download the EXE (not execute it) shouldn't be that big of an issue.

Again PHP and ASP.net both have execute methods. You just got to make sure to give IIS/Apache execute permissions on the folder it needs
CoderGuru is offline   Reply With Quote
Old Aug 1st, 2009, 10:46 PM   #8
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 7,869
Rep Power: 14 DaWei will become famous soon enoughDaWei will become famous soon enough
Re: Running Windows Commands from a Web Page

I smell a misunderstanding of the client/server paradigm. Poddibly I hab a code in my node.
__________________
The person who coined the phrase, "There's no such thing as a stupid question," hasn't hung around here much.

Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
Politically Incorrect
DaWei is offline   Reply With Quote
Old Aug 1st, 2009, 11:15 PM   #9
*Pyro
Computer Engineer
 
*Pyro's Avatar
 
Join Date: Feb 2009
Posts: 37
Rep Power: 0 *Pyro is on a distinguished road
Re: Running Windows Commands from a Web Page

I wanted to start with being able to compile c++ remotely. The files would just be stored online, not executed, you could then download the exe, and run client side. Other files, like the .cpp and any libraries would be part of the online IDE. I havn't had much of any web development experience besides high school, c++ is my forte. This project was on my mind because I travel a lot, and there isn't the time to get an IDE all set up and find all of my files, and load up a project. I would rather be able to go on a website that I can alter my projects, compile them remotly and run them client side.
*Pyro is offline   Reply With Quote
Old Aug 1st, 2009, 11:32 PM   #10
CoderGuru
Professional Programmer
 
Join Date: Jan 2009
Location: Dallas, Texas, USA
Posts: 329
Rep Power: 2 CoderGuru is on a distinguished road
Re: Running Windows Commands from a Web Page

Well you might want to invest the few minutes to find a Remote Desktop solution that fits your needs. That is what I do. But again you need to pick a language such as PHP or ASP.net to host the program
CoderGuru is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I read in web page with "frames" in them Striver Visual Basic 0 Feb 12th, 2009 9:19 AM
Just a quick question about libraries and downloading a web page. Moonshield C 15 Feb 4th, 2009 10:28 AM
How to use UML diagram in web layout in a web page and is there a possible way or method to do that? qila azali Other Web Development Languages 1 Jul 21st, 2008 10:16 PM
Background to a web page DESERVE HTML / XHTML / CSS 2 Nov 8th, 2007 11:51 AM
Unix commands compatible with Windows? titaniumdecoy Bash / Shell Scripting 7 Oct 5th, 2006 7:25 AM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 11:07 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC