Last active
December 11, 2015 05:38
-
-
Save pingyen/4553100 to your computer and use it in GitHub Desktop.
document.write Hijacking
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
<div id="target" ></div> | |
<script> | |
var google_ad_client = 'ca-pub-1821434700708607', | |
google_ad_slot = '2826960791', | |
google_ad_width = 728, | |
google_ad_height = 90; | |
(function() { | |
var w = document.write; | |
document.write = function(str) { | |
if(str.substr(0, 5) === '<ins ') | |
document.getElementById('target').innerHTML = str; | |
document.write = w; | |
} | |
})(); | |
</script> | |
<script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" ></script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment