All Projects → xxxxue → Autojs_Rhino_Dex_Self

xxxxue / Autojs_Rhino_Dex_Self

Licence: other
😆 😆😆 魔改 Rhino. 将 js 转为 dex . 移除 js源码字段, 加密所有 字符串, 防止被轻易破解

Programming Languages

C++
36643 projects - #6 most used programming language
java
68154 projects - #9 most used programming language
javascript
184084 projects - #8 most used programming language
c
50402 projects - #5 most used programming language
perl
6916 projects
shell
77523 projects

Projects that are alternatives of or similar to Autojs Rhino Dex Self

auto-dragalia
🐲📱《失落的龙约》 [Auto.js](https://github.com/hyb1996/Auto.js) 辅助脚本 因游戏将停止运营而归档 archived due to the game about to end of life
Stars: ✭ 39 (-30.36%)
Mutual labels:  autojs
RhinoLink
Wolfram Language interface to Rhino3D
Stars: ✭ 23 (-58.93%)
Mutual labels:  rhino
Alipay
蚂蚁森林自动收取能量脚本
Stars: ✭ 25 (-55.36%)
Mutual labels:  autojs
Auto.js
A UiAutomator on android, does not need root access(安卓平台上的JavaScript自动化工具)
Stars: ✭ 10,882 (+19332.14%)
Mutual labels:  autojs
clipper
Implementation for the clipper library in rhino and grasshopper.
Stars: ✭ 55 (-1.79%)
Mutual labels:  rhino
firehopper
Rhino Grasshopper's RESTful interface for Google Firebase
Stars: ✭ 18 (-67.86%)
Mutual labels:  rhino
autolua
autolua支持安卓设备的找图找色,模拟点击,类似按键精灵,触动,autojs等软件的功能
Stars: ✭ 25 (-55.36%)
Mutual labels:  autojs
efw3.X
Ajax Framework By Server Side JavaScript for Java Web-App.
Stars: ✭ 16 (-71.43%)
Mutual labels:  rhino
Reader
一个自用的小说阅读器 kotlin 协程、rhino、Javascript
Stars: ✭ 20 (-64.29%)
Mutual labels:  rhino
gh-web-ui
Package for building web-based User Interfaces (UI) in Rhino Grasshopper.
Stars: ✭ 69 (+23.21%)
Mutual labels:  rhino
Ant Forest
基于 Auto.js 的蚂蚁森林能量自动收取脚本 Auto.js-based ant forest energy auto-collect script
Stars: ✭ 2,497 (+4358.93%)
Mutual labels:  autojs
dendro
volumetric modeling for grasshopper built on top of openvdb
Stars: ✭ 47 (-16.07%)
Mutual labels:  rhino
msgbots
Messenger Bot Simulator ( Rhino )
Stars: ✭ 17 (-69.64%)
Mutual labels:  rhino
autojs
autojs 脚本集
Stars: ✭ 12 (-78.57%)
Mutual labels:  autojs
LoboEvolution
Lobo Evolution Java Web Browser. Forks welcome!
Stars: ✭ 53 (-5.36%)
Mutual labels:  rhino
autojs-webView
autojs的webView实现,支持初始化脚本注入、jsBridge两端互调
Stars: ✭ 38 (-32.14%)
Mutual labels:  autojs
shareKakao
카카오톡 공유하기 모듈 - shareKakao
Stars: ✭ 25 (-55.36%)
Mutual labels:  rhino
rhino-secrets
A short overview on the secrets of Rhino 3D & Grasshopper.
Stars: ✭ 28 (-50%)
Mutual labels:  rhino
speckle-sharp
.NET SDK, Schema and Connectors: Revit, Rhino, Grasshopper, Dynamo, ETABS, AutoCAD, Civil3D & more.
Stars: ✭ 214 (+282.14%)
Mutual labels:  rhino
rhino-android
Give access to RhinoScriptEngine from the JSR223 interfaces on Android JRE.
Stars: ✭ 74 (+32.14%)
Mutual labels:  rhino

魔改 Rhino 1772

必要的 环境

  1. IDEA
  2. Java
  3. Gradle
  4. Android 的 dx.jar

autojs js脚本 转 dex

修改内容

去除源码字符串

加密所有字符串


加密入口类

mycode/main.java

js 转 class 具体实现类. 调用 自定义加密类 .实现 字符串的加密

optimizer/Codegen.java

自定义的 加密 类

defpackage/StrUtils.java

Rhino 命令行 类

jsc/Main.java

现在的版本只支持 执行 mycode/main.java 来 转 dex .

有兴趣的大佬可以 自己实现一下 jar命令行 转 dex

自己的软件加载DEX,运行后界面乱码闪退 BUG

IDEA中顶部菜单 -- 帮助 -- 编辑自定义 VM选项 -- 内容最底下加入下面的代码. 重启IDEA再次运行Main方法,可以看到控制台日志可以显示中文了. APP软件也正常了.

-Dfile.encoding=UTF-8

如图: image

支持作者

QQ: 1659809758

如果这个开源项目可以帮助到你, 你也可以请作者吃一包辣条。

pay

autojs 热更新dex 例子

小提示:

转dex之前,先到 js 混淆网站里把 js中的 所有的变量 和 方法名 全部重命名

将混淆后的js 再转 dex ,更加安全..

缓存问题

按 返回键的 方式 无法完全 杀掉 后台. app 依然会使用 dex 的缓存.

正确的操作方法是 点击设备 Home 键 旁边的 任务键,
将 app 手动 关闭,(杀掉后台) 再打开app 即可 更新到最新的版本

实在不行就

重启下手机设备 或者 清除 该 app 的 所有数据.

"ui";

var DexName = "aaa.dex";
var DexVersionName = "DexVersion.js";
//本地文件
var LocalDirPath = "/sdcard/xxx辅助/";
var LocalDexPath = LocalDirPath + DexName;
var LocalVersionFilePath = LocalDirPath + DexVersionName;

//网络文件
var RemoteHost = "http://自己的地址/";
var RemoteDexFilePath = RemoteHost + DexName;
var RemoteVersionFilePath = RemoteHost + DexVersionName;


var Header = {
  headers: {
    "User-Agent":
      "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.25 Safari/537.36 Core/1.70.3754.400 QQBrowser/10.5.4034.400 ",
  },
};
/**
 * 开始运行
 */
function Run() {
  try {
    var checkState = false;

    //更新
    threads
      .start(function () {
        checkState = CheckVersion();
      })
      .join();

    if (checkState) {
      //加载dex并运行
      runtime.loadDex(LocalDexPath);
      new Packages["aaa"]()();
    }
  } catch (error) {
    toast("检查更新状态失败\n" + error);
    console.warn("Run Error: " + error);
  }
}

/**
 * 检查版本
 */
function CheckVersion() {
  var res = true;
  try {
    if (!files.exists(LocalVersionFilePath)) {
      console.log("创建版本文件");
      files.createWithDirs(LocalVersionFilePath);
      /** 默认值 */
      files.write(LocalVersionFilePath, "0.0.0");
    }

    var localVersion = files.read(LocalVersionFilePath);
    var remoteVersion = http.get(RemoteVersionFilePath,Header).body.string();

    if (localVersion != remoteVersion || !files.exists(LocalDexPath)) {
      console.warn("本地版本: " + localVersion);
      console.warn("远程版本: " + remoteVersion);
      if (DownloadDex()) {
        files.write(LocalVersionFilePath, remoteVersion);
      } else {
        //res = false;
      }
    } else {
      toast("最新版,无需更新");
    }
  } catch (error) {
    console.warn("CheckVersion Error: " + error);
    toast("检查版本发生异常\n" + error);
    //OpenLog();
  }
  return res;
}

/**
 * 下载Dex
 */
function DownloadDex() {
  var res = false;
  try {
    console.warn("dex开始更新");
    var res = http.get(RemoteDexFilePath,Header);
    if (Http200(res)) {
      files.writeBytes(LocalDexPath, res.body.bytes());
      if (files.exists(LocalDexPath)) {
        console.warn("dex更新成功");
        toast("更新成功");
        res = true;
      }
    } else {
      console.warn("DownloadDex 下载失败:  " + res);
      toast("DownloadDex 下载失败:  " + res);
      OpenLog();
      threads.shutDownAll();
      sleep(99999);
    }   
  } catch (error) {
    console.warn("DownloadDex Error: " + error);
    toast("下载新的dex 异常.\n" + error);
   // OpenLog();
  }

  return res;
}

/**
 * 判断是否 不是 空
 * @param {any}} content 内容
 */
function IsNotNullOrEmpty(content) {
  return content != null && content != undefined && Trim(content).length > 0;
}

/**
 * http200验证
 * @param {object} content http返回的json
 */
function Http200(content) {
  return (
    IsNotNullOrEmpty(content) &&
    (content.statusCode == 200 || content.statusCode == "200")
  );
}

/**
 * 去除左右空格
 * @param {string} content
 */
function Trim(content) {
  return (content + "").replace(/(^\s*)|(\s*$)/g, "");
}

function OpenLog() {
  ui.run(function () {
    // app.startActivity("console");
   
  });
}

Run();
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].