Skip to content

Instantly share code, notes, and snippets.

@treeder
Created July 25, 2012 00:28
Show Gist options
  • Select an option

  • Save treeder/3173612 to your computer and use it in GitHub Desktop.

Select an option

Save treeder/3173612 to your computer and use it in GitHub Desktop.
Code for .NET blog post
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] );
}
}
}
}
runtime 'mono'
exec 'hello.exe'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment