Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Download a .NET assembly, and execute a static, parameterless method.
Language:
Ada
Assembly
Bash
C#
C++ (gcc)
C++ (clang)
C++ (vc++)
C (gcc)
C (clang)
C (vc)
Client Side
Clojure
Common Lisp
D
Elixir
Erlang
F#
Fortran
Go
Haskell
Java
Javascript
Kotlin
Lua
MySql
Node.js
Ocaml
Octave
Objective-C
Oracle
Pascal
Perl
Php
PostgreSQL
Prolog
Python
Python 3
R
Rust
Ruby
Scala
Scheme
Sql Server
Swift
Tcl
Visual Basic
Layout:
Vertical
Horizontal
//Download a .NET assembly, and execute a static, parameterless method. using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; using System.Net; using System.Reflection; namespace Rextester { public class Program { public static void Main(string[] args) { string in_url = Console.ReadLine(); string in_class = Console.ReadLine(); string in_method = Console.ReadLine(); WebClient wc = new WebClient(); byte[] data = wc.DownloadData(in_url); Assembly asm = Assembly.Load(data); Type typ = asm.GetType(in_class); MethodInfo proc = typ.GetMethod(in_method); proc.Invoke(null,null); } } }
Enter URL here. Enter class name here. Enter method name here.
Show compiler warnings
[
-
]
Show input
edit mode
|
history
|
discussion