[JS]Protect 2.0(一个保护你的js不被圈钱带神使用的js)(已更新)
-

欢迎来到ProtectJS 2.0版本
这个是面向JS开发者的若想使用需要有一些JS基础
作者
- mumy:开发制作
- Cookie:提供灵感
- As丶One:开创者
什么是ProtectJS
ProtectJS可以用来保护你自己的JS不被他人随便利用
我该怎么使用它?
将下载来的压缩包里的JS解压到你LiquidBounce配置里的script/lib目录下(若没有该目录请创建)
然后在你所需要保护的JS里调用这个函数来判断是否检查到相对应的内容script.import("lib\\Protect 2.0.js"); //导入此JS,若失败则报错 /*此版本可提供的检查*/ protect({ global: [], //全局 texts: [], //hud文本 fonts: [], //字体 titles: [], //游戏标题 values: [], //设置值 scripts: [], //脚本 modules: [], //功能 settings: [], //设置 category: [], //功能分区 mods: [], //mod names: [], //名称 resourcepacks: [] //材质 }); //正常返回true,否则返回false如果检查到了则返回false,反之为true,至于返回false如何处理取决于你自己
完整的JS示例
var scriptName = "AntiBotScript"; var scriptVersion = 0.1; var scriptAuthor = "mumy++"; var EntityUtils = Java.type("net.ccbluex.liquidbounce.utils.EntityUtils"); //导入EntityUtils类 function AntiBotScript() { this.getName = function() { return "AntiBotScript"; } this.getDescription = function() { return "AntiBot-Script, By-mumy"; } this.getCategory = function() { return "Misc"; } this.onUpdate = function() { var entityList = mc.theWorld.loadedEntityList; //获取加载到的实体列表 for (var i in entityList) { //循环遍历列表 var entity = entityList[i]; //声明entity变量指向当前实体 if (EntityUtils.isSelected(entity, true)) { //使用EntityUtils类的公开静态方法来判断结果是否为假人 mc.theWorld.removeEntity(entity); //删除实体 } } } } function onLoad() {} function onEnable() { script.import("lib\\Protect 2.0.js"); //导入保护js var flag = protect({ scripts: ["AsAntiBot"] //这里选择一个js作为检查对象,如果该js存在则返回false }); //调用保护函数,如果正常返回true,否则返回false if (!flag) { //如果返回为false则取消加载js return; } client = moduleManager.registerModule(new AntiBotScript()); } function onDisable() { moduleManager.unregisterModule(client); }
历史版本
- ProtectJS lib接口版 https://forums.ccbluex.net/topic/1688
下载
后传
关于这个Protect的一些故事
Cookie:“你知道为什么我是创作灵感吗”
Cookie:“我对As丶One说可以绑定图片来防止别人使用”
Cookie:“As丶One就做了”
//当时As丶One写AsFly时Cookie提出的一个主意
//最初版Protect就是这么来的后来AsFly被解码就开源了,Protect独立出来成为一个JS
这个JS自从上一次发布了lib接口版后时隔近一年才再次更新
不过这个JS圈子可能不怎么需要这类JS了,所以我不确定这JS能否继续被采用文稿by mumy(有些烂请见谅*)
-

欢迎来到ProtectJS 2.0版本
这个是面向JS开发者的若想使用需要有一些JS基础
作者
- mumy:开发制作
- Cookie:提供灵感
- As丶One:开创者
什么是ProtectJS
ProtectJS可以用来保护你自己的JS不被他人随便利用
我该怎么使用它?
将下载来的压缩包里的JS解压到你LiquidBounce配置里的script/lib目录下(若没有该目录请创建)
然后在你所需要保护的JS里调用这个函数来判断是否检查到相对应的内容script.import("lib\\Protect 2.0.js"); //导入此JS,若失败则报错 /*此版本可提供的检查*/ protect({ global: [], //全局 texts: [], //hud文本 fonts: [], //字体 titles: [], //游戏标题 values: [], //设置值 scripts: [], //脚本 modules: [], //功能 settings: [], //设置 category: [], //功能分区 mods: [], //mod names: [], //名称 resourcepacks: [] //材质 }); //正常返回true,否则返回false如果检查到了则返回false,反之为true,至于返回false如何处理取决于你自己
完整的JS示例
var scriptName = "AntiBotScript"; var scriptVersion = 0.1; var scriptAuthor = "mumy++"; var EntityUtils = Java.type("net.ccbluex.liquidbounce.utils.EntityUtils"); //导入EntityUtils类 function AntiBotScript() { this.getName = function() { return "AntiBotScript"; } this.getDescription = function() { return "AntiBot-Script, By-mumy"; } this.getCategory = function() { return "Misc"; } this.onUpdate = function() { var entityList = mc.theWorld.loadedEntityList; //获取加载到的实体列表 for (var i in entityList) { //循环遍历列表 var entity = entityList[i]; //声明entity变量指向当前实体 if (EntityUtils.isSelected(entity, true)) { //使用EntityUtils类的公开静态方法来判断结果是否为假人 mc.theWorld.removeEntity(entity); //删除实体 } } } } function onLoad() {} function onEnable() { script.import("lib\\Protect 2.0.js"); //导入保护js var flag = protect({ scripts: ["AsAntiBot"] //这里选择一个js作为检查对象,如果该js存在则返回false }); //调用保护函数,如果正常返回true,否则返回false if (!flag) { //如果返回为false则取消加载js return; } client = moduleManager.registerModule(new AntiBotScript()); } function onDisable() { moduleManager.unregisterModule(client); }
历史版本
- ProtectJS lib接口版 https://forums.ccbluex.net/topic/1688
下载
后传
关于这个Protect的一些故事
Cookie:“你知道为什么我是创作灵感吗”
Cookie:“我对As丶One说可以绑定图片来防止别人使用”
Cookie:“As丶One就做了”
//当时As丶One写AsFly时Cookie提出的一个主意
//最初版Protect就是这么来的后来AsFly被解码就开源了,Protect独立出来成为一个JS
这个JS自从上一次发布了lib接口版后时隔近一年才再次更新
不过这个JS圈子可能不怎么需要这类JS了,所以我不确定这JS能否继续被采用文稿by mumy(有些烂请见谅*)
@cookiechinese What is this supposed to be
-
help me i cant configure this
read the thread again
-
@mxmblee And why do you want someone to teach you on how to use this? Are you gonna make a script?
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login