Programming Forums
User Name Password Register
 

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

Reply
 
Thread Tools Display Modes
Old Dec 27th, 2006, 9:27 PM   #1
theguy0000
Programmer
 
Join Date: Jul 2005
Posts: 73
Rep Power: 4 theguy0000 is on a distinguished road
execute an exe on the server

hello, I will be running on a windows server, and I was wondering if there was a command i could use to execute an exe file on the server.
theguy0000 is offline   Reply With Quote
Old Dec 27th, 2006, 11:40 PM   #2
headzoo
Newbie
 
Join Date: Oct 2006
Posts: 16
Rep Power: 0 headzoo is on a distinguished road
Hi,
Check out these functions: http://us2.php.net/manual/en/ref.exec.php
Be careful though, since running untrusted code at the command line opens up a whole can of security risks.
headzoo is offline   Reply With Quote
Old Dec 27th, 2006, 11:52 PM   #3
theguy0000
Programmer
 
Join Date: Jul 2005
Posts: 73
Rep Power: 4 theguy0000 is on a distinguished road
Quote:
Originally Posted by headzoo View Post
Hi,
Check out these functions: http://us2.php.net/manual/en/ref.exec.php
Be careful though, since running untrusted code at the command line opens up a whole can of security risks.
thank you, and yes I am aware of the security risk, but I am only running one file and it is hard-coded so the user cannot run whatever they want...so I'm not too worried

thanks!
theguy0000 is offline   Reply With Quote
Old Dec 27th, 2006, 11:54 PM   #4
theguy0000
Programmer
 
Join Date: Jul 2005
Posts: 73
Rep Power: 4 theguy0000 is on a distinguished road
so, on the exec fund, where exactly does the output come from? the console of the ran program?
theguy0000 is offline   Reply With Quote
Old Dec 29th, 2006, 6:04 PM   #5
theguy0000
Programmer
 
Join Date: Jul 2005
Posts: 73
Rep Power: 4 theguy0000 is on a distinguished road
sorry, I meant exe fun, not fund...

and why does no one want to answer me?
theguy0000 is offline   Reply With Quote
Old Dec 29th, 2006, 10:58 PM   #6
niteice
Programmer
 
niteice's Avatar
 
Join Date: Aug 2005
Posts: 98
Rep Power: 4 niteice is on a distinguished road
Send a message via AIM to niteice
exec() returns whatever the program prints on stdout. So if your program is:
#include <stdio.h>

int main(int argc, char **argv)
{
    fputs("Hello, world!\n", stdout);
}
The return value of exec() is "Hello, world!\n".
niteice is offline   Reply With Quote
Old Dec 30th, 2006, 11:04 AM   #7
theguy0000
Programmer
 
Join Date: Jul 2005
Posts: 73
Rep Power: 4 theguy0000 is on a distinguished road
thanks

and above, I meant exec func, not fund or fun, i meant FUNC...lol
theguy0000 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
Socket Server hbe02 C++ 19 May 23rd, 2006 11:14 PM
FTP Server in Python Sane Python 1 Mar 31st, 2006 11:25 PM
send() problem w/ http server kch_86 C 2 Nov 25th, 2005 1:53 AM
Instant Messaging App Help AusTex C 0 Apr 27th, 2005 5:52 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 12:15 PM.

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