-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 911723c
Showing
3,312 changed files
with
1,486,978 additions
and
0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# 🛠️ 构建脚本 | ||
name: 🛠️ 构建脚本 | ||
# 这是一个构建脚本的工作流程 | ||
# 工作流程触发条件 | ||
on: | ||
# 当push到main分支时触发 | ||
push: | ||
branches: [ "main" ] | ||
# 当手动触发时触发 | ||
workflow_dispatch: | ||
|
||
# 工作流权限 | ||
permissions: | ||
# 可写内容权限 | ||
contents: write | ||
|
||
# 一个工作流由一个或多个任务组成 | ||
jobs: | ||
# 一个名为 "build" 的任务 | ||
build: | ||
# 指定该任务运行的虚拟环境,这里使用的是最新版本的 Ubuntu | ||
runs-on: ubuntu-latest | ||
# 任务的步骤 | ||
steps: | ||
# 检出代码 | ||
- name: 📂 检出代码 # 第一步,检出仓库代码 | ||
uses: actions/checkout@v4 # 使用 actions/checkout 这个第三方 Action 来检出代码 | ||
|
||
- name: 📦 配置 Node.js 环境 # 第二步,配置 Node.js 环境 | ||
uses: actions/setup-node@v4 | ||
with: # 配置参数 | ||
node-version: 20 # 指定 Node.js 版本为 20 | ||
|
||
- name: ⏰ 设置构建日期 # 第三步,设置构建日期 | ||
id: builddate # 该步骤的 ID 为 builddate | ||
# 使用 shell 命令将构建日期写入 GitHub 环境变量中 | ||
run: echo "BUILD_DATE=$(date +'%Y%m%d')" >> $GITHUB_ENV | ||
# $GITHUB_ENV 是一个环境变量,用于存储工作流程的环境变量 | ||
# 这里使用 echo 命令将构建日期写入该环境变量中,以便后续步骤使用 | ||
# 格式为 YYYYMMDD,日期格式为四位年份+两位月份+两位日期 | ||
|
||
- name: 🔨 构建脚本 # 第四步,构建脚本 | ||
# 使用 git 克隆仓库到临时文件夹 | ||
run: | | ||
# 克隆仓库到临时文件夹 | ||
git clone https://github.com/bcmdy/JsHook-Scropt-Template Script.tmp | ||
# 给临时文件夹中所有文件添加可执行权限 | ||
chmod +x -R ./Script.tmp | ||
# 切换到临时文件夹 | ||
cd ./Script.tmp | ||
# 执行 npm run build 命令进行构建 | ||
npm run build | ||
# 创建 GitHub Release 的步骤 | ||
- name: 🎁 创建 GitHub Release (${{ github.run_number }}) | ||
env: | ||
# 从 GitHub 环境变量中获取构建日期 | ||
BUILD_DATE: ${{ env.BUILD_DATE }} | ||
continue-on-error: true | ||
# 使用 softprops/action-gh-release 创建 GitHub Release | ||
uses: softprops/action-gh-release@v2 | ||
# 指定 Release 的 tag 名称,使用 GitHub 环境变量中的构建日期 | ||
with: | ||
# 指定 Release 的 tag 名称 | ||
tag_name: ${{ env.BUILD_DATE }}_v${{ github.run_number }} | ||
# 指定 Release 的文件列表 | ||
files: "Script.tmp/dist/build.js" | ||
generate_release_notes: true | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: 🔥 删除所有 Releases 与 Tags | ||
|
||
# 工作流程触发条件 | ||
on: | ||
# 当手动触发时触发 | ||
workflow_dispatch: | ||
# 添加确认输入,确保删除操作被执行 | ||
inputs: | ||
confirm: | ||
description: '确认删除所有 Releases 与 Tags (输入 CONFIRM 以继续)' | ||
required: true | ||
|
||
# 工作流权限 | ||
permissions: | ||
# 可写内容权限 | ||
contents: write | ||
|
||
jobs: | ||
delete_releases_and_tags: | ||
runs-on: ubuntu-latest | ||
env: | ||
# 获取 GitHub Token 用于执行 GitHub API 操作 | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# 确认输入为 CONFIRM 时执行删除操作 | ||
if: github.event.inputs.confirm == 'CONFIRM' | ||
steps: | ||
# 检出代码 | ||
- name: 📂 检出代码 | ||
uses: actions/checkout@v4 | ||
|
||
# 删除所有 Releases | ||
|
||
- name: 💥 删除所有 Releases | ||
uses: actions/github-script@v7 | ||
with: | ||
script: | | ||
// 获取所有 Releases | ||
const releases = await github.rest.repos.listReleases({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
}); | ||
// 删除每个 Releases | ||
for (const release of releases.data) { | ||
console.log(`删除 Release: ${release.name}`); | ||
await github.rest.repos.deleteRelease({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
release_id: release.id, | ||
}); | ||
} | ||
# 删除所有 tags | ||
- name: 🔥 删除所有 Tags | ||
run: | | ||
# 获取所有 tags | ||
git fetch --tags | ||
# 删除每个 tags | ||
git tag -l | xargs -n 1 git push --delete origin | ||
# 清理本地缓存 | ||
git fetch --prune |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
name: 🚮 删除旧的工作流运行 | ||
# 该工作流用于删除旧的工作流运行,并且支持删除特定的工作流。 | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
# 设置要删除的工作流运行的天数 | ||
days: | ||
description: "⏰ 设置要删除的工作流运行的天数" | ||
required: true | ||
default: "30" | ||
|
||
# 设置每个工作流的保留最小运行数 | ||
minimum_runs: | ||
description: "📊 设置每个工作流的保留最小运行数" | ||
required: true | ||
default: "6" | ||
|
||
# 设置要删除的工作流的名称或文件名。如果未设置,则删除所有工作流。 | ||
delete_workflow_pattern: | ||
description: "📋 设置要删除的工作流的名称或文件名。如果未设置,则删除所有工作流。" | ||
required: false | ||
|
||
# 设置要删除的工作流的状态,支持:活动、已删除、已禁用分支、已禁用无活动、已禁用手动 | ||
delete_workflow_by_state_pattern: | ||
description: "📏 设置要删除的工作流的状态,支持:活动、已删除、已禁用分支、已禁用无活动、已禁用手动" | ||
required: true | ||
default: "All" | ||
type: choice | ||
options: | ||
- "All" | ||
- active | ||
- deleted | ||
- disabled_fork | ||
- disabled_inactivity | ||
- disabled_manually | ||
|
||
# 设置要删除的工作流运行的结论,支持:需要操作、取消、失败、跳过、成功 | ||
delete_run_by_conclusion_pattern: | ||
description: "📈 设置要删除的工作流运行的结论,支持:需要操作、取消、失败、跳过、成功" | ||
required: true | ||
default: "All" | ||
type: choice | ||
options: | ||
- "All" | ||
- action_required | ||
- cancelled | ||
- failure | ||
- skipped | ||
- success | ||
|
||
# 设置是否仅记录操作,不执行任何删除操作。 | ||
dry_run: | ||
description: "📝 设置是否仅记录操作,不执行任何删除操作。" | ||
required: false | ||
|
||
jobs: | ||
del_runs: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
actions: write | ||
steps: | ||
- name: 🚮 删除工作流运行 | ||
uses: Mattraks/delete-workflow-runs@v2 | ||
with: | ||
token: ${{ github.token }} | ||
repository: ${{ github.repository }} | ||
retain_days: ${{ github.event.inputs.days }} | ||
keep_minimum_runs: ${{ github.event.inputs.minimum_runs }} | ||
delete_workflow_pattern: ${{ github.event.inputs.delete_workflow_pattern }} | ||
delete_workflow_by_state_pattern: ${{ github.event.inputs.delete_workflow_by_state_pattern }} | ||
delete_run_by_conclusion_pattern: ${{ github.event.inputs.delete_run_by_conclusion_pattern }} | ||
dry_run: ${{ github.event.inputs.dry_run }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# JsHook-Scropt-Template | ||
JsHook Il2cpp游戏Mod空模板 | ||
|
||
本项目主体Fork自[FlxMod-template2](https://github.com/FlxMod/FlxMod-template2) | ||
|
||
1.升级了frida-il2cpp-bridge库, 并对frida-il2cpp-bridge进行改写使其兼容旧版frida-compile支持库 | ||
|
||
2.修复了部分bug | ||
|
||
3.更新callbackBuild使其适配JsHook>=1.2.5的菜单id生产规则 | ||
|
||
4.添加Github Actions自动脚本, 提交更改后自动编译并打包发布脚本, 懒人福音(虽然感觉没什么用) | ||
|
||
## Usage | ||
|
||
`npm run dev` or `npm run build` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import 'frida-il2cpp-bridge' | ||
import { Mod } from './mod' | ||
|
||
export const hook = () => { | ||
console.log('start hook'); | ||
Il2Cpp.perform(() => { | ||
console.log(Mod.var.test, 1); | ||
console.log('unity Version: ', Il2Cpp.unityVersion); | ||
Il2Cpp.dump(); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import 'frida-il2cpp-bridge'; | ||
import { start } from "./main"; | ||
|
||
setImmediate(() => { | ||
start(); | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { Mod } from './mod' | ||
import { hook } from './hook' | ||
import { getMenu } from './menu' | ||
|
||
export const start = () => { | ||
Mod.var.test = '666';// 不建议这种变量写法, 调用时不能自动补全, 建议直接在mod.js中定义 | ||
Mod.Init('FlxMod', getMenu, hook, '1.0.0', '24062700'); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
import 'frida-il2cpp-bridge' | ||
import { Mod } from './mod' | ||
export const getMenu = () => { | ||
return [ | ||
{ | ||
'type': 'tab', | ||
'item': [ | ||
{ | ||
'title': 'tab1', | ||
'item': [ | ||
{ | ||
'type': 'button', | ||
'title': 'Test1', | ||
'callback': (res) => { | ||
console.log('这是 tab1 的 Test1'); | ||
} | ||
}, | ||
{ | ||
'type': 'button', | ||
'title': 'Test2', | ||
'callback': (res) => { | ||
console.log('这是 tab1 的 Test2'); | ||
} | ||
}, | ||
{ | ||
'type': 'button', | ||
'title': 'Test3', | ||
'callback': (res) => { | ||
console.log('这是 tab1 的 Test3'); | ||
} | ||
}, | ||
{ | ||
'type': 'input', | ||
'title': 'Input Test', | ||
'val': Mod.var.test.toString(), | ||
'callback': (res) => { | ||
console.log(res.val); | ||
Mod.var.test = res.val; | ||
console.log('Mod.var.test: ' + Mod.var.test); | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
'title': '关于', | ||
'item': [ | ||
{ | ||
'type': 'text', | ||
'val': 'Mod: ' + Mod.name | ||
}, | ||
{ | ||
'type': 'text', | ||
'val': 'Version: ' + Mod.version | ||
}, | ||
{ | ||
'type': 'text', | ||
'val': 'Build: ' + Mod.build | ||
}, | ||
{ | ||
'type': 'text', | ||
'val': 'CoreVersionCode: ' + runtime.coreVersionCode | ||
}, | ||
{ | ||
'type': 'button', | ||
'title': 'Dump unity', | ||
'callback': (val) => { | ||
Il2Cpp.perform(() => { | ||
console.log(Il2Cpp.unityVersion); | ||
console.log('Dump Start'); | ||
Il2Cpp.dump(); | ||
console.log('Dump Complete'); | ||
}); | ||
} | ||
} | ||
] | ||
} | ||
], | ||
'default': 1 | ||
} | ||
] | ||
} |
Oops, something went wrong.