内置脚本,专属修改器
一.内置脚本
1.打开dex文件点击dex编译器++
2.在Android/ext找到ExecuteScript点击进入
3.
把方框内的函数删除了
4.复制下面代码到删除的地方即可
.method private getLuaCode()Ljava/lang/String;
.registers 2
const-string v0, " 这里写执行的脚本 "
#将脚本填写在引号里
return-object v0
.end method
virtual methods
.method public onClick(Landroid/view/View;)V
.registers 4
invoke-virtual {p0}, Landroid/ext/ExecuteScript;->runScript()V
return-void
.end method
.method runScript()V
.registers 9
invoke-direct {p0}, Landroid/ext/ExecuteScript;->getLuaCode()Ljava/lang/String;
move-result-object v2
new-instance v1, Ljava/io/File;
invoke-static {}, Landroid/ext/Tools;->getFilesDirHidden()Ljava/io/File;
move-result-object v4
const-string v5, "strings.lua"
invoke-direct {v1, v4, v5}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
:try_start_f
new-instance v3, Ljava/io/FileOutputStream;
invoke-direct {v3, v1}, Ljava/io/FileOutputStream;-><init>(Ljava/io/File;)V
invoke-virtual {v2}, Ljava/lang/String;->getBytes()[B
move-result-object v4
invoke-virtual {v3, v4}, Ljava/io/OutputStream;->write([B)V
invoke-virtual {v3}, Ljava/io/OutputStream;->close()V
sget-object v4, Landroid/ext/MainService;->instance:Landroid/ext/MainService;
invoke-virtual {v1}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;
move-result-object v5
const/4 v6, 0x0
const-string v7, ""
invoke-virtual {v4, v5, v6, v7}, Landroid/ext/MainService;->executeScript(Ljava/lang/String;ILjava/lang/String;)V
:try_end_2a
.catch Ljava/io/IOException; {:try_start_f .. :try_end_2a} :catch_2b
:goto_2a
return-void
:catch_2b
move-exception v0
const-string v4, "Failed write script"
invoke-static {v4, v0}, Landroid/ext/Log;->e(Ljava/lang/String;Ljava/lang/Throwable;)I
const-string v4, "Failed write script"
invoke-static {v4}, Landroid/ext/Tools;->showToast(Ljava/lang/String;)V
goto :goto_2a
.end method
5.然后退出签名即可
二.专属修改器执行脚本制作
1.打开dex搜脚本常用的函数比如choice
2.dex++搜索choic
3.
4.
5.然后退出签名即可