Jump to content
Tiza

Execute File on Remote Computer Using Port 80

Recommended Posts

Hey everyone,

 

I am trying to work on some code to execute putty on a Remote Machine using php. Hence i decided to code something like this to see if it works

 

Code Looks like this 

<?php

$ip = "121.36.36.254";

$file = "http://www.ovladis.eu/file/putty.exe";

$fp = fsockopen($ip,80,$errno,$errstr);
if (!$fp) {
    echo "$errstr ($errno)<br />\n";
} else {
	shell_exec($file);

?>

AM i Missing something ? Please Advice if i am Doing it correctly.

Link to comment
Share on other sites

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.   Paste as plain text instead

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