打印本文 打印本文 关闭窗口 关闭窗口
vb.net实现木马注册机原理:动态配置exe
作者:武汉SEO闵涛  文章来源:敏韬网  点击数2832  更新时间:2009/4/23 19:00:11  文章录入:mintao  责任编辑:mintao

            Console.Write(ex.Message)

        Finally

            If Not ms Is Nothing Then

                ms.Close()

            End If

            If Not br Is Nothing Then

                br.Close()

            End If

        End Try

 

 

        Return ip

    End Function

 

 

    Private Function reanConfig(ByVal strPath As String) As String

        Dim Ip As Integer = SeekPostion(strPath)

        If Ip = 0 Then

            Return Nothing

        End If

 

 

        Dim ms As IO.FileStream

        Dim br As IO.BinaryReader

        Try

            ms = New IO.FileStream(Application.ExecutablePath, IO.FileMode.Open, IO.FileAccess.Read)

            br = New IO.BinaryReader(ms)

            br.ReadBytes(Ip + 5) ''''舍弃前面的数据

 

 

            ''''读取最后的数据!

            Return System.Text.Encoding.Default.GetString(br.ReadBytes(ms.Length - Ip - 5))

 

 

        Catch ex As Exception

            Console.Write(ex.Message)

            Return Nothing

        Finally

            If Not ms Is Nothing Then

                ms.Close()

            End If

            If Not br Is Nothing Then

                br.Close()

            End If

        End Try

 

 

    End Function

上一页  [1] [2] [3] 

打印本文 打印本文 关闭窗口 关闭窗口