Admin/system/com/upfile.ashx
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<%@ WebHandler Language="C#" Class="upfile" %>
using System;
using System.Web;
public class upfile : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
context.Response.AddHeader("Content-Type", "text/html; charset=UTF-8");
string urlPath, savePath;
string[] ret = new string[context.Request.Files.Count];
string path = context.Request.QueryString.Get("type");
if (!System.IO.Directory.Exists(context.Server.MapPath("/uploads/" + path)))
{
System.IO.Directory.CreateDirectory(context.Server.MapPath("/uploads/" + path));
}
if (ret.Length > 0 && !string.IsNullOrEmpty(path))
{
for (int i = 0; i < ret.Length; i++)
{
string n = System.IO.Path.GetExtension(context.Request.Files[i].FileName);
n = UAP.Function.Datetime.GetStamp(true).ToString() + n;
urlPath = "/uploads/" + path + "/" + n;
savePath = context.Server.MapPath(urlPath);
try
{
context.Request.Files[i].SaveAs(savePath);
string ex = System.IO.Path.GetExtension(urlPath).ToLower();
ret[i] = "{\"error\":0,\"url\":\"" + urlPath + "\",\"name\":\"" + context.Request.Files[i].FileName + "\"}";
}
catch (Exception ue)
{
ret[i] = "{\"error\":1,\"message\":\"" + ue.Message + "\"}";
}
}
if (string.IsNullOrEmpty(context.Request.QueryString.Get("isk")))
{
path = "[" + string.Join(",", ret) + "]";
}
else
{
path = string.Join(",", ret);
}
context.Response.Write(path);
}
else
{
context.Response.Write("null");
}
}
public bool IsReusable
{
get
{
return false;
}
后面还有 2 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。