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
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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.