Created
November 20, 2014 14:11
-
-
Save stevenrombauts/8bd2a004b9c32c4c2a70 to your computer and use it in GitHub Desktop.
303redirect.php
This file contains 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 characters
<?php | |
// The original redirect target: | |
$redirect = 'http://www.lokalepolitie.be/administrator/5388?view=dashboard'; | |
// If the form is posted, return the following headers: | |
if ($_POST['_token']) | |
{ | |
header('HTTP/1.1 303 See Other'); | |
header('Connection: Keep-Alive'); | |
header('Content-Length: 265'); | |
header('Date: Tue, 07 Oct 2014 13:40:54 GMT'); | |
header('Location: '.$redirect); | |
header('Location: '.$redirect); | |
header('Content-Type: text/html; charset=utf-8'); | |
header('Server: nginx'); | |
header('Set-Cookie: 0f33c00a6438994496a25fca3a9103f8=08sslcjillatcilihvrgt49hvjc42agn96dtnam44t838f94gto1; path=/administrator; HttpOnly'); | |
header('Set-Cookie: 0f33c00a6438994496a25fca3a9103f8=1qcnosk7vfvhbjrgcktm85is96icu669ei6ac7v136bvruodpij0; path=/administrator; HttpOnly'); | |
header('Cache-Control: no-cache'); | |
header('Cache-Control: no-cache'); | |
header('Last-Modified: Tue, 07 Oct 2014 13:40:54 GMT'); | |
header('Last-Modified: Tue, 07 Oct 2014 13:40:54 GMT'); | |
header('Content-Encoding: gzip'); | |
header('Vary: Accept-Encoding'); | |
$output = <<<EOL | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<meta http-equiv="refresh" content="1;url=$redirect" /> | |
<title>Redirecting to $redirect</title> | |
</head> | |
<body> | |
Redirecting to <a href="$redirect">$redirect</a>. | |
</body> | |
</html><!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<meta http-equiv="refresh" content="1;url=$redirect" /> | |
<title>Redirecting to $redirect</title> | |
</head> | |
<body> | |
Redirecting to <a href="$redirect">$redirect</a>. | |
</body> | |
</html> | |
EOL; | |
echo $output; | |
exit(); | |
} | |
?> | |
<html> | |
<head></head> | |
<body> | |
<h1>Administrator Login</h1> | |
<form action="" method="post" name="login" id="form-login"> | |
<input type="hidden" name="_token" value="1940345a8ea4797ae26dd33e3eb6b2bb"/> | |
<input type="submit" class="btn btn-large btn-block" value="Login"/> | |
</form> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment