Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require 'config.php';
- function encrypt($key, $data){
- if (strlen($key) != 32)
- throw new Exception('Invalid AES-256 key length. Key must be 32 bytes long.');
- $cipher = mcrypt_module_open('rijndael-128', '', MCRYPT_MODE_CBC, '');
- $blockSize = mcrypt_get_block_size('rijndael-128', MCRYPT_MODE_CBC);
- $initVector = substr( md5( $key ), 0, mcrypt_get_iv_size( 'rijndael-128', MCRYPT_MODE_CBC ) );
- mcrypt_generic_init($cipher, $key, $initVector);
- $padding = $blockSize - (strlen($data) % $blockSize);
- $pattern = chr($padding);
- $value2 = $data . str_repeat($pattern, $padding);
- $encryptedData = mcrypt_generic($cipher, $value2);
- mcrypt_generic_deinit($cipher);
- mcrypt_module_close($cipher);
- return base64_encode($encryptedData);
- }
- if (isset($_POST['scriptid']) && isset($_POST['apikey']) && isset($_POST['enckey']) && isset($_POST['create2']) ){
- $scriptId = htmlspecialchars($_POST['scriptid']);
- $apiKey = htmlspecialchars($_POST['apikey']);
- $encKey = htmlspecialchars($_POST['enckey']);
- $new_settings = '<?php' . "\n" . '
- $url = "https://api.kyup.com/client/v1";
- $apikey = "' . $apiKey . '";
- $enckey = "' . $encKey . '";
- $custom_image_id = ' . $scriptId . ";\n?>";
- file_put_contents("config.php", $new_settings);
- header("Refresh:0");
- exit;
- }
- if (isset($_POST['delete2'])) {
- $new_settings = '<?php' . "\n" . '
- $url = "https://api.kyup.com/client/v1";
- $apikey = "' . '' . '";
- $enckey = "' . '' . '";
- $custom_image_id = ' . '0' . ";\n?>";
- file_put_contents("config.php", $new_settings);
- header("Refresh:0");
- exit;
- }
- if(isset($_POST['create'])) {
- $i = 0;
- $quantity = (int)$_POST["quantity"];
- while($i < $quantity) {
- $dcid = $_POST['location'];
- $rand = mt_rand(1,1000);
- $srvname = "Project" . $rand;
- $password = encrypt($enckey, "1garrett23");
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, "https://api.kyup.com/client/v1");
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch, CURLOPT_POSTFIELDS, "request={\"action\":\"cloudCreate\",\"authorization_key\":\"$apikey\",\"data\":{\"name\":\"$srvname\",\"password\":\"$password\",\"datacenter_id\":\"$dcid\",\"custom_image_id\":" . $custom_image_id . ",\"resources\":{\"mem\":1,\"hdd\":20,\"cpu\":1,\"bw\":2}}}");
- curl_setopt($ch, CURLOPT_POST, 1);
- $headers = array();
- $headers[] = "Content-Type: application/x-www-form-urlencoded";
- curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
- $result = curl_exec($ch);
- curl_close ($ch);
- $i++;
- sleep(60);
- }
- $msgS = "Successfuly created " . $_POST['quantity'] . " server(s).";
- }
- if(isset($_POST['list'])) {
- $output = array();
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, "https://api.kyup.com/client/v1");
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch, CURLOPT_POSTFIELDS, "request={\"action\":\"cloudList\",\"authorization_key\":\"$apikey\",\n\"data\":{\"offset\":0}}");
- curl_setopt($ch, CURLOPT_POST, 1);
- $headers = array();
- $headers[] = "Content-Type: application/x-www-form-urlencoded";
- curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
- $result = curl_exec($ch);
- curl_close ($ch);
- $arr = json_decode($result, true);
- $format = trim($_POST['format']);
- $msgS = 'Success!';
- foreach($arr AS $servers)
- {
- foreach($servers['list'] AS $server)
- {
- $serverIP = $server['ip'];
- list($ip, $block) = explode("/", $serverIP);
- $output[] = "$ip".$format;
- }
- }
- }
- if(isset($_POST['del'])) {
- $ch1 = curl_init();
- curl_setopt($ch1, CURLOPT_URL, "https://api.kyup.com/client/v1");
- curl_setopt($ch1, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch1, CURLOPT_POSTFIELDS, "request={\"action\":\"cloudList\",\"authorization_key\":\"$apikey\",\n\"data\":{\"offset\":0}}");
- curl_setopt($ch1, CURLOPT_POST, 1);
- $headers = array();
- $headers[] = "Content-Type: application/x-www-form-urlencoded";
- curl_setopt($ch1, CURLOPT_HTTPHEADER, $headers);
- $result = curl_exec($ch1);
- curl_close ($ch1);
- $arr = json_decode($result, true);
- $l = 0;
- while($l < count($arr["data"]["list"])) {
- $ch2 = curl_init();
- curl_setopt($ch2, CURLOPT_URL, "https://api.kyup.com/client/v1");
- curl_setopt($ch2, CURLOPT_RETURNTRANSFER, 1);
- $cid = $arr["data"]["list"]["$l"]["id"];
- curl_setopt($ch2, CURLOPT_POSTFIELDS, "request={\"action\":\"cloudDestroy\",\"authorization_key\":\"$apikey\",\"data\":{\"container_id\":\"$cid\"}}");
- curl_setopt($ch2, CURLOPT_POST, 1);
- $headers = array();
- $headers[] = "Content-Type: application/x-www-form-urlencoded";
- curl_setopt($ch2, CURLOPT_HTTPHEADER, $headers);
- $result = curl_exec($ch2);
- curl_close ($ch2);
- $l++;
- }
- }
- $ph_a = (empty($apikey)) ? 'API KEY' : $apikey;
- $ph_b = ($custom_image_id == 0) ? 'Script ID' : $custom_image_id;
- $ph_c = (empty($enckey)) ? 'ENC KEY' : $enckey;
- $v_a = (empty($apikey)) ? '' : $apikey;
- $v_b = ($custom_image_id == 0) ? '' : $custom_image_id;
- $v_c = (empty($enckey)) ? '' : $enckey;
- ?>
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <meta name="robots" content="none">
- <title>TheProxyGuru - API Manager</title>
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/3.3.7/cyborg/bootstrap.min.css">
- <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
- <script src="https://bootswatch.com/_vendor/popper.js/dist/umd/popper.min.js"></script>
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
- <!--[if lt IE 9]>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js"></script>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/respond.js/1.4.2/respond.min.js"></script>
- <![endif]-->
- <style>
- * {
- }
- html {
- }
- body {
- padding-top: 50px;
- }
- a, a:link, a:active, a:hover {
- text-decoration: none;
- }
- </style>
- </head>
- <body>
- <div style="display: block; margin: 0 auto; width: 100%;">
- <!-- -->
- <div class="col-lg-3 text-center">
- <div class="row">
- <h6><a href=".">KYUP</a></h6>
- <hr>
- </div>
- </div>
- <!-- -->
- <?php if (!empty($msgS)): ?>
- <div class="container-fluid">
- <div class="row">
- <div class="alert alert-success">
- <?= $msgS ?>
- </div>
- </div>
- </div>
- <?= PHP_EOL ?>
- <?php endif; ?>
- <!-- -->
- <?php if (!empty($msgE)): ?>
- <div class="container-fluid">
- <div class="row">
- <div class="alert alert-danger">
- <?= $msgE ?>
- </div>
- </div>
- </div>
- <?= PHP_EOL ?>
- <?php endif; ?>
- <!-- -->
- <div class="container-fluid">
- <div class="row">
- <div class="col-lg-3">
- <div class="well">
- <?php if (!empty($output)): ?>
- <?php foreach ($output as $o): ?>
- <?= $o ?>
- <br>
- <?php endforeach; ?>
- <?= PHP_EOL ?>
- <?php endif; ?>
- </div>
- </div>
- </div>
- </div>
- <!-- -->
- <div class="container-fluid">
- <div class="row">
- <div class="panel panel-default">
- <div class="panel-body">
- </div>
- <div class="panel-heading">List</div>
- <div class="panel-body">
- <form class="form" method="post">
- <i class="fa fa-question-circle-o" data-toggle="tooltip" data-placement="top" title="" data-original-title="After you create the proxies and wait 5-10 minutes, input your :port:user:pass here and click list! Once the proxies are listed copy and import to your desired bot!"></i>
- <input type="text" class="form-control" name="format" placeholder="port:user:pass"></p>
- <button class="btn btn-info btn-lg btn-block" id="list" type="submit" name="list">LIST PROXIES <span class="glyphicon glyphicon-list-alt" aria-hidden="true"></span></button>
- </form>
- </div>
- </div>
- </div>
- </div>
- <!-- -->
- <div class="container-fluid">
- <div class="row">
- <div class="panel panel-default">
- <div class="panel-heading">Create</div>
- <div class="panel-body">
- <form class="form" method="POST" action="">
- <div class="form-group">
- <input class="form-control" id="quantity" type="text" name="quantity" placeholder="Quantity ..." required>
- </div>
- <div class="form-group">
- <select class="form-control" id="location" name="location">
- <option value="1">North America - Chicago</option>
- <option value="4">Europe - Amsterdam</option>
- <option value="6">Europe - London</option>
- <option value="3">Asia Pacific - Singapore</option>
- </select>
- </div>
- <button class="btn btn-success btn-lg btn-block" id="create" type="submit" name="create">CREATE <span class="glyphicon glyphicon-plus-sign" aria-hidden="true"></button>
- </form>
- </div>
- </div>
- </div>
- </div>
- <!-- -->
- <div class="container-fluid">
- <div class="row">
- <div class="col-lg-3">
- <div class="panel panel-default">
- <div class="panel-heading">API Settings
- <button data-toggle="collapse" data-target="#apiContent" type="button" class="btn btn-default" aria-label="Left Align">
- <span class="glyphicon glyphicon glyphicon-cog" aria-hidden="true"></span>
- </button>
- </div>
- <div class="panel-body collapse" id="apiContent">
- <form class="form" method="post">
- <div class="form-group">
- <input class="form-control" id="apikey" type="text" name="apikey" value="<?php echo $v_a;?>" placeholder="<?php echo $ph_a;?>" required>
- </div>
- <div class="form-group">
- <input class="form-control" id="enckey" type="text" name="enckey" value="<?php echo $v_c;?>" placeholder="<?php echo $ph_c;?>" required>
- </div>
- <div class="form-group">
- <input class="form-control" id="scriptid" type="text" name="scriptid" value="<?php echo $v_b?>" placeholder="<?php echo $ph_b;?>" required>
- </div>
- <button class="btn btn-warning btn-lg btn-block" id="create" type="submit" name="create2">SAVE <span class="glyphicon glyphicon-save" aria-hidden="true"></span></button>
- <button class="btn btn-danger btn-lg btn-block" id="delete2" type="submit" name="delete2">CLEAR API INFO <span class="glyphicon glyphicon-trash" aria-hidden="true"></button>
- </form>
- <br/>
- <form class="form" method="post">
- </form>
- </div>
- </div>
- </div>
- </div>
- </div>
- <!-- -->
- </form>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="container-fluid">
- <div class="row">
- <div class="panel panel-default">
- <div class="panel-heading">Delete</div>
- <div class="panel-body">
- <form class="form" method="post">
- <button class="btn btn-danger btn-lg btn-block" id="list" type="submit" name="del">DESTROY PROXIES <span class="glyphicon glyphicon-trash"</button>
- </form>
- </div>
- </div>
- </div>
- </div>
- <?php if(isset($_POST['list'])) {
- if(count($arr["data"]["list"]) > 0) { ?>
- <div class="container-fluid">
- <div class="row">
- <div class="panel panel-default">
- </div>
- </div>
- </div>
- <?php
- }
- }
- ?>
- <!-- -->
- <div class="container-fluid">
- <div class="row">
- <div style="text-align: center;">
- <hr>
- <p><small>© <?= date('Y') ?> <a href="https://TheProxyGuru.com" target="_blank">TheProxyGuru</a></small></p>
- </div>
- </div>
- </div>
- </div>
- </body>
- </html>
- </html>
- <script>
- $(function () {
- $('[data-toggle="tooltip"]').tooltip()
- })
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement