利用代碼制作電腦中毒假象


電腦中有很多私人的秘密,很多時候不願意被別人看到,但是同事要用,又不好意思不借,你有沒有過這樣的經歷呢?接下來小編教大家利用代碼創建高風格鎖屏方式,讓別人誤以為電腦中毒,看誰還敢動我的電腦。

啟動后屏幕上會不斷閃爍如圖的效果:

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了。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM