引:相信各位都接受过在机房被各种完整学过python或者简单学过C语言的大佬安排过,那么打不过就加入,今天就给大家带来一些简单易学的小代码,让各位在机房小装一波~
Ⅰ 无限弹窗
这个是利用了vbs脚本语言,是基于Visual Basic的脚本语言(Microsoft Visual Basic Script Edition),也就是BASIC可视化脚本版(记住这一段话可以在朋友面前浅装一波)。
首先新建一个文本文档,后缀名(扩展名)改成vbs,右键单击文件选择编辑,输入如下代码:
do
msgbox("关不掉吧关不掉吧")
loop
据测试哈,火绒安全防护软件会直接把文件移除,检测为“玩笑程序”,所以最好先把对方的杀毒软件关了(机房一般没有杀软)。如果对面的不会关进程,emmm……
Ⅱ 定时关机
很简单哈,新建一个快捷方式,在地址栏直接输入shutdown -s,确定之后双击就会在60秒之后自动关机了,解药是shutdown -a,可以在cmd里输入哈。
Ⅲ 花环
对电脑无害,新建一个文本文档,输入代码:
<!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>
<title>有一份礼物~</title>
<script type="text/javascript">
window.onload = function () {
C = Math.cos; // cache Math objects
S = Math.sin;
U = 0;
w = window;
j = document;
d = j.getElementById("c");
c = d.getContext("2d");
W = d.width = w.innerWidth;
H = d.height = w.innerHeight;
c.fillRect(0, 0, W, H); // resize <canvas> and draw black rect (default)
c.globalCompositeOperation = "lighter"; // switch to additive color application
c.lineWidth = 0.2;
c.lineCap = "round";
var bool = 0,
t = 0; // theta
d.onmousemove = function (e) {
if(window.T) {
if(D==9) { D=Math.random()*15; f(1); }
clearTimeout(T);
}
X = e.pageX; // grab mouse pixel coords
Y = e.pageY;
a=0; // previous coord.x
b=0; // previous coord.y
A = X, // original coord.x
B = Y; // original coord.y
R=(e.pageX/W * 999>>0)/999;
r=(e.pageY/H * 999>>0)/999;
U=e.pageX/H * 360 >>0;
D=9;
g = 360 * Math.PI / 180;
T = setInterval(f = function (e) { // start looping spectrum
c.save();
c.globalCompositeOperation = "source-over"; // switch to additive color application
if(e!=1) {
c.fillStyle = "rgba(0,0,0,0.02)";
c.fillRect(0, 0, W, H); // resize <canvas> and draw black rect (default)
}