Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $url = 'https://api.kyup.com/client/v1';
- $apikey = "8b97b711d6ebfdaf3351049397bfe6ad1d";
- $enckey = "4c608bfba1a2c16992ad8cd8ceeeba7c";
- 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['create'])) {
- $i = 0;
- $quantity = (int)$_POST["quantity"];
- while($i < $quantity) {
- $dcid = $_POST['location'];
- $rand = mt_rand(1,1000);
- $srvname = "Proxy" . $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\":951,\"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);
- var_dump($result);
- $i++;
- sleep(60);
- }
- $msgS = "Successfuly created " . $_POST['quantity'] . " server(s).";
- }
- if(isset($_POST['list'])) {
- $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);
- }
- 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);
- var_dump($result);
- $l++;
- }
- }
- ?>
- <!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>
- <!--[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="well">
- <?php if (!empty($output)): ?>
- <?php foreach ($output as $o): ?>
- <?= $o ?>
- <br>
- <?php endforeach; ?>
- <?= PHP_EOL ?>
- <?php endif; ?>
- </div>
- </div>
- </div>
- <!-- -->
- <div class="container-fluid">
- <div class="row">
- <div class="panel panel-default">
- <div class="panel-body">
- <?php
- $j = 0;
- $xip = $arr["data"]["list"]["$j"]["ip"];
- $eip = explode("/", $xip);
- while($j < count($arr["data"]["list"])) {
- if(!empty($_POST['format'])) {
- echo $eip["0"] . ":" . $_POST['format'] . "</br>";
- }
- else {
- echo $eip["0"] . "</br>";
- }
- $j++;
- }
- ?>
- </div>
- <div class="panel-heading">List</div>
- <div class="panel-body">
- <form class="form" method="post">
- <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</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</button>
- </form>
- </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">Delete All</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>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement