Created
March 18, 2024 11:42
-
-
Save silversword411/df8bd3adb199a013e1aa7e07c7a1ede3 to your computer and use it in GitHub Desktop.
Revisions
-
silversword411 created this gist
Mar 18, 2024 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,67 @@ <?php session_start(); if (!isset($_SESSION['count'])) { $_SESSION['count'] = 1; $_SESSION['first'] = time(); } else { // Increase the Count $_SESSION['count']++; // Reset every so often if ($_SESSION['first'] < (time() - 60)) { $_SESSION['count'] = 1; $_SESSION['first'] = time(); } // Die if they have viewed the page too many times if ($_SESSION['count'] > 20) { die("You have submitted too many times. Wait 10 minutes and try again"); } } $logins[0]["pass"] = "mysecretpassword"; $logins[0]["redirect"] = "https://yahoo.com"; $logins[1]["pass"] = "otherpass"; $logins[1]["redirect"] = "otherpass.html"; $logins[2]["pass"] = "haveabreak"; $logins[2]["redirect"] = "https://kitkat.com"; // No need to edit below, except the errors if (isset($_POST['submit'])) { //is the form submitted? if (empty($_POST['pass'])) { echo "You have to fill in a password!"; exit; } //check for empty user name or password $is_logged = false; //this is part of the process to see if they have a correct password or not, set to false right here to say no right pass... (will change later) foreach ($logins as $login) { $user = $_POST; if (($user["pass"] == $login["pass"])) { $is_logged = true; header("Location: " . $login["redirect"]); exit; } } if (!$is_logged) { // Redirect to generic page if password doesn't match something header("Location: https://www.google.com/"); exit; } } ?> <body style="cursor: auto;"></body> <style type="text/css">body { background-image: url("backv1.jpg"); } </style> <h1><span style="font-family:Arial,Helvetica,sans-serif"><a href="https://www.google.com/"><img alt="" border="0" hspace="0" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAADAUExURZKTk9ra2tLS0v86OszMzP9nZ/78/GRkZKSkpOzs7MTExDo6OkpKSkJCQvHx8fn5+f/19ZiYmP9zc4GBgf+goGtra/8XF+Hh4f9NTVRUVL29vf/t7f+Li/9TU3Fxcf+8vIuLi1tbW3l5eeXl5bKysv+ZmX19ff/4+P9DQ/8mJrW2tv/Pz//Cwv+qqjU1Nf8EBPf397i5uf8LC/9dXf9+fv/n5/8CAjMzM/8AAP+dnf+EhJmdnf+Vlbq+vquwsP///1UA0vAAAABAdFJOU////////////////////////////////////////////////////////////////////////////////////wDCe7FEAAADjklEQVR42mKwJxEABBADqRoAAohkDQABhEMDmxo3N7eiOBYZgADCoYFJT0/PXE8QiwxAAOHUYA4E2CQBAgiHBhacGgACCEWMj0GNEURxMSiC1JvzCKsoA/kGgkpMcDUAAYSsgY/dXI+XyZ6DxxwO9LiFxdmUzM15WWCKAAIISYOBKNhURT1zFMDDDiJ5YXYABBCSBi5zfEABqgoggJA0KCM5hUeOwVpQWBLJMi2oKoAAQvYDE1SHHrshHyT6WIS5oUIcMEUAAYQSSlJgSV4VJCFGiJeE4QIAAYSiQQ4cLiwo4c4HCQplGB8ggJA1cOmBTDOEcASk1SEMTkVkP9sDBBCyBiWQBRDL5WXF9JkFkGKdhxOqCCCAkEOJF+QBUAoVYDUDAg2oFfbCICtgHgMIILgGNnsVuAWsFhYWZhICyClRTwnKAQggqAY+YXZ2HpDVUkCOjj5Qg4YAIglIgqxmZ2fnAnIAAgiqgQMaPdwgFwkB1VuoInlOFCqrCGQDBBBUgyBUiBcUYxogDawgYXUhGRClBot/IBsggLBoYGMGecHMCuh5YzNmNpivgf4AaQAIICxOAmsAAmNVZjMLWViEgoAkkA0QQFANyqI8PKBQBXnaVMwCAWyAkvwgT3Pz8PCAEiBAAMGClc3AngMUelxQP0OBpjQoPYFSgBw/Pz9IIUAAIUUcI7c5N9AMGST1YjpgNSCrYckVIICQNLCx6wHTkRVCub6GNtggkFu5GaGqAAIIOS0Z2sLdYyYhI6MKVm7PD86isIi2BwggtJJEyAxiNiLa+MGRwA0vNgACCFUD1Hx9S0SKhAQp3AJ7gABiwGY+XD0frMjh5YIJAQQQsqeh5huJ2NvbMahIGXKo8SDKJ1g+BAgghAY2Vqh7dO3trXEXMwABxICh3hJNPTfYGm6YmwACCKRBXUdVVYYZh3pJKT52PXNuQ5jBAAEE1CDPjBRXIP8yKcBKMB4lKWB64JSTlIK7HCCAGOxV9RHqQf4FAy2wemE2eEKDA4AAYpBHUm+hi1Kh6GGrHwACiMEYSb0EWg2ErcoCCCAGTQszWVUNiAYTRIIQNefW42HCogEggBiMzISAeVHCDFWDvQEjIyMntsoMIIAYJMCqBMAhZUVEPQ0QQAxsSMlOlwgNAAEEDQhTTVh+JAQAAgiiQZoZ5AcRYpoOAAHEAFEPimQZotoaAAEE1qAtZiQmIU9c4wQgwADMg+luLqj+JAAAAABJRU5ErkJggg==" style="border:0px solid black; height:48px; margin-bottom:0px; margin-left:0px; margin-right:0px; margin-top:0px; width:48px" vspace="0" /></a> IT Support</span></h1> <h3><span style="font-family:Arial,Helvetica,sans-serif"><form action="?php echo $_SERVER['PHP_SELF']; ?>" method="post">Enter password provided by support<br> <div"><input name="pass" type="password"><br> </div> <input name="submit" value="Submit" type="submit"> </form>