Skip to content

Commit

Permalink
问题修复
Browse files Browse the repository at this point in the history
  • Loading branch information
Peakmain committed May 18, 2022
1 parent 22dc550 commit 530e660
Show file tree
Hide file tree
Showing 20 changed files with 20 additions and 460 deletions.
1 change: 1 addition & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class MonitorConfig {
/**
* 隐私方法方法的状态
* @params 1 代表替换方法体
* @params 其他都
* @params 其他都表示正常
*/
public int methodStatus = 0
private MethodFieldUtils.StatusEnum statusEnum = MethodFieldUtils.StatusEnum.METHOD_STATE_NORMAL
Expand All @@ -40,7 +40,7 @@ class MonitorConfig {
/**
* 拦截点击的包名前缀
*/
public String interceptPackageName = ""
public String interceptPackageName = MethodFieldUtils.PACKAGE_NAME_PREXC

void convertConfig() {
for (String value : special) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class MethodFieldUtils {
return value
}
}

public static final String PACKAGE_NAME_PREXC="com.atour"

public static final String LOG_MANAGER = "com/peakmain/sdk/utils/LogManager"
public static final String NEW_METHOD_OWNER = "com/peakmain/sdk/utils/ReplaceMethodUtils"
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ class MonitorMethodCalledReplaceAdapter extends MonitorDefalutMethodAdapter {
void visitMethodInsn(int opcodeAndSource, String owner, String name, String descriptor, boolean isInterface) {
HashMap<String, MethodCalledBean> methodReplaceBeans = MonitorHookMethodConfig.methodCalledBeans
String desc = owner + name + descriptor
if (!monitorConfig.whiteList.contains(mClassName) && !monitorConfig.exceptSet.contains(mClassName)&&methodReplaceBeans.containsKey(desc)) {
if (!monitorConfig.whiteList.contains(mClassName) &&
!monitorConfig.exceptSet.contains(mClassName) &&
methodReplaceBeans.containsKey(desc)
&& (mClassName.contains('cn/jiguang/') || mClassName.contains('libcore/util/Jauns'))) {
println("调用方法的class:" + mClassName + ",方法的名字:" + name + ",方法的描述符:" + descriptor)
MethodCalledBean bean = methodReplaceBeans.get(desc)
super.visitMethodInsn(bean.newOpcode, bean.newMethodOwner, bean.newMethodName, bean.newMethodDescriptor.get(descriptor), false)
Expand Down

This file was deleted.

Loading

0 comments on commit 530e660

Please sign in to comment.