Created
July 25, 2012 00:28
-
-
Save treeder/3173612 to your computer and use it in GitHub Desktop.
Code for .NET blog post
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.IO; | |
| using System.Linq; | |
| using System.Collections.Generic; | |
| using System.Web.Script.Serialization; | |
| public class HelloWorld | |
| { | |
| static public void Main(string[] args) | |
| { | |
| int ind = Array.IndexOf(args, "-payload"); | |
| if( ind >= 0 && (ind+1) < args.Length ){ | |
| string path = args[ind+1]; | |
| IDictionary<string,string> json = new JavaScriptSerializer().Deserialize <Dictionary<string, string>>(File.ReadAllText(path)); | |
| foreach (string key in json.Keys) | |
| { | |
| Console.WriteLine( key + " = " + json[key] ); | |
| } | |
| } | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| runtime 'mono' | |
| exec 'hello.exe' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment