Skip to content

Commit

Permalink
update orig hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
wuxianlin committed Feb 26, 2023
1 parent 601b786 commit e4eae64
Show file tree
Hide file tree
Showing 16 changed files with 35 additions and 439 deletions.
7 changes: 0 additions & 7 deletions app/src/main/java/com/wuxianlin/luckyhooker/HookMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,12 @@ public class HookMain implements IXposedHookZygoteInit, IXposedHookLoadPackage,
public HookMain() {
hooks.add(new HaiXing());
hooks.add(new KSWEB());
hooks.add(new KuWo());
hooks.add(new MgTv());
hooks.add(new MxPlayer());
hooks.add(new PacketCapture());
hooks.add(new PerfectPlayer());
hooks.add(new PpTv());
hooks.add(new QiYi());
hooks.add(new QqLive());
hooks.add(new RootExplorer());
hooks.add(new ShowJava());
hooks.add(new SuperSU());
hooks.add(new WkCast());
hooks.add(new YouKu());
}

@Override
Expand Down
9 changes: 0 additions & 9 deletions app/src/main/java/com/wuxianlin/luckyhooker/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,23 +71,14 @@ public static class PrefsFragment extends PreferenceFragmentCompat {
private static final String[] switchPackageNames = new String[]{
HaiXing.hookPackageName,
KSWEB.hookPackageName,
KuWo.hookPackageNames[0],
KuWo.hookPackageNames[1],
MgTv.hookPackageName,
MxPlayer.hookPackageName,
PacketCapture.hookPackageName,
PerfectPlayer.hookPackageName,
PpTv.hookPackageNames[0],
PpTv.hookPackageNames[1],
QiYi.hookPackageNames[0],
QiYi.hookPackageNames[1],
QiYi.hookPackageNames[2],
QqLive.hookPackageName,
RootExplorer.hookPackageName,
ShowJava.hookPackageName,
SuperSU.hookPackageName,
WkCast.hookPackageName,
YouKu.hookPackageName
};

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ public void startHook(final XC_LoadPackage.LoadPackageParam lpparam) throws Thro
XposedHelpers.findAndHookMethod("android.app.SharedPreferencesImpl", lpparam.classLoader, "getString", String.class, String.class, new XC_MethodHook() {
@Override
protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
File mFile = (File)XposedHelpers.getObjectField(param.thisObject,"mFile");
File mFile = (File) XposedHelpers.getObjectField(param.thisObject, "mFile");
if (!mFile.getName().equals("app_settings.xml")) return;
String key = (String)param.args[0];
String key = (String) param.args[0];
if (key.equals("account_type"))
param.setResult("VIP1");
}
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/java/com/wuxianlin/luckyhooker/hooks/KSWEB.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ public void startHook(XC_LoadPackage.LoadPackageParam lpparam) throws Throwable
XposedHelpers.findAndHookMethod("android.app.SharedPreferencesImpl", lpparam.classLoader, "getString", String.class, String.class, new XC_MethodHook() {
@Override
protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
File mFile = (File)XposedHelpers.getObjectField(param.thisObject,"mFile");
File mFile = (File) XposedHelpers.getObjectField(param.thisObject, "mFile");
if (!mFile.getName().equals("sec.xml")) return;
String key = (String)param.args[0];
String key = (String) param.args[0];
if (key.equals("value"))
param.setResult(getEncodedString(encrypt(getUUID() + "32eh2jrk345h34jgdcn34")));
else if (key.equals("type"))
Expand Down Expand Up @@ -117,7 +117,7 @@ private static String getUUID() {
try {
return md5(new UUID((long) str.hashCode(), (long) Build.class.getField("SERIAL").get(null).toString().hashCode()).toString());
} catch (Exception e) {
return md5(new UUID((long) str.hashCode(), (long) ("HJ34KD87" + Settings.Secure.getString(HookUtils.getContext().getContentResolver(),"android_id")).hashCode()).toString());
return md5(new UUID((long) str.hashCode(), (long) ("HJ34KD87" + Settings.Secure.getString(HookUtils.getContext().getContentResolver(), "android_id")).hashCode()).toString());
}
}

Expand Down
56 changes: 0 additions & 56 deletions app/src/main/java/com/wuxianlin/luckyhooker/hooks/KuWo.java

This file was deleted.

85 changes: 0 additions & 85 deletions app/src/main/java/com/wuxianlin/luckyhooker/hooks/MgTv.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ public void startHook(XC_LoadPackage.LoadPackageParam lpparam) throws Throwable
XposedHelpers.findAndHookMethod("com.mxtech.app.Apps", lpparam.classLoader, Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP ? "c" : "get", int.class, new XC_MethodHook() {
@Override
protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
int input = (int)param.args[0];
if (input==1 || input==2)
int input = (int) param.args[0];
if (input == 1 || input == 2)
param.setResult(1L);
}
});
XposedHelpers.findAndHookMethod(ContextWrapper.class, "checkPermission", String.class, int.class, int.class, new XC_MethodHook() {
@Override
protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
String perm = (String)param.args[0];
String perm = (String) param.args[0];
if (perm.equals("com.android.vending.CHECK_LICENSE")
|| perm.equals("android.permission.GET_ACCOUNTS"))
param.setResult(0);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package com.wuxianlin.luckyhooker.hooks;

import android.content.Context;

import com.wuxianlin.luckyhooker.Hook;

import java.io.File;
Expand Down Expand Up @@ -31,9 +29,9 @@ public void startHook(XC_LoadPackage.LoadPackageParam lpparam) throws Throwable
XposedHelpers.findAndHookMethod("android.app.SharedPreferencesImpl", lpparam.classLoader, "getBoolean", String.class, boolean.class, new XC_MethodHook() {
@Override
protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
File mFile = (File)XposedHelpers.getObjectField(param.thisObject,"mFile");
File mFile = (File) XposedHelpers.getObjectField(param.thisObject, "mFile");
if (!mFile.getName().equals(hookPackageName + "_preferences.xml")) return;
String key = (String)param.args[0];
String key = (String) param.args[0];
if (key.equals("pref_key_unlocked_full_version"))
param.setResult(true);
}
Expand Down
55 changes: 0 additions & 55 deletions app/src/main/java/com/wuxianlin/luckyhooker/hooks/PpTv.java

This file was deleted.

14 changes: 1 addition & 13 deletions app/src/main/java/com/wuxianlin/luckyhooker/hooks/QiYi.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

public class QiYi implements Hook {

public static final String[] hookPackageNames = new String[] {"com.qiyi.video", "com.qiyi.video.pad", "tv.pps.mobile"};
public static final String[] hookPackageNames = new String[]{"com.qiyi.video", "com.qiyi.video.pad", "tv.pps.mobile"};

@Override
public boolean canHook(String packageName) {
Expand All @@ -33,18 +33,6 @@ protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
param.setResult("59e36a5e70e4c4efc6fcbc4db7ea59c1");
//param.setResult("20485102b09bfb5842bf370463bed900");
//param.setResult("200852026c791ac910651df45b27da50");
} else if ("phone.baidu.channel".equals(param.args[0])) {
param.setResult("google");
//param.setResult("Play商店");
//param.setResult("PPS_google");
} else if ("guide_on".equals(param.args[0])) {
param.setResult("false");
} else if ("qiyi.export.channel.ad.switch".equals(param.args[0])) {
param.setResult("false");
} else if ("qiyi.export.channel.ad.ppsgame.switch".equals(param.args[0])) {
param.setResult("false");
} else if ("qiyi.push.msg.value".equals(param.args[0])) {
param.setResult("1");
}
}
});
Expand Down
Loading

0 comments on commit e4eae64

Please sign in to comment.