JS 网页键盘钩子

使用write技术把脚本和代码写入文件,即使查看原文及也无法看到原代码,下面是具体的代码,直接保存就可以运行
============================================================================
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head></head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<body>


<script type="text/javascript" language="javascript">
<!--
//meng
function fnKeyup(event)
{
switch(show)
{
case 0x0000:
{
if(event.ctrlKey && event.altKey && event.keyCode==0x4d)
show |= 0x1000;
else
show=0;
}
break;
case 0x1000:
{
if(event.ctrlKey && event.altKey && event.keyCode==0x45)
show |= 0x0100;
else
show=0;
}
break;
case 0x1100:
{
if(event.ctrlKey && event.altKey && event.keyCode==0x4e)
show |= 0x0010;
else
show=0;
}
break;
case 0x1110:
{
if(event.ctrlKey && event.altKey && event.keyCode==0x47)
show |= 0x0001;
else
show=0;
}
}


if(show==010421)
{71697871
if(show&4096==4096)
document.getElementById("div00000077").style.display="";
if(show&256==256)
document.getElementById("div00000069").style.display="";
if(show&16==16)
document.getElementById("div00000078").style.display="";
if(show&1==1)
document.getElementById("div00000071").style.display="";
if(show&4369==4369)
document.getElementById("btn77697871").style.display="";
show=0;
}
if(event.ctrlKey && event.altKey && event.keyCode==0x48)
{
document.getElementById("div00000077").style.display="none";
document.getElementById("div00000069").style.display="none";
document.getElementById("div00000078").style.display="none";
document.getElementById("div00000077").style.display="none";
document.getElementById("btn77697871").style.display="none";
}
}
// 捕获系统的Keyup事件
// 如果是Mozilla系列浏览器
if (document.addEventListener)
document.addEventListener("keyup",fnKeyup,true);
else
document.attachEvent("onkeyup",fnKeyup);
var show = 0;
//-->

</script>


<div id=div00000077 style="display:none">
<div id=div00000069 style="display:none">
<div id=div00000078 style="display:none">
<div id=div00000071 style="display:none">
<input id=btn77697871 type=button value="meng" style="display:none" />
</div></div></div></div>

</body>
</html>

posted on 2013-08-30 12:26  jack_Meng  阅读(1340)  评论(0编辑  收藏  举报

导航