Advertisement
Guest User

Untitled

a guest
Jun 2nd, 2018
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.80 KB | None | 0 0
  1. <?php
  2. require 'config.php';
  3.  
  4. function encrypt($key, $data){
  5. if (strlen($key) != 32)
  6. throw new Exception('Invalid AES-256 key length. Key must be 32 bytes long.');
  7.  
  8. $cipher = mcrypt_module_open('rijndael-128', '', MCRYPT_MODE_CBC, '');
  9. $blockSize = mcrypt_get_block_size('rijndael-128', MCRYPT_MODE_CBC);
  10. $initVector = substr( md5( $key ), 0, mcrypt_get_iv_size( 'rijndael-128', MCRYPT_MODE_CBC ) );
  11.  
  12. mcrypt_generic_init($cipher, $key, $initVector);
  13. $padding = $blockSize - (strlen($data) % $blockSize);
  14. $pattern = chr($padding);
  15. $value2 = $data . str_repeat($pattern, $padding);
  16. $encryptedData = mcrypt_generic($cipher, $value2);
  17. mcrypt_generic_deinit($cipher);
  18. mcrypt_module_close($cipher);
  19. return base64_encode($encryptedData);
  20. }
  21.  
  22.  
  23.  
  24. if (isset($_POST['scriptid']) && isset($_POST['apikey']) && isset($_POST['enckey']) && isset($_POST['create2']) ){
  25. $scriptId = htmlspecialchars($_POST['scriptid']);
  26. $apiKey = htmlspecialchars($_POST['apikey']);
  27. $encKey = htmlspecialchars($_POST['enckey']);
  28.  
  29. $new_settings = '<?php' . "\n" . '
  30. $url = "https://api.kyup.com/client/v1";
  31. $apikey = "' . $apiKey . '";
  32. $enckey = "' . $encKey . '";
  33. $custom_image_id = ' . $scriptId . ";\n?>";
  34.  
  35. file_put_contents("config.php", $new_settings);
  36.  
  37. header("Refresh:0");
  38. exit;
  39. }
  40.  
  41. if (isset($_POST['delete2'])) {
  42.  
  43. $new_settings = '<?php' . "\n" . '
  44. $url = "https://api.kyup.com/client/v1";
  45. $apikey = "' . '' . '";
  46. $enckey = "' . '' . '";
  47. $custom_image_id = ' . '0' . ";\n?>";
  48.  
  49.  
  50. file_put_contents("config.php", $new_settings);
  51.  
  52. header("Refresh:0");
  53. exit;
  54. }
  55.  
  56.  
  57. if(isset($_POST['create'])) {
  58. $i = 0;
  59. $quantity = (int)$_POST["quantity"];
  60. while($i < $quantity) {
  61. $dcid = $_POST['location'];
  62. $rand = mt_rand(1,1000);
  63. $srvname = "Project" . $rand;
  64. $password = encrypt($enckey, "1garrett23");
  65. $ch = curl_init();
  66. curl_setopt($ch, CURLOPT_URL, "https://api.kyup.com/client/v1");
  67. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  68. 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}}}");
  69. curl_setopt($ch, CURLOPT_POST, 1);
  70. $headers = array();
  71. $headers[] = "Content-Type: application/x-www-form-urlencoded";
  72. curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
  73. $result = curl_exec($ch);
  74. curl_close ($ch);
  75. $i++;
  76. sleep(60);
  77. }
  78. $msgS = "Successfuly created " . $_POST['quantity'] . " server(s).";
  79. }
  80.  
  81. if(isset($_POST['list'])) {
  82.  
  83. $output = array();
  84. $ch = curl_init();
  85. curl_setopt($ch, CURLOPT_URL, "https://api.kyup.com/client/v1");
  86. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  87. curl_setopt($ch, CURLOPT_POSTFIELDS, "request={\"action\":\"cloudList\",\"authorization_key\":\"$apikey\",\n\"data\":{\"offset\":0}}");
  88. curl_setopt($ch, CURLOPT_POST, 1);
  89. $headers = array();
  90. $headers[] = "Content-Type: application/x-www-form-urlencoded";
  91. curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
  92. $result = curl_exec($ch);
  93. curl_close ($ch);
  94. $arr = json_decode($result, true);
  95. $format = trim($_POST['format']);
  96.  
  97. $msgS = 'Success!';
  98. foreach($arr AS $servers)
  99. {
  100. foreach($servers['list'] AS $server)
  101. {
  102. $serverIP = $server['ip'];
  103. list($ip, $block) = explode("/", $serverIP);
  104. $output[] = "$ip".$format;
  105. }
  106. }
  107.  
  108. }
  109.  
  110.  
  111.  
  112. if(isset($_POST['del'])) {
  113.  
  114. $ch1 = curl_init();
  115. curl_setopt($ch1, CURLOPT_URL, "https://api.kyup.com/client/v1");
  116. curl_setopt($ch1, CURLOPT_RETURNTRANSFER, 1);
  117. curl_setopt($ch1, CURLOPT_POSTFIELDS, "request={\"action\":\"cloudList\",\"authorization_key\":\"$apikey\",\n\"data\":{\"offset\":0}}");
  118. curl_setopt($ch1, CURLOPT_POST, 1);
  119. $headers = array();
  120. $headers[] = "Content-Type: application/x-www-form-urlencoded";
  121. curl_setopt($ch1, CURLOPT_HTTPHEADER, $headers);
  122. $result = curl_exec($ch1);
  123. curl_close ($ch1);
  124. $arr = json_decode($result, true);
  125.  
  126. $l = 0;
  127. while($l < count($arr["data"]["list"])) {
  128. $ch2 = curl_init();
  129. curl_setopt($ch2, CURLOPT_URL, "https://api.kyup.com/client/v1");
  130. curl_setopt($ch2, CURLOPT_RETURNTRANSFER, 1);
  131. $cid = $arr["data"]["list"]["$l"]["id"];
  132. curl_setopt($ch2, CURLOPT_POSTFIELDS, "request={\"action\":\"cloudDestroy\",\"authorization_key\":\"$apikey\",\"data\":{\"container_id\":\"$cid\"}}");
  133. curl_setopt($ch2, CURLOPT_POST, 1);
  134. $headers = array();
  135. $headers[] = "Content-Type: application/x-www-form-urlencoded";
  136. curl_setopt($ch2, CURLOPT_HTTPHEADER, $headers);
  137. $result = curl_exec($ch2);
  138. curl_close ($ch2);
  139. $l++;
  140. }
  141. }
  142.  
  143. $ph_a = (empty($apikey)) ? 'API KEY' : $apikey;
  144. $ph_b = ($custom_image_id == 0) ? 'Script ID' : $custom_image_id;
  145. $ph_c = (empty($enckey)) ? 'ENC KEY' : $enckey;
  146.  
  147. $v_a = (empty($apikey)) ? '' : $apikey;
  148. $v_b = ($custom_image_id == 0) ? '' : $custom_image_id;
  149. $v_c = (empty($enckey)) ? '' : $enckey;
  150. ?>
  151. <!DOCTYPE html>
  152. <html lang="en">
  153. <head>
  154. <meta charset="utf-8">
  155. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  156. <meta name="viewport" content="width=device-width, initial-scale=1">
  157. <meta name="robots" content="none">
  158. <title>TheProxyGuru - API Manager</title>
  159. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
  160. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/3.3.7/cyborg/bootstrap.min.css">
  161. <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
  162. <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
  163. <script src="https://bootswatch.com/_vendor/popper.js/dist/umd/popper.min.js"></script>
  164. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
  165. <!--[if lt IE 9]>
  166. <script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js"></script>
  167. <script src="https://cdnjs.cloudflare.com/ajax/libs/respond.js/1.4.2/respond.min.js"></script>
  168. <![endif]-->
  169. <style>
  170. * {
  171.  
  172. }
  173. html {
  174.  
  175. }
  176. body {
  177. padding-top: 50px;
  178. }
  179. a, a:link, a:active, a:hover {
  180. text-decoration: none;
  181. }
  182. </style>
  183. </head>
  184. <body>
  185. <div style="display: block; margin: 0 auto; width: 100%;">
  186. <!-- -->
  187. <div class="col-lg-3 text-center">
  188. <div class="row">
  189. <h6><a href=".">KYUP</a></h6>
  190. <hr>
  191. </div>
  192. </div>
  193. <!-- -->
  194. <?php if (!empty($msgS)): ?>
  195. <div class="container-fluid">
  196. <div class="row">
  197. <div class="alert alert-success">
  198. <?= $msgS ?>
  199. </div>
  200. </div>
  201. </div>
  202. <?= PHP_EOL ?>
  203. <?php endif; ?>
  204. <!-- -->
  205. <?php if (!empty($msgE)): ?>
  206. <div class="container-fluid">
  207. <div class="row">
  208. <div class="alert alert-danger">
  209. <?= $msgE ?>
  210. </div>
  211. </div>
  212. </div>
  213. <?= PHP_EOL ?>
  214. <?php endif; ?>
  215. <!-- -->
  216. <div class="container-fluid">
  217. <div class="row">
  218. <div class="col-lg-3">
  219. <div class="well">
  220. <?php if (!empty($output)): ?>
  221. <?php foreach ($output as $o): ?>
  222. <?= $o ?>
  223. <br>
  224. <?php endforeach; ?>
  225. <?= PHP_EOL ?>
  226. <?php endif; ?>
  227. </div>
  228. </div>
  229. </div>
  230. </div>
  231. <!-- -->
  232.  
  233.  
  234.  
  235.  
  236.  
  237. <div class="container-fluid">
  238.  
  239. <div class="row">
  240. <div class="panel panel-default">
  241. <div class="panel-body">
  242.  
  243. </div>
  244.  
  245.  
  246. <div class="panel-heading">List</div>
  247. <div class="panel-body">
  248. <form class="form" method="post">
  249. <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>
  250. <input type="text" class="form-control" name="format" placeholder="port:user:pass"></p>
  251. <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>
  252. </form>
  253. </div>
  254. </div>
  255. </div>
  256. </div>
  257. <!-- -->
  258. <div class="container-fluid">
  259. <div class="row">
  260. <div class="panel panel-default">
  261. <div class="panel-heading">Create</div>
  262. <div class="panel-body">
  263. <form class="form" method="POST" action="">
  264. <div class="form-group">
  265. <input class="form-control" id="quantity" type="text" name="quantity" placeholder="Quantity ..." required>
  266. </div>
  267. <div class="form-group">
  268. <select class="form-control" id="location" name="location">
  269. <option value="1">North America - Chicago</option>
  270. <option value="4">Europe - Amsterdam</option>
  271. <option value="6">Europe - London</option>
  272. <option value="3">Asia Pacific - Singapore</option>
  273. </select>
  274. </div>
  275. <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>
  276. </form>
  277. </div>
  278. </div>
  279. </div>
  280. </div>
  281. <!-- -->
  282. <div class="container-fluid">
  283. <div class="row">
  284. <div class="col-lg-3">
  285. <div class="panel panel-default">
  286. <div class="panel-heading">API Settings
  287. <button data-toggle="collapse" data-target="#apiContent" type="button" class="btn btn-default" aria-label="Left Align">
  288. <span class="glyphicon glyphicon glyphicon-cog" aria-hidden="true"></span>
  289. </button>
  290.  
  291. </div>
  292. <div class="panel-body collapse" id="apiContent">
  293. <form class="form" method="post">
  294. <div class="form-group">
  295. <input class="form-control" id="apikey" type="text" name="apikey" value="<?php echo $v_a;?>" placeholder="<?php echo $ph_a;?>" required>
  296. </div>
  297. <div class="form-group">
  298. <input class="form-control" id="enckey" type="text" name="enckey" value="<?php echo $v_c;?>" placeholder="<?php echo $ph_c;?>" required>
  299. </div>
  300. <div class="form-group">
  301. <input class="form-control" id="scriptid" type="text" name="scriptid" value="<?php echo $v_b?>" placeholder="<?php echo $ph_b;?>" required>
  302. </div>
  303. <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>
  304. <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>
  305. </form>
  306.  
  307. <br/>
  308.  
  309. <form class="form" method="post">
  310.  
  311. </form>
  312. </div>
  313. </div>
  314. </div>
  315. </div>
  316. </div>
  317. <!-- -->
  318.  
  319. </form>
  320. </div>
  321. </div>
  322. </div>
  323. </div>
  324. </div>
  325. <div class="container-fluid">
  326. <div class="row">
  327. <div class="panel panel-default">
  328. <div class="panel-heading">Delete</div>
  329. <div class="panel-body">
  330. <form class="form" method="post">
  331. <button class="btn btn-danger btn-lg btn-block" id="list" type="submit" name="del">DESTROY PROXIES <span class="glyphicon glyphicon-trash"</button>
  332. </form>
  333. </div>
  334. </div>
  335. </div>
  336. </div>
  337. <?php if(isset($_POST['list'])) {
  338. if(count($arr["data"]["list"]) > 0) { ?>
  339. <div class="container-fluid">
  340. <div class="row">
  341. <div class="panel panel-default">
  342. </div>
  343. </div>
  344. </div>
  345. <?php
  346. }
  347. }
  348. ?>
  349. <!-- -->
  350. <div class="container-fluid">
  351. <div class="row">
  352. <div style="text-align: center;">
  353. <hr>
  354. <p><small>&copy; <?= date('Y') ?> <a href="https://TheProxyGuru.com" target="_blank">TheProxyGuru</a></small></p>
  355. </div>
  356. </div>
  357. </div>
  358. </div>
  359. </body>
  360. </html>
  361.  
  362. </html>
  363. <script>
  364. $(function () {
  365. $('[data-toggle="tooltip"]').tooltip()
  366. })
  367.  
  368. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement