API.cs
(开头部分) 11KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Text.RegularExpressions;
using System.Net;
using System.Text;
using System.IO;
using System.Collections.Specialized;
using System.Xml;
using System.Reflection;
public class API
{
public static int CountThread = 0;
public static WebAPI WebAPI = null;
public static string noTagHtml(string str, string tagname)
{
string zz = @"(<" + tagname + ".*?>)|(</" + tagname + ">)";
if (tagname == "script") zz = "(<" + tagname + ".*?>)*(</" + tagname + ">)";
Regex r = new Regex(zz, RegexOptions.IgnoreCase | RegexOptions.Singleline);
str = r.Replace(str, "");
return (str);
}
public static void ParameterValidation(string list)
{
return;
string[] value = list.Split(',');
for (int i = 0; i < value.Length; i++)
{
if (HttpContext.Current.Request.Form[value[i]] == null)
{
HttpContext.Current.Response.Write("{errno:-1,errmsg:'缺少参数:" + value[i] + "'}");
HttpContext.Current.Response.End();
}
}
}
#region 取得两个符串中间的部分
public static string GetStrFG(string str1, string headstr, string endstr)
{
MatchCollection mc;
Regex r = new Regex(@"(?<=" + headstr + ").*?(?=" + endstr + ")", RegexOptions.Singleline | RegexOptions.IgnoreCase); //定义一个Regex对象实例
mc = r.Matches(str1);
if (mc.Count > 0) return (mc[0].Value); else { return (""); }
}
#endregion
public static string DBStringToNormal(string dbStr)
{
byte[] str = new byte[dbStr.Length];
for (int i = 0; i < dbStr.Length; ++i)
str[i] = (byte)(dbStr[i]);
return System.Text.Encoding.UTF8.GetString(str, 0, dbStr.Length);
}
public static string readUrl(string url, Encoding Encoding, string wp)
{
后面还有 260 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。