火车头采集器随机插入字符,以混淆AI检测的C#脚本

p标签之间随机插入。用测检IA淆混 .换行符 br / ,不要紧跟 p 后和 /p 之前,少于20字符或内有其他标签(如img)的则不插入. 混淆AI检测用。

其他字符自行测试。试测行。


}sing System;
using System.Text.RegularExpressions;
using System.Collections.Generic;
using SpiderInterface;
class LocoyCode
public string Run(string content, ResponseEntry response)
// 定义正则表达式,匹配符合条件的 p 标签及其内部内容
Regex regex = new Regex(@" p\b[^ ]* (.*?) \/p ", RegexOptions.IgnoreCase);
// 在每个匹配的 p 标签内部的内容中插入一个 br / 标签
string result = regex.Replace(content, match = 
// 获取 p 标签内部的内容
string innerContent = match.Groups[1].Value;
// 检查内容是否包含其他标签
if (!Regex.IsMatch(innerContent, @" [^ ]+ ") innerContent.Trim().Length = 20)
// 生成随机插入位置,范围是从0到当前内容的长度
int insertIndex = new Random().Next(innerContent.Length);
// 如果插入位置是句子的最后一个字符,则将插入位置向前移动一个位置
if (insertIndex == innerContent.Length - 1)
insertIndex--;
// 在当前行的随机位置插入一个 br / 标签
innerContent = innerContent.Insert(insertIndex, " br / 
// 返回带有 br / 标签的 p 内容
return " p " + innerContent + " /p 
return result;
}

版权声明:火车头采集器随机插入字符,以混淆AI检测的C#脚本 系墨家SEO原创发布
转载时请以链接形式注明文章出处:https://mihxws.cn/aiqing-146245.html
未注明出处链接视为侵权。对于任何侵犯版权的行为,我们将依法采取措施,并保留追诉法律责任的权力