Last active
July 3, 2018 21:33
-
-
Save rchatterjee/0a1c5a4e46c6850dbf081cce6d19642b to your computer and use it in GitHub Desktop.
A more correct way to do safe exit buttons in IPV websites. Safe exit buttons allow users to quickly hide their browsing activity from their perpetrators by redirecting to a innocuous looking website. `window.location.replace` function works for this. Though this does not hide internal redirects --- redirect inside a domain. To hide those, the b…
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
<!HTML> | |
<head> | |
<script> | |
function exit(e) { | |
window.location.replace("https://www.google.com"); | |
} | |
</script> | |
</head> | |
<body> | |
<?php | |
if ($HTTP_GET_VARS["redir"] != "") { | |
print("<span> Argument: ". $HTTP_GET_VARS['hello'] . "</span>"); | |
} else { | |
print("<a href=\"/a.php?redir=1\">redir1</a>"); | |
} | |
?> | |
<div> | |
<button name="Button" onclick="exit(this)">Exit Site</button> | |
</div> | |
</body> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment