-
Notifications
You must be signed in to change notification settings - Fork 164
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
Showing
4 changed files
with
28 additions
and
29 deletions.
There are no files selected for viewing
51 changes: 24 additions & 27 deletions
51
app/src/main/java/com/sevtinge/hyperceiler/module/base/BaseTool.java
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 |
---|---|---|
@@ -1,49 +1,46 @@ | ||
/* | ||
* This file is part of HyperCeiler. | ||
* This file is part of HyperCeiler. | ||
* HyperCeiler is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License as | ||
* published by the Free Software Foundation, either version 3 of the | ||
* License. | ||
* HyperCeiler is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License as | ||
* published by the Free Software Foundation, either version 3 of the | ||
* License. | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Affero General Public License for more details. | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Affero General Public License for more details. | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
* Copyright (C) 2023-2024 HyperCeiler Contributions | ||
*/ | ||
* Copyright (C) 2023-2024 HyperCeiler Contributions | ||
*/ | ||
package com.sevtinge.hyperceiler.module.base; | ||
|
||
import com.hchen.hooktool.HCHook; | ||
import com.hchen.hooktool.tool.ClassTool; | ||
import com.hchen.hooktool.tool.DexkitTool; | ||
import com.hchen.hooktool.tool.ExpandTool; | ||
import com.hchen.hooktool.tool.FieldTool; | ||
import com.hchen.hooktool.tool.MethodTool; | ||
|
||
public abstract class BaseTool extends BaseHook { | ||
public static HCHook hcHook; | ||
public static ClassTool classTool; | ||
public static MethodTool methodTool; | ||
public static FieldTool fieldTool; | ||
public static DexkitTool dexkitTool; | ||
public static ExpandTool expandTool; | ||
public HCHook hcHook; | ||
public ClassTool classTool; | ||
public MethodTool methodTool; | ||
public FieldTool fieldTool; | ||
public ExpandTool expandTool; | ||
|
||
public abstract void doHook(); | ||
|
||
@Override | ||
public void init() { | ||
BaseTool.hcHook = new HCHook(); | ||
BaseTool.classTool = hcHook.classTool(); | ||
BaseTool.methodTool = hcHook.methodTool(); | ||
BaseTool.fieldTool = hcHook.fieldTool(); | ||
BaseTool.dexkitTool = hcHook.dexkitTool(); | ||
BaseTool.expandTool = hcHook.expandTool(); | ||
BaseTool.hcHook.setThisTag(TAG); | ||
hcHook = new HCHook(); | ||
classTool = hcHook.classTool(); | ||
methodTool = hcHook.methodTool(); | ||
fieldTool = hcHook.fieldTool(); | ||
expandTool = hcHook.expandTool(); | ||
hcHook.setThisTag(TAG); | ||
doHook(); | ||
} | ||
} |
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
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
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