Guest User

Untitled

a guest
May 27th, 2018
283
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.37 KB | None | 0 0
  1. <?php
  2. include 'config.php';
  3. include 'functions.php';
  4.  
  5.  
  6.  
  7.  
  8.  
  9. ?>
  10. <!DOCTYPE html>
  11. <html lang="en">
  12. <head>
  13. <meta charset="utf-8">
  14. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  15. <meta name="viewport" content="width=device-width, initial-scale=1">
  16. <meta name="robots" content="none">
  17. <title>Servers Admin</title>
  18. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
  19. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/3.3.7/cyborg/bootstrap.min.css">
  20. <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
  21. <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
  22. <!--[if lt IE 9]>
  23. <script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js"></script>
  24. <script src="https://cdnjs.cloudflare.com/ajax/libs/respond.js/1.4.2/respond.min.js"></script>
  25. <![endif]-->
  26. <style>
  27. * {
  28.  
  29. }
  30. html {
  31.  
  32. }
  33. body {
  34. padding-top: 50px;
  35. }
  36. a, a:link, a:active, a:hover {
  37. text-decoration: none;
  38. }
  39. .ip{
  40. color:white;
  41. }
  42. </style>
  43. </head>
  44. <?php
  45. if(isset($_POST['update']))
  46. {
  47. $key = $_POST['key'];
  48. $secret = $_POST['secret'];
  49. $username = $_POST['username'];
  50. $password = $_POST['password'];
  51. $script = $_POST['script'];
  52. $text = '
  53.  
  54.  
  55. /* Show Errors
  56. ini_set("display_errors", 1);
  57. ini_set("display_startup_errors", 1);
  58. error_reporting(E_ALL);
  59. */
  60.  
  61. $key = "'.$key.'";
  62. $secret = "'.$secret.'";
  63.  
  64. $locations = array(
  65. "us-east-1" => array(
  66. "image" => "ami-52b88b38",
  67. "location" => "us-east-1"),
  68.  
  69. "us-east-2" => array(
  70. "image" => "ami-b57356d0",
  71. "location" => "us-east-2"),
  72.  
  73.  
  74. "us-west-1" => array(
  75. "image" => "ami-b53545d5",
  76. "location" => "us-west-1"),
  77.  
  78.  
  79. "us-west-2" => array(
  80. "image" => "ami-5fd0323f",
  81. "location" => "us-west-2"),
  82.  
  83.  
  84. "ca-central-1" => array(
  85. "image" => "ami-92d865f6",
  86. "location" => "ca-central-1"),
  87.  
  88.  
  89. "eu-west-2" => array(
  90. "image" => "ami-4dfbe829",
  91. "location" => "eu-west-2"),
  92.  
  93.  
  94. "eu-west-3" => array(
  95. "image" => "ami-d64dfaab",
  96. "location" => "eu-west-3")
  97. );
  98.  
  99. $username = "'.$username.'";
  100. $password = "'.$password.'";
  101. $script = "'.$script.'";
  102.  
  103. ';
  104.  
  105. file_put_contents('config.php', "<?php".$text."?>");
  106.  
  107.  
  108.  
  109. }
  110. if(isset($_POST['list']))
  111. {
  112. $ips = listServers($locations, $key, $secret);
  113. }
  114.  
  115. if(isset($_POST['create']))
  116. {
  117. $quantity = $_POST['quantity'];
  118. $location = $_POST['location'];
  119. $script = base64_encode($script);
  120.  
  121.  
  122. $imageID = $locations[$location]['image'];
  123.  
  124. for($i=0;$i<$quantity;$i++)
  125. {
  126. createServer($location, $key, $secret, $imageID, 't2.micro', $script);
  127. }
  128. }
  129.  
  130. if(isset($_POST['delete']))
  131. {
  132. terminateAll($locations, $key, $secret);
  133. }
  134.  
  135. if(isset($_POST['trafficBtn']))
  136. {
  137.  
  138. unblockEverthing($locations, $key, $secret);
  139. }
  140.  
  141. if(isset($_POST['blockBtn']))
  142. {
  143. blockEverthing($locations, $key, $secret);
  144. }
  145.  
  146.  
  147. ?>
  148. <body>
  149. <!-- -->
  150. <div class="container-fluid">
  151. <div class="row">
  152. <div class="col-lg-3 text-center">
  153. <h6><a href="">Amazon AWS</a></h6>
  154. <hr>
  155. </div>
  156. </div>
  157. </div>
  158. <!-- -->
  159. <!-- -->
  160. <!-- -->
  161. <div class="container-fluid">
  162. <div class="row">
  163. <div class="col-lg-3">
  164. <div class="well">
  165. <?php
  166. if(isset($_POST['list']))
  167. {
  168. $listData = $_POST['userpass'];
  169. foreach($ips AS $IP)
  170. {
  171.  
  172.  
  173. $serverIP = $IP['IP'];
  174.  
  175. echo '<span class=ip>'.$serverIP.''.$listData.'</span><br>';
  176. }
  177. }
  178.  
  179. if(isset($_POST['create']))
  180. {
  181. if(isset($_POST['quantity']))
  182. {
  183. if(is_numeric($quantity))
  184. {
  185. if($quantity >= 1)
  186. {
  187. if(isset($_POST['location']))
  188. {
  189. echo "<span class=ip>Server's are now being created.</span><br>";
  190. }
  191. }
  192. }
  193. }
  194. }
  195.  
  196. if(isset($_POST['delete']))
  197. {
  198. echo "<span class=ip>Servers have been deleted.</span><br>";
  199. }
  200.  
  201. if(isset($_POST['trafficBtn']))
  202. {
  203. echo "<span class=ip>Traffic has been unblocked.</span><br>";
  204. }
  205.  
  206. if(isset($_POST['blockBtn']))
  207. {
  208. echo "<span class=ip>Traffic has been blocked.</span><br>";
  209. }
  210. ?>
  211. </div>
  212. </div>
  213. </div>
  214. </div>
  215. <!-- -->
  216.  
  217. <div class="container-fluid">
  218. <div class="row">
  219. <div class="col-lg-3">
  220. <div class="panel panel-default">
  221. <div class="panel-heading">List</div>
  222. <div class="panel-body">
  223. <form class="form" method="post">
  224.  
  225. <div class="form-group">
  226. <input class="form-control" id="userpass" type="text" name="userpass" placeholder=":port:user:pass">
  227. </div>
  228. <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>
  229. </form><br>
  230.  
  231. </div>
  232. </div>
  233. </div>
  234. </div>
  235. </div>
  236. <!-- -->
  237. <div class="container-fluid">
  238. <div class="row">
  239. <div class="col-lg-3">
  240. <div class="panel panel-default">
  241. <div class="panel-heading">Create</div>
  242. <div class="panel-body">
  243. <form class="form" method="post">
  244.  
  245. <div class="form-group">
  246. <input class="form-control" id="quantity" type="number" name="quantity" placeholder="Quantity ..." required>
  247. </div>
  248. <div class="form-group">
  249. <select class="form-control" id="location" name="location">
  250. <option value="us-east-1">United States (N. Virginia)</option>
  251. <option value="us-east-2">United States (Ohio)</option>
  252. <option value="us-west-1">United States (N. California)</option>
  253. <option value="us-west-2">United States (Oregon)</option>
  254. <option value="ca-central-1">Canada (Central)</option>
  255. <option value="eu-west-2">Europe (London)</option>
  256. <option value="eu-west-3">Europe (Paris)</option>
  257.  
  258. </select>
  259. </div>
  260. <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"></span></button>
  261. </form>
  262. </div>
  263. </div>
  264. </div>
  265. </div>
  266. </div>
  267. <!-- -->
  268. <div class="container-fluid">
  269. <div class="row">
  270. <div class="col-lg-3">
  271. <div class="panel panel-default">
  272. <div class="panel-heading">API Settings <span <button data-toggle="collapse" data-target="#apiContent" type="button" class="btn btn-default" aria-label="Left Align">
  273. <span class="glyphicon glyphicon glyphicon-cog" aria-hidden="true"></span>
  274. </button></div>
  275. <div class="panel-body collapse" id="apiContent">
  276. <form class="form" method="post">
  277. <?php if(isset($_POST['update'])) echo '<span class=ip>Info updated!</span><br>';?>
  278. <div class="form-group">
  279. <input class="form-control" id="key" type="text" name="key" placeholder="API Key" value="<?php echo htmlspecialchars($key,ENT_QUOTES);?>">
  280. </div>
  281. <div class="form-group">
  282. <input class="form-control" id="secret" type="text" name="secret" placeholder="API Secret" value="<?php echo htmlspecialchars($secret,ENT_QUOTES);?>">
  283. </div>
  284. <div class="form-group">
  285. <input class="form-control" id="username" type="text" name="username" placeholder="Username" value="<?php echo htmlspecialchars($username,ENT_QUOTES);?>">
  286. </div>
  287. <div class="form-group">
  288. <input class="form-control" id="password" type="text" name="password" placeholder="Password" value="<?php echo htmlspecialchars($password,ENT_QUOTES);?>">
  289. </div>
  290.  
  291. <div class="form-group">
  292. <textarea rows="12" class="form-control" id="script" type="text" name="script" placeholder="Script"><?php echo htmlspecialchars($script,ENT_QUOTES);?> </textarea>
  293. </div>
  294. <button class="btn btn-warning btn-lg btn-block" id="update" type="submit" name="update">SAVE <span class="glyphicon glyphicon-save" aria-hidden="true"></span></button><br>
  295. <button class="btn btn-danger btn-lg btn-block" type="button" onclick="clearUpdate()">CLEAR API INFO <span class="glyphicon glyphicon-trash" name="clearBtn" aria-hidden="true"></span></button>
  296. </form>
  297. </div>
  298. </div>
  299. </div>
  300. </div>
  301. </div>
  302. <!-- -->
  303. <div class="container-fluid">
  304. <div class="row">
  305. <div class="col-lg-3">
  306. <div class="panel panel-default">
  307. <div class="panel-heading">Delete Proxies</div>
  308. <div class="panel-body">
  309. <form class="form" method="post">
  310.  
  311. <button class="btn btn-danger btn-lg btn-block" id="delete" type="submit" name="delete">DESTROY PROXIES <span class="glyphicon glyphicon-trash" aria-hidden="true"></span></button>
  312. </form>
  313. </div>
  314. </div>
  315. </div>
  316. </div>
  317. </div>
  318.  
  319. <!--
  320. <div class="container-fluid">
  321. <div class="row">
  322. <div class="col-lg-3">
  323. <div class="panel panel-default">
  324. <div class="panel-heading">Unblock Firewall</div>
  325. <div class="panel-body">
  326. <form class="form" method="post">
  327.  
  328. <button class="btn btn-success btn-lg btn-block" id="trafficBtn" type="submit" name="trafficBtn">Allow Traffic <span class="glyphicon glyphicon-check" aria-hidden="true"></span></button>
  329. </form>
  330. </div>
  331. </div>
  332. </div>
  333. </div>
  334. </div>
  335.  
  336.  
  337. <div class="container-fluid">
  338. <div class="row">
  339. <div class="col-lg-3">
  340. <div class="panel panel-default">
  341. <div class="panel-heading">Block Firewall</div>
  342. <div class="panel-body">
  343. <form class="form" method="post">
  344.  
  345. <button class="btn btn-danger btn-lg btn-block" id="blockBtn" type="submit" name="blockBtn">Deny Traffic <span class="glyphicon glyphicon-remove" aria-hidden="true"></span></button>
  346. </form>
  347. </div>
  348. </div>
  349. </div>
  350. </div>
  351. </div>
  352. -->
  353. </body>
  354. <script>
  355. function clearUpdate(){
  356. document.getElementById('key').value = "";
  357. document.getElementById('secret').value = "";
  358. document.getElementById('username').value = "";
  359. document.getElementById('password').value = "";
  360. document.getElementById('script').value = "";
  361.  
  362. }
  363. function toggle(){
  364. var elem = document.getElementsByClassName('panel-body')[2];
  365. elem.style.display = elem.style.display == 'none' ? 'block' : 'none';
  366. }
  367. </script>
  368. <div class="container-fluid">
  369. <div class="row">
  370. <div class="col-lg-3 text-center">
  371. <hr>
  372. <p><small>&copy; <?= date('Y') ?> <a href="https://theproxyguru.com/" target="_blank">TheProxyGuru</a></small></p>
  373.  
  374. </html>
Add Comment
Please, Sign In to add comment