Advertisement
Guest User

Untitled

a guest
Jun 2nd, 2018
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.13 KB | None | 0 0
  1. <?php
  2.  
  3. include 'config.php';
  4.  
  5. if (isset($_POST['delete2'])) {
  6.  
  7. $new_settings = '<?php
  8. // Can be made/found at the Dasboard then in the "API" tab on the left.
  9. // https://cp-sg.cloud.z.com/API/
  10. $apiUser = "";
  11. $apiPassword = "";
  12. $tenantID = "";
  13. // Image Name. Make sure there is only 1 image with this name.
  14. $imageName = "";
  15. ';
  16.  
  17.  
  18. file_put_contents("config.php", $new_settings);
  19.  
  20. header("Refresh:0");
  21. exit;
  22. }
  23.  
  24. if (isset($_POST['create2']))
  25. {
  26. $image = htmlspecialchars($_POST['imageid']);
  27. $tenant = htmlspecialchars($_POST['tenant']);
  28. $apipass = htmlspecialchars($_POST['apipass']);
  29. $apiuser = htmlspecialchars($_POST['apiuser']);
  30.  
  31. $new_settings = '<?php
  32. // Can be made/found at the Dasboard then in the "API" tab on the left.
  33. // https://cp-sg.cloud.z.com/API/
  34. $apiUser = "' . $apiuser . '";
  35. $apiPassword = "' . $apipass . '";
  36. $tenantID = "' . $tenant . '";
  37. // Image Name. Make sure there is only 1 image with this name.
  38. $imageName = "' . $image . '";
  39. ';
  40.  
  41. file_put_contents("config.php", $new_settings);
  42.  
  43. header("Refresh:0");
  44. exit;
  45. }
  46.  
  47. $ph_a = (empty($apiUser)) ? 'API User' : $apiUser;
  48. $ph_b = (empty($apiPassword)) ? 'API Password' : $apiPassword;
  49. $ph_c = (empty($tenantID)) ? 'TENANT ID' : $tenantID;
  50. $ph_d = (empty($imageName)) ? 'IMAGE NAME' : $imageName;
  51.  
  52. $v_a = (empty($apiUser)) ? '' : $apiUser;
  53. $v_b = (empty($apiPassword)) ? '' : $apiPassword;
  54. $v_c = (empty($tenantID)) ? '' : $tenantID;
  55. $v_d = (empty($imageName)) ? '' : $imageName;
  56.  
  57. ?>
  58.  
  59. <!DOCTYPE html>
  60. <html lang="en">
  61. <head>
  62. <meta charset="utf-8">
  63. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  64. <meta name="viewport" content="width=device-width, initial-scale=1">
  65. <meta name="robots" content="none">
  66. <title>TheProxyGuru - API Manager (Conoha)</title>
  67. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
  68. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/3.3.7/cyborg/bootstrap.min.css">
  69. <script src="https://bootswatch.com/_vendor/popper.js/dist/umd/popper.min.js"></script>
  70. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
  71. <!--[if lt IE 9]>
  72. <script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js"></script>
  73. <script src="https://cdnjs.cloudflare.com/ajax/libs/respond.js/1.4.2/respond.min.js"></script>
  74. <![endif]-->
  75. <style>
  76. * {
  77.  
  78. }
  79. html {
  80.  
  81. }
  82. body {
  83. padding-top: 50px;
  84. }
  85. a, a:link, a:active, a:hover {
  86. text-decoration: none;
  87. }
  88. .alert {
  89. display: none;
  90. }
  91. </style>
  92. </head>
  93. <body>
  94. <!-- -->
  95. <div class="container-fluid">
  96. <div class="row">
  97. <div class="col-lg-12 text-center">
  98. <h6><a href="">CONOHA</a></h6>
  99. <hr>
  100. </div>
  101. </div>
  102. </div>
  103. <div class="container-fluid">
  104. <div class="row">
  105. <div class="col-lg-12">
  106. <div class="alert alert-success"></div>
  107. </div>
  108. </div>
  109. </div>
  110. <div class="container-fluid">
  111. <div class="row">
  112. <div class="col-lg-12">
  113. <div class="alert alert-danger"></div>
  114. </div>
  115. </div>
  116. </div>
  117. <div class="container-fluid">
  118. <div class="row">
  119. <div class="col-lg-12">
  120. <div class="well"></div>
  121. </div>
  122. </div>
  123. </div>
  124. <!-- -->
  125. <div class="container-fluid">
  126. <div class="row">
  127. <div class="col-lg-12">
  128. <div class="panel panel-default">
  129. <div class="panel-heading">List</div>
  130. <div class="panel-body">
  131. <form class="form z-list" method="post">
  132. <div class="form-group">
  133. <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>
  134. <input class="form-control" id="z-prefix" type="text" name="prefix" placeholder=":port:user:pass">
  135. </div>
  136. <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>
  137. </form>
  138. </div>
  139. </div>
  140. </div>
  141. </div>
  142. </div>
  143. <!-- -->
  144. <div class="container-fluid">
  145. <div class="row">
  146. <div class="col-lg-12">
  147. <div class="panel panel-default">
  148. <div class="panel-heading">Create</div>
  149. <div class="panel-body">
  150. <form class="form z-create">
  151. <div class="form-group">
  152. <input class="form-control" id="Z-quantity" type="text" name="quantity" placeholder="Quantity ..." required>
  153. </div>
  154. <div class="form-group">
  155. <select class="form-control">
  156. <option value="sjc">United States</option>
  157. </select>
  158. </div>
  159. <button class="btn btn-success btn-lg btn-block" id="Z-create" type="submit" name="create">CREATE <span class="glyphicon glyphicon-plus-sign" aria-hidden="true"></span></button>
  160. </form>
  161. </div>
  162. </div>
  163. </div>
  164. </div>
  165. </div>
  166. <!-- -->
  167. <div class="container-fluid">
  168. <div class="row">
  169. <div class="col-lg-12">
  170. <div class="panel panel-default">
  171. <div class="panel-heading">API Settings
  172.  
  173. <button data-toggle="collapse" data-target="#apiContent" type="button" class="btn btn-default" aria-label="Left Align">
  174. <span class="glyphicon glyphicon glyphicon-cog" aria-hidden="true"></span>
  175. </button>
  176. </div>
  177. <div class="panel-body collapse" id="apiContent">
  178. <form class="form" method="post">
  179. <div class="form-group">
  180. <input class="form-control" id="apiuser" type="text" name="apiuser" value="<?php echo $v_a;?>" placeholder="<?php echo $ph_a;?>" required>
  181. </div>
  182. <div class="form-group">
  183. <input class="form-control" id="apipass" type="text" name="apipass" value="<?php echo $v_b?>" placeholder="<?php echo $ph_b;?>" required>
  184. </div>
  185. <div class="form-group">
  186. <input class="form-control" id="tenant" type="text" name="tenant" value="<?php echo $v_c?>" placeholder="<?php echo $ph_c;?>" required>
  187. </div>
  188. <div class="form-group">
  189. <input class="form-control" id="imageid" type="text" name="imageid" value="<?php echo $v_d?>" placeholder="<?php echo $ph_d;?>" required>
  190. </div>
  191. <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>
  192. </form>
  193.  
  194. <hr/>
  195.  
  196. <form class="form" method="post">
  197. <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"></span></button>
  198. </form>
  199. </div>
  200. </div>
  201. </div>
  202. </div>
  203. </div>
  204.  
  205. <!-- -->
  206. <div class="container-fluid">
  207. <div class="row">
  208. <div class="col-lg-12">
  209. <div class="panel panel-default">
  210. <div class="panel-heading">Delete Proxies</div>
  211. <div class="panel-body">
  212. <button class="btn btn-danger btn-lg btn-block" id="z-delete" type="submit" name="delete">DESTROY PROXIES <span class="glyphicon glyphicon-trash" aria-hidden="true"></span></button>
  213. </div>
  214. </div>
  215. </div>
  216. </div>
  217. </div>
  218. <!-- -->
  219. <div class="container-fluid">
  220. <div class="row">
  221. <div class="col-lg-12">
  222. <div class="panel panel-default">
  223. <div class="panel-heading">Generate Token</div>
  224. <div class="panel-body">
  225. <button class="btn btn-danger btn-lg btn-block" id="z-generate" type="submit" name="generate">GENERATE TOKEN <span class="glyphicon glyphicon-refresh" aria-hidden="true"></span></button>
  226. </div>
  227. </div>
  228. </div>
  229. </div>
  230. </div>
  231. <!-- -->
  232. <div class="container-fluid">
  233. <div class="row">
  234. <div class="col-lg-12 text-center">
  235. <hr>
  236. <p><small>&copy; <a href="https://TheProxyGuru.com" target="_blank">TheProxyGuru</a></small></p>
  237. </div>
  238. </div>
  239. </div>
  240.  
  241. <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
  242. <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
  243. <script>
  244. $('.z-list').submit(function(e) {
  245. $('.alert').hide();
  246. e.preventDefault();
  247. var prefix = $('#z-prefix').val();
  248. $.get('list.php', function(res) {
  249. if(!Array.isArray(res)) {
  250. $('.alert-danger').show();
  251. $('.alert-danger').text('Error listing.');
  252. } else {
  253. $('.alert-success').show();
  254. $('.alert-success').text('Done!')
  255. if(res.length == 0) {
  256. $('.well').text('No results found.');
  257. } else {
  258. $('.well').text('');
  259. res.forEach(function(e) {
  260. $('.well').append(e + prefix + '<br>');
  261. });
  262. }
  263. }
  264. });
  265. });
  266.  
  267. $('.z-create').submit(function(e) {
  268. $('.alert').hide();
  269. e.preventDefault();
  270. var q = $('#Z-quantity').val();
  271. $.get('create.php?q=' + q, function(res) {
  272. if(res == 'true') {
  273. $('.alert-success').show();
  274. $('.alert-success').text('Done!')
  275. } else {
  276. $('.alert-danger').show();
  277. $('.alert-danger').text('Error creating.');
  278. }
  279. });
  280. });
  281.  
  282. $('#z-delete').click(function(e) {
  283. $('.alert').hide();
  284. e.preventDefault();
  285. $.get('delete.php', function(res) {
  286. if(res == 'true') {
  287. $('.alert-success').show();
  288. $('.alert-success').text('Done!')
  289. } else if(res == 'false') {
  290. $('.alert-danger').show();
  291. $('.alert-danger').text('Error deleting.');
  292. }
  293. });
  294. });
  295.  
  296. $('#z-generate').click(function(e) {
  297. $('.alert').hide();
  298. e.preventDefault();
  299. $.get('generate.php', function(res) {
  300. if(res == 'true') {
  301. $('.alert-success').show();
  302. $('.alert-success').text('Done!')
  303. } else if(res == 'false') {
  304. $('.alert-danger').show();
  305. $('.alert-danger').text('Error generating.');
  306. }
  307. });
  308. });
  309. </script>
  310. </body>
  311. </html>
  312. <script>
  313. $(function () {
  314. $('[data-toggle="tooltip"]').tooltip()
  315. })
  316.  
  317. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement