Skip to content

Instantly share code, notes, and snippets.

@rchatterjee
Last active July 3, 2018 21:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rchatterjee/0a1c5a4e46c6850dbf081cce6d19642b to your computer and use it in GitHub Desktop.
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…
<!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