Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include 'config.php';
- include 'functions.php';
- ?>
- <!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>Servers Admin</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;
- }
- .ip{
- color:white;
- }
- </style>
- </head>
- <?php
- if(isset($_POST['update']))
- {
- $key = $_POST['key'];
- $secret = $_POST['secret'];
- $username = $_POST['username'];
- $password = $_POST['password'];
- $script = $_POST['script'];
- $text = '
- /* Show Errors
- ini_set("display_errors", 1);
- ini_set("display_startup_errors", 1);
- error_reporting(E_ALL);
- */
- $key = "'.$key.'";
- $secret = "'.$secret.'";
- $locations = array(
- "us-east-1" => array(
- "image" => "ami-52b88b38",
- "location" => "us-east-1"),
- "us-east-2" => array(
- "image" => "ami-b57356d0",
- "location" => "us-east-2"),
- "us-west-1" => array(
- "image" => "ami-b53545d5",
- "location" => "us-west-1"),
- "us-west-2" => array(
- "image" => "ami-5fd0323f",
- "location" => "us-west-2"),
- "ca-central-1" => array(
- "image" => "ami-92d865f6",
- "location" => "ca-central-1"),
- "eu-west-2" => array(
- "image" => "ami-4dfbe829",
- "location" => "eu-west-2"),
- "eu-west-3" => array(
- "image" => "ami-d64dfaab",
- "location" => "eu-west-3")
- );
- $username = "'.$username.'";
- $password = "'.$password.'";
- $script = "'.$script.'";
- ';
- file_put_contents('config.php', "<?php".$text."?>");
- }
- if(isset($_POST['list']))
- {
- $ips = listServers($locations, $key, $secret);
- }
- if(isset($_POST['create']))
- {
- $quantity = $_POST['quantity'];
- $location = $_POST['location'];
- $script = base64_encode($script);
- $imageID = $locations[$location]['image'];
- for($i=0;$i<$quantity;$i++)
- {
- createServer($location, $key, $secret, $imageID, 't2.micro', $script);
- }
- }
- if(isset($_POST['delete']))
- {
- terminateAll($locations, $key, $secret);
- }
- if(isset($_POST['trafficBtn']))
- {
- unblockEverthing($locations, $key, $secret);
- }
- if(isset($_POST['blockBtn']))
- {
- blockEverthing($locations, $key, $secret);
- }
- ?>
- <body>
- <!-- -->
- <div class="container-fluid">
- <div class="row">
- <div class="col-lg-3 text-center">
- <h6><a href="">Amazon AWS</a></h6>
- <hr>
- </div>
- </div>
- </div>
- <!-- -->
- <!-- -->
- <!-- -->
- <div class="container-fluid">
- <div class="row">
- <div class="col-lg-3">
- <div class="well">
- <?php
- if(isset($_POST['list']))
- {
- $listData = $_POST['userpass'];
- foreach($ips AS $IP)
- {
- $serverIP = $IP['IP'];
- echo '<span class=ip>'.$serverIP.''.$listData.'</span><br>';
- }
- }
- if(isset($_POST['create']))
- {
- if(isset($_POST['quantity']))
- {
- if(is_numeric($quantity))
- {
- if($quantity >= 1)
- {
- if(isset($_POST['location']))
- {
- echo "<span class=ip>Server's are now being created.</span><br>";
- }
- }
- }
- }
- }
- if(isset($_POST['delete']))
- {
- echo "<span class=ip>Servers have been deleted.</span><br>";
- }
- if(isset($_POST['trafficBtn']))
- {
- echo "<span class=ip>Traffic has been unblocked.</span><br>";
- }
- if(isset($_POST['blockBtn']))
- {
- echo "<span class=ip>Traffic has been blocked.</span><br>";
- }
- ?>
- </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">List</div>
- <div class="panel-body">
- <form class="form" method="post">
- <div class="form-group">
- <input class="form-control" id="userpass" type="text" name="userpass" placeholder=":port:user:pass">
- </div>
- <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><br>
- </div>
- </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">Create</div>
- <div class="panel-body">
- <form class="form" method="post">
- <div class="form-group">
- <input class="form-control" id="quantity" type="number" name="quantity" placeholder="Quantity ..." required>
- </div>
- <div class="form-group">
- <select class="form-control" id="location" name="location">
- <option value="us-east-1">United States (N. Virginia)</option>
- <option value="us-east-2">United States (Ohio)</option>
- <option value="us-west-1">United States (N. California)</option>
- <option value="us-west-2">United States (Oregon)</option>
- <option value="ca-central-1">Canada (Central)</option>
- <option value="eu-west-2">Europe (London)</option>
- <option value="eu-west-3">Europe (Paris)</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"></span></button>
- </form>
- </div>
- </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 <span <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">
- <?php if(isset($_POST['update'])) echo '<span class=ip>Info updated!</span><br>';?>
- <div class="form-group">
- <input class="form-control" id="key" type="text" name="key" placeholder="API Key" value="<?php echo htmlspecialchars($key,ENT_QUOTES);?>">
- </div>
- <div class="form-group">
- <input class="form-control" id="secret" type="text" name="secret" placeholder="API Secret" value="<?php echo htmlspecialchars($secret,ENT_QUOTES);?>">
- </div>
- <div class="form-group">
- <input class="form-control" id="username" type="text" name="username" placeholder="Username" value="<?php echo htmlspecialchars($username,ENT_QUOTES);?>">
- </div>
- <div class="form-group">
- <input class="form-control" id="password" type="text" name="password" placeholder="Password" value="<?php echo htmlspecialchars($password,ENT_QUOTES);?>">
- </div>
- <div class="form-group">
- <textarea rows="12" class="form-control" id="script" type="text" name="script" placeholder="Script"><?php echo htmlspecialchars($script,ENT_QUOTES);?> </textarea>
- </div>
- <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>
- <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>
- </form>
- </div>
- </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">Delete Proxies</div>
- <div class="panel-body">
- <form class="form" method="post">
- <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>
- </form>
- </div>
- </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">Unblock Firewall</div>
- <div class="panel-body">
- <form class="form" method="post">
- <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>
- </form>
- </div>
- </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">Block Firewall</div>
- <div class="panel-body">
- <form class="form" method="post">
- <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>
- </form>
- </div>
- </div>
- </div>
- </div>
- </div>
- -->
- </body>
- <script>
- function clearUpdate(){
- document.getElementById('key').value = "";
- document.getElementById('secret').value = "";
- document.getElementById('username').value = "";
- document.getElementById('password').value = "";
- document.getElementById('script').value = "";
- }
- function toggle(){
- var elem = document.getElementsByClassName('panel-body')[2];
- elem.style.display = elem.style.display == 'none' ? 'block' : 'none';
- }
- </script>
- <div class="container-fluid">
- <div class="row">
- <div class="col-lg-3 text-center">
- <hr>
- <p><small>© <?= date('Y') ?> <a href="https://theproxyguru.com/" target="_blank">TheProxyGuru</a></small></p>
- </html>
Add Comment
Please, Sign In to add comment