ssh.php 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <?php
  2. date_default_timezone_set('Asia/Kuala_Lumpur');
  3. $tgl=date('Y-m-d');
  4. $habis= date('Y-m-d', strtotime($tgl. ' + 30 days'));
  5. if(isset($_POST['submit'])){
  6. $user=$_POST['user'];
  7. $pass=$_POST['pass'];
  8. $type = '/bin/false -m';
  9. $connection = ssh2_connect('101.99.65.127', 22);
  10. }
  11. if (ssh2_auth_password($connection, 'root', '151007ad')) {
  12. //$result = ssh2_exec($connection, "useradd -e `date -d '30 days' +'%Y-%m-%d'` $user -s $type; { echo $pass; echo $pass; } | passwd $user; usermod -c $kaka $user");
  13. $result = ssh2_exec($connection, "useradd -e `date -d '30 days' +'%Y-%m-%d'` $user; { echo $pass; echo $pass; } | passwd $user;");
  14. }
  15. ?>
  16. <!DOCTYPE html>
  17. <html lang="en">
  18. <head>
  19. <meta charset="utf-8">
  20. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  21. <meta name="viewport" content="width=device-width, initial-scale=1">
  22. <meta name="description" content="Create Account for SGDO By SoneD InjectoR">
  23. <meta name="keywords" content="Create Account for SGDO By SoneD InjectoR"/>
  24. <meta name="author" content="ssh.mastahit.com">
  25. <meta name="rating" content="general"/>
  26. <meta name="distribution" content="global"/>
  27. <meta name="copyright" content="ssh.mastahit.com"/>
  28. <title>Create Account For SSH SGDO</title>
  29. <link href="http://ssh.mastahit.com/css/bootstrap.min.css" rel="stylesheet">
  30. <link href="http://ssh.mastahit.com/css/custom.css" rel="stylesheet">
  31. <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
  32. <script src="https://use.fontawesome.com/f84acb2433.js"></script>
  33. <script src="http://ssh.mastahit.com/js/sshmastahit.js"></script>
  34. </head>
  35. <body>
  36. <div class="container">
  37. <div class="page-header">
  38. <center>
  39. <h1 style="color:#FFA500">Create Premium SSH Account for SGDO</h1>
  40. </center>
  41. </div>
  42. <div class="col-md-6">
  43. <?php
  44. if ($result) {
  45. echo "Host: ip";
  46. echo "<br>";
  47. echo "Port: 443";
  48. echo "<br>";
  49. echo "Username: $user";
  50. echo "<br>";
  51. echo "Password: $pass";
  52. }else{
  53. }
  54. ?>
  55. <form method="POST">
  56. <div class="input-group">
  57. <span class="input-group-addon">Username</span>
  58. <input name="user" type="text" class="form-control" maxlength="12" placeholder="Username" id="user" required="required">
  59. </div>
  60. <div class="input-group">
  61. <span class="input-group-addon">Password</span>
  62. <input name="pass" type="text" class="form-control" placeholder="Password" id="pass" required="required">
  63. </div>
  64. <button name="submit" class="btn btn-warning btn-block" id="submit" type="submit">Create Account</button>
  65. </form>
  66. </div><br>
  67. </div>
  68. </body>
  69. </html>