1 Star 0 Fork 0

marud / EasyProtectorDemo

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

本插件基于知名开源Android检测刷子党库EasyProtector封装

EasyProtector Github地址:https://github.com/lamster2018/EasyProtector

体验检测能力

安装Demo的Apk,快速体验检测能力

链接下载:点我下载安装Demo Apk

扫码下载

扫码下载

拥有羊毛党、模拟器、是否root、Xposed、多开环境等等十多项检测能力💨🚀

方法快速一览

  • checkByPrivateFilePath
  • checkByOriginApkPackageName
  • checkByMultiApkPackageName
  • checkByHasSameUid
  • checkByPortListening
  • checkIsRunningInVirtualApk
  • checkIsRoot
  • checkIsDebug
  • checkIsUsbCharging
  • checkIsDebuggerConnected
  • checkIsBeingTracedByC
  • checkIsXposedExist
  • checkIsRunningInEmulator

快速上手

安装原生插件

打开插件详情页,点击云打包按钮,然后导入到自己想要使用的项目

manifest.json -> App原生插件配置 ->云端插件 选择EasyProtector

导入EasyProtector插件
const easyProtector = uni.requireNativePlugin('easy-protector');
使用EasyProtector插件
const easyProtector = uni.requireNativePlugin('easy-protector');

export default {
  data() {
    return {
      title: 'Hello',
      out: "",
    }
  },

  onLoad() {
    this.log("easyProtector exist" + JSON.stringify(easyProtector))
  },

  methods: {

    checkByPrivateFilePath(){
      let ret = easyProtector.checkByPrivateFilePath();
      this.log("checkByPrivateFilePath:" + ret);
    },

    checkByOriginApkPackageName(){
      let ret = easyProtector.checkByOriginApkPackageName();
      this.log("checkByOriginApkPackageName:" + ret);
    },

    /**
	 * 运行被克隆的应用,该应用会加载多开应用的so库
	 * 检测已经加载的so里是否包含这些应用的包名
	 */
    checkByMultiApkPackageName(){
      let ret = easyProtector.checkByMultiApkPackageName();
      this.log("checkByMultiApkPackageName:" + ret);
    },

    /**
	  * Android系统一个app一个uid
	  * 如果同一uid下有两个进程对应的包名,在"/data/data"下有两个私有目录,则该应用被多开了
	  */
    checkByHasSameUid(){
      let ret = easyProtector.checkByHasSameUid();
      this.log("checkByHasSameUid:" + ret);
    },

    /**
	 * 端口监听,先扫一遍已开启的端口并连接,
	 * 如果发现能通信且通信信息一致,
	 * 则认为之前有一个相同的自己打开了(也就是被多开了)
	 * 如果没有,则开启监听
	 * 这个方法没有 checkByCreateLocalServerSocket 方法简单,不推荐使用
	 */
    checkByPortListening(){
      easyProtector.checkByPortListening();
      this.log("checkByPortListening:call");
    },

    checkIsRunningInVirtualApk(){
      let ret = easyProtector.checkIsRunningInVirtualApk();
      this.log("checkIsRunningInVirtualApk:" + ret);
    },

    checkIsRoot(){
      let ret = easyProtector.checkIsRoot();
      this.log("checkIsRoot:" + ret);
    },

    checkIsDebug(){
      let ret = easyProtector.checkIsDebug();
      this.log("checkIsDebug:" + ret);
    },

    checkIsUsbCharging(){
      let ret = easyProtector.checkIsUsbCharging();
      this.log("checkIsUsbCharging:" + ret);
    },

    checkIsDebuggerConnected(){
      let ret = easyProtector.checkIsDebuggerConnected();
      this.log("checkIsDebuggerConnected:" + ret);
    },

    checkIsBeingTracedByC(){
      easyProtector.checkIsBeingTracedByC();
      this.log("checkIsBeingTracedByC:call");
    },

    /**
	 * 检测Xposed是否存在
	 */
    checkIsXposedExist(){
      let ret = easyProtector.checkIsXposedExist();
      this.log("checkIsXposedExist:" + ret);
    },

    /**
	 * 检测模拟器环境
	 * 
	 * suspectCount 为嫌疑值,值越大模拟器的嫌疑越高
	 */
    checkIsRunningInEmulator(){
      easyProtector.checkIsRunningInEmulator((ret)=>{
        this.log("checkIsRunningInEmulator:" + ret);
      });
    },

    log(text){
      let now = new Date();
      let time = now.getHours() + ":" + now.getMinutes() + ":" + now.getSeconds();
      this.out = (time+": "+text) +"\n\n"+ this.out;
    },
  }
}
完整Demo下载

Github地址:https://github.com/fengerwoo/EasyProtectorDemo

加入交流群

扫码加我微信加入微信交流群(请备注:羊毛党检测Uni插件)




🤗 🤗 🤗 如果对您有帮助,请在本Uni插件右上角、EasyProtector源库 进行Star|点赞




MIT License Copyright (c) 2020 easy-protector Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

暂无描述 展开 收起
Vue 等 4 种语言
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/TTwei/EasyProtectorDemo.git
git@gitee.com:TTwei/EasyProtectorDemo.git
TTwei
EasyProtectorDemo
EasyProtectorDemo
master

搜索帮助