Here is the code
- Code: Select all
<?
echo "lalla";
echo exec("testfile.exe");
echo "lalla";
?>
<?
print exec("uptime");
echo "\n<br/>";
passthru("who");
echo "<br/>";
//passthru("fortune");
?>
<?
$output = shell_exec('testfile.exe');
echo "<pre>$output</pre>x";
?>
<?
print shell_exec("uptime")or die('error');
print shell_exec("testfile.exe")or die('error');
?>
This returns...
lallalalla 00:09:29 up 2 days, 15:08, 1 user, load average: 0.00, 0.00, 0.00
XXXXXX Jun 29 09:36 (modemcableXXXXXXX)
x 00:09:29 up 2 days, 15:08, 1 user, load average: 0.00, 0.00, 0.00
here is the code in testfile.exe (C++)
- Code: Select all
#include <iostream>
#include <fstream>
using namespace std;
char main(int argc, char *argv[]){
char sam[]="done";
fstream finals;
finals.open("rin3d.txt",ios::out | ios::app );
if(argc==1){
finals<<"isgood";
}else{
finals<<argv[1];
}
finals.close();
return sam[0];
}


