利用代码制作电脑中毒假象
电脑中有很多私人的秘密,很多时候不愿意被别人看到,但是同事要用,又不好意思不借,你有没有过这样的经历呢?接下来小编教大家利用代码创建高风格锁屏方式,让别人误以为电脑中毒,看谁还敢动我的电脑。
启动后屏幕上会不断闪烁如图的效果:

1、首先在新建一个文本文档,复制、粘贴代码
<html>
<head>
<hta:APPLICATION
CAPTION="no"
SCROLL="no"
SHOWINTASKBAR="no"
INNERBORDER="no"
CONTEXTMENU="no"
BORDER="none"
SINGLEINSTANCE="yes"
WINDOWSTATE="maximize"
>
<title></title>
<script>
var timer = 100;
var randDiv = new Array(100);
window.onload = function()
{
for(var i = 0; i < randDiv.length; i++)
{
randDiv[i] = document.createElement("DIV");
randDiv[i].style.cssText = "filter:progid:DXImageTransform.Microsoft.Alpha(opacity=50);";
randDiv[i].style.position = "absolute";
randDiv[i].style.background = GetRandomColor();
document.body.appendChild(randDiv[i]);
}
Fun();
}
function Fun()
{
for(var i = 0; i < randDiv.length; i++)
{
randDiv[i].style.top = Math.floor(Math.random() * window.screen.height);
randDiv[i].style.left = Math.floor(Math.random() * window.screen.width);
randDiv[i].style.width = Math.floor(Math.random() * 100);
randDiv[i].style.height = Math.floor(Math.random() * 100);
randDiv[i].style.background = GetRandomColor();
}
setTimeout("Fun()", timer);
}
function GetRandomColor()
{
var r = Math.floor(Math.random() * 255).toString(16);
var g = Math.floor(Math.random() * 255).toString(16);
var b = Math.floor(Math.random() * 255).toString(16);
r = r.length == 1 ? "0" + r : r;
g = g.length == 1 ? "0" + g : g;
b = b.length == 1 ? "0" + b : b;
return "#" + r + g + b;
}
</script>
</head>
<body>
</body>
</html>
2、保存记事本文档,把txt文件的后缀名txt改成hta
3、双击运行,屏幕会被覆盖,不断闪烁会随机出现不规则形状并附带颜色
此时,你的电脑看着像是中了病毒,鼠标点击任何地方都没有反应,其实就是这段代码运行后产生的效果。当你离开电脑时就可以运行代码,别人看了都以为是中毒了。
当然想要结束也是很简单的:在这种状态下按Ctrl+Alt+Delete键启动任务管理器——找到mshta——结束进程就OK了。

浙公网安备 33010602011771号