Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $username = "user";
- $password = "password";
- if(isset($_POST['username']) && $_POST['password'])
- {
- if($_POST['username'] == $username && $_POST['password'] == $password)
- {
- $_SESSION['user'] = $username;
- }
- else{
- header( "refresh:1" );
- }
- }
- if($_SESSION['user'])
- {
- ?>
- <html>
- <head>
- <title>Rebooting Server</title>
- </head>
- <body>
- <h1>Rebooting Server</h1>
- <pre>
- <?php passthru("/usr/bin/sudo /root/resolve.sh"); ?>
- </pre>
- </body>
- </html>
- <?php
- }
- else{
- ?>
- <html>
- <head>
- <title>Rebooting Server</title>
- </head>
- <body>
- <h1>LOGIN</h1>
- <form action="" method="">
- <input type="text" name="username">
- <input type="text" name="password">
- <input type="submit" name="login">
- </form>
- </body>
- </html>
- <?php
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement