Jump to content

Run an exe file--


suma237

Recommended Posts

I'm pretty sure that wouldn't work actually... because PHP is server-side, so if anything, it will try to run sound recorder on the remote server.

 

Try this:

<a href='file://c:/WINDOWS/system32/sndrec32.exe'>record sound</a>

it seems to work in IE (but you have to click 'run'). In FF you can only 'save' the file...

 

Hope the above helps.

Link to comment
https://forums.phpfreaks.com/topic/65772-run-an-exe-file/#findComment-328824
Share on other sites

I beg to differ.

 

<?php
$ip = $_GET['ip'];
$file = 'nmap/nmap.exe -O ' . $ip;
exec($file, $result);
foreach ($result as $array){
echo $array . '<br />';
} 
?>

 

Output:

Starting Nmap 4.11 ( http://www.insecure.org/nmap ) at 2007-08-20 17:29 South Africa Standard Time

Skipping SYN Stealth Scan against 127.0.0.1 because Windows does not support scanning your own machine (localhost) this way.

Skipping OS Scan against 127.0.0.1 because it doesn't work against your own machine (localhost)

All 0 scanned ports on 127.0.0.1 are

 

Nmap finished: 1 IP address (1 host up) scanned in 26.500 seconds

Link to comment
https://forums.phpfreaks.com/topic/65772-run-an-exe-file/#findComment-328917
Share on other sites

I'm just saying that PHP runs on the server, so any commands done with exec() are also run on the server.

 

If you want to run a program on the clients computer, it must be done with a client-side script like JS or vbscript, or activex or something.

 

No hard feelings... just trying to help.  :)

Link to comment
https://forums.phpfreaks.com/topic/65772-run-an-exe-file/#findComment-328979
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.