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

        End Try

 

 

        Try

            ''''启动新程序

            System.Diagnostics.Process.Start(strUrl)

            ''''结束当前京城

            Me.Dispose()

        Catch ex As Exception

 

 

        End Try

 

 

 

 

    End Sub

 

 

 

 

    Private Sub FrmMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        ''''显示是否配置 以及配置结果

        Me.tb_myConfig.Text = reanConfig(Application.ExecutablePath)

        If SeekPostion(Application.ExecutablePath) = 0 Then

            Me.l_res.Text = "该程序没有被配置过!"

        Else

            Me.l_res.Text = "该程序已经被配置过了!"

        End If

    End Sub

 

 

 

 

 

 

 

 

    Function SeekPostion(ByVal strPath As String) As Integer

        Dim ip As Integer = 0 ''''位置

 

 

        Dim ms As IO.FileStream

        Dim br As IO.BinaryReader

        Try

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

            br = New IO.BinaryReader(ms)

            ''''读取文件

            Dim b() As Byte = br.ReadBytes(ms.Length)

 

 

            Dim ic As Integer

            For i As Integer = 0 To b.Length - 5

                ic = i

                ''''这里检查标志,就是上面连续写2个 vbcrlf  vbcrlf

                If b(ic) = 13 And b(ic + 1) = 10 And b(ic + 3) = 13 And b(ic + 4) = 10 Then

                    ip = ic

                    Exit For

                End If

            Next

 

 

        Catch ex As Exception

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

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