Protect JS Lib接口版(保护你的JS不被圈钱带神所利用)
-
若想使用需要一定JS基础。欢迎来到Protect JS Lib版本!
作者:
mumy: 重新制作,As丶One:最初版开发,Cookie:更新我该如何使用它?
将此解压到Liquidbounce/script目录里
将你所需保护的JS添加以下内容function protect() { var label = { global: ["(全局关键词)"], hud: { text: ["(HUD的关键词)"] }, title: { title: ["(标题的关键词)"] } }; try { return (script.import("lib/protectFunction[simplified].js"), inspection(label)); } catch (err) { return false; } } //如果检查到异常就返回false反之true
Global为全局变量
假如我要检测 内部 这俩字
示例:function protect() { var label = { global: ["内部", "内", "部"], hud: { text: [] }, title: { title: [] } }; try { return (script.import("lib/protectFunction[simplified].js"), inspection(label)); } catch (err) { return false; } } //如果检查到异常就返回false反之true
整体JS示例展示:
var scriptName = "AntiBotScript"; var scriptVersion = 1.0; var scriptAuthor = "mumy & Cookie"; var EntityUtils = Java.type('net.ccbluex.liquidbounce.utils.EntityUtils'); var AntiBotScript = new AntiBotScript(); var client; function protect() { var label = { global: ["(全局关键词)"], hud: { text: ["(HUD的关键词)"] }, title: { title: ["(标题的关键词)"] } }; try { return (script.import("lib/protectFunction[simplified].js"), inspection(label)); } catch (err) { return false; } } //如果检查到异常就返回false反之true function AntiBotScript() { var flag = !protect(); //声明一个变量来记录是否异常 this.getName = function() { return "AntiBotScript"; } this.getDescription = function() { return "Example By mumy & Cookie"; } this.getCategory = function() { return "Misc"; } this.getTag = function() { return "Custom"; } this.onUpdate = function() { if (flag) { return; //如果异常将不执行 } var list = mc.theWorld.loadedEntityList; for (var i in list) { var entity = list[i]; if (EntityUtils.isSelected(entity, true)) { mc.theWorld.removeEntity(entity); } } } } function onLoad() {} function onEnable() { client = moduleManager.registerModule(AntiBotScript); } function onDisable() { moduleManager.unregisterModule(client); }
Silence对接检测:
function protect() { var label = { global: ["内部", "内", "部","夜","Silence","-1000","CoCoA"], hud: { text: ["X: [ %x% ] Y: [ %y% ] Z: [ %z% ]","Date: [ %date%-%time% ]"] }, title: { title: ["Fix Teams and Animations"] } }; try { return (script.import("lib/protectFunction[simplified].js"), inspection(label)); } catch (err) { return false; } }
官方推荐检测:
function protect() { var label = { global: ["AsFly2", "AsFly_", "HytFly", "内部", "群", "group", "ruanhe", "revel", "时", "分", "秒", "魔", "暴", "sense", "Launcher", "fanqie", "QQ", "xiaoda", "liquidcold", "rosalba", "liying", "LGY", "cherryhacker", "渣", "内", "Cynicism", "Nightsky", "甲", "妈", "血", "妖", "灵", "RMB", "Group", "Belphegor", "商", "实", "体", "费", "Alan", "QQ", "号", "群", "爆", "L配", "爹", "龟", "马", "杀妈", "vape"], hud: { text: ["内部","付费","钱","money"] }, title: { title: [] } }; try { return (script.import("lib/protectFunction[simplified].js"), inspection(label)); } catch (err) { return false; } }
此Lib包含什么检测?
标题检测
群号检测
界面检测
功能检测
关键词检测
.........检测到的配置会有什么惩罚?
Protect JS当检测到违禁词时会让你的JS失效,从而导致他人无法使用下载:
Protect Lib.zip -
@cookiechinese 正在进行重写
-
This post is deleted!
-
This post is deleted!
-
@cookiechinese 已更新
-