脱壳之常用的加固样本特征

news2024/11/28 20:42:37

梆梆加固样本特征

清单文件入口

android:name=“com.SecShell.SecShell.ApplicationWrapper”

特征

  1. 免费版
    在这里插入图片描述
  2. meta-data
    meta-data
  3. 总结
    assets/secData0.jar
    lib/armeabi/libSecShell.so
    lib/armeabi/libSecShell-x86.so
    梆梆企业版
    assets/classes0.jar
    lib/armeabi-v7a/libDexHelper.so
    lib/armeabi-v7a/ libDexHelper-x86.so
    梆梆是把原dex文件加密放到了secData0.jar,所以直接拿到dex文件,修复配置文件的程序入口点就可以重打包完美运行。
    通过还原加密算法,解密secData0.jar,直接解压解密jar就是原dex。
    secData0.jar文件保存在.cache的classes.dex是加密的,主要是通过hook实现,打开时解密,关闭时加密(open、mmap)。
    /data/app/com.qianyu.helloworld-47o1HjF-eZJXXlpOoPX_nA==/lib/arm/libSecShell.so CC688000 1B6AB000

清单文件

package com.SecShell.SecShell;

import android.annotation.TargetApi;
import android.app.Application;
import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
import android.content.res.Configuration;
import android.view.LayoutInflater;
import java.lang.reflect.Field;

/* loaded from: classes.dex */
public class ApplicationWrapper extends Application {
    public static Application realApplication = null;

    static {
        d.a();
        System.loadLibrary("SecShell");
        if (Helper.PPATH != null) {
            System.load(Helper.PPATH);
        }
        if (Helper.J2CNAME.equals("SECNEOJ2C")) {
            return;
        }
        System.loadLibrary(Helper.J2CNAME);
    }

    @Override // android.content.ContextWrapper
    protected void attachBaseContext(Context context) {
        super.attachBaseContext(context);
        if (Boolean.parseBoolean(Helper.ABCCHECK)) {
            e.a(context);
        }
        try {
            if (!"".equals(Helper.APPNAME)) {
                realApplication = (Application) getClassLoader().loadClass(Helper.APPNAME).newInstance();
            }
        } catch (Exception e) {
            realApplication = null;
        }
        Helper.attach(realApplication, context);
    }

    @Override // android.content.ContextWrapper, android.content.Context
    public boolean bindService(Intent intent, ServiceConnection serviceConnection, int i) {
        if (realApplication != null) {
            Helper.b(realApplication);
            return realApplication.bindService(intent, serviceConnection, i);
        }
        return super.bindService(intent, serviceConnection, i);
    }

    @Override // android.app.Application, android.content.ComponentCallbacks
    public void onConfigurationChanged(Configuration configuration) {
        super.onConfigurationChanged(configuration);
        if (realApplication != null) {
            realApplication.onConfigurationChanged(configuration);
        }
    }

    @Override // android.app.Application
    public void onCreate() {
        super.onCreate();
        try {
            Helper.c();
        } catch (Throwable th) {
        }
        if (realApplication != null) {
            Helper.attach(realApplication, null);
            realApplication.onCreate();
            LayoutInflater from = LayoutInflater.from(getApplicationContext());
            try {
                Field declaredField = LayoutInflater.class.getDeclaredField("mContext");
                declaredField.setAccessible(true);
                declaredField.set(from, realApplication);
            } catch (Exception e) {
            }
        }
    }

    @Override // android.app.Application, android.content.ComponentCallbacks
    public void onLowMemory() {
        super.onLowMemory();
        if (realApplication != null) {
            realApplication.onLowMemory();
        }
    }

    @Override // android.app.Application
    public void onTerminate() {
        super.onTerminate();
        if (realApplication != null) {
            realApplication.onTerminate();
        }
    }

    @Override // android.app.Application, android.content.ComponentCallbacks2
    @TargetApi(14)
    public void onTrimMemory(int i) {
        try {
            super.onTrimMemory(i);
            if (realApplication != null) {
                realApplication.onTrimMemory(i);
            }
        } catch (Exception e) {
        }
    }

    @Override // android.app.Application
    @TargetApi(14)
    public void registerActivityLifecycleCallbacks(Application.ActivityLifecycleCallbacks activityLifecycleCallbacks) {
        super.registerActivityLifecycleCallbacks(activityLifecycleCallbacks);
        if (realApplication != null) {
            realApplication.registerActivityLifecycleCallbacks(activityLifecycleCallbacks);
        }
    }
}

Helper

package com.SecShell.SecShell;

import android.app.Application;
import android.content.Context;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.List;

/* loaded from: classes.dex */
public class Helper {
    public static ClassLoader cl;
    public static String PPATH = null;
    public static String JNIPPATH = null;
    public static String PKGNAME = "com.qianyu.helloworld";
    public static String APPNAME = "";
    public static String J2CNAME = "SECNEOJ2C";
    public static String ABCCHECK = "SECNEOCHECK";
    public static String ISMPASS = "SECNEOMPASS";

    public static native void attach(Application application, Context context);

    public static native void b(Application application);

    public static native void c();

    public static native String d(String str);

    public static native Object[] e(Object obj, List list, String str);

    public static void f(ClassLoader classLoader, String str, String str2) {
        b.a(classLoader, str, str2);
    }

    public static void g(Object obj) {
        b.a(obj);
    }

    public static Object h(ClassLoader classLoader) {
        return new f(":", classLoader);
    }

    public static boolean isInstalled(String str) {
        BufferedReader bufferedReader;
        String readLine;
        try {
            bufferedReader = new BufferedReader(new InputStreamReader(Runtime.getRuntime().exec("pm path " + str).getInputStream()));
        } catch (IOException e) {
            e.printStackTrace();
        }
        do {
            readLine = bufferedReader.readLine();
            if (readLine == null) {
                return false;
            }
        } while (!readLine.startsWith("package:"));
        return true;
    }

    public static void stub() {
    }
}

a

public final class a {
    public static final String[] a = {"com.noshufou.android.su", "com.noshufou.android.su.elite", "eu.chainfire.supersu", "com.koushikdutta.superuser", "com.thirdparty.superuser", "com.yellowes.su"};
    public static final String[] b = {"com.koushikdutta.rommanager", "com.koushikdutta.rommanager.license", "com.dimonvideo.luckypatcher", "com.chelpus.lackypatch", "com.ramdroid.appquarantine", "com.ramdroid.appquarantinepro"};
    public static final String[] c = {"com.devadvance.rootcloak", "com.devadvance.rootcloakplus", "de.robv.android.xposed.installer", "com.saurik.substrate", "com.zachspong.temprootremovejb", "com.amphoras.hidemyroot", "com.amphoras.hidemyrootadfree", "com.formyhm.hiderootPremium", "com.formyhm.hideroot"};
    public static final String[] d = {"/data/local/", "/data/local/bin/", "/data/local/xbin/", "/sbin/", "/su/bin/", "/system/bin/", "/system/bin/.ext/", "/system/bin/failsafe/", "/system/sd/xbin/", "/system/usr/we-need-root/", "/system/xbin/"};
    public static final String[] e = {"/system", "/system/bin", "/system/sbin", "/system/xbin", "/vendor/bin", "/sbin", "/etc"};
}

b

/* loaded from: classes.dex */
public class b {
    private static ArrayList a = new ArrayList();

    /* JADX INFO: Access modifiers changed from: private */
    /* loaded from: classes.dex */
    public static final class a {
        private static Object[] a(Object obj, ArrayList arrayList, File file) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException {
            return (Object[]) b.b(obj, "makeDexElements", ArrayList.class, File.class).invoke(obj, arrayList, file);
        }

        /* JADX INFO: Access modifiers changed from: private */
        public static void b(ClassLoader classLoader, List list, File file) throws IllegalArgumentException, IllegalAccessException, NoSuchFieldException, InvocationTargetException, NoSuchMethodException {
            Object obj = b.b(classLoader, "pathList").get(classLoader);
            b.b(obj, "dexElements", a(obj, new ArrayList(list), file));
        }
    }

    /* JADX INFO: Access modifiers changed from: private */
    /* renamed from: com.SecShell.SecShell.b$b  reason: collision with other inner class name */
    /* loaded from: classes.dex */
    public static final class C0000b {
        /* JADX INFO: Access modifiers changed from: private */
        public static void b(ClassLoader classLoader, List list, File file) throws IllegalArgumentException, IllegalAccessException, NoSuchFieldException, InvocationTargetException, NoSuchMethodException {
            IOException[] iOExceptionArr;
            Object obj = b.b(classLoader, "pathList").get(classLoader);
            ArrayList arrayList = new ArrayList();
            b.b(obj, "dexElements", b(obj, new ArrayList(list), file, arrayList), Build.VERSION.SDK_INT < 28);
            if (arrayList.size() > 0) {
                Iterator it = arrayList.iterator();
                while (it.hasNext()) {
                    IOException iOException = (IOException) it.next();
                }
                Field b = b.b(classLoader, "dexElementsSuppressedExceptions");
                IOException[] iOExceptionArr2 = (IOException[]) b.get(classLoader);
                if (iOExceptionArr2 == null) {
                    iOExceptionArr = (IOException[]) arrayList.toArray(new IOException[arrayList.size()]);
                } else {
                    IOException[] iOExceptionArr3 = new IOException[arrayList.size() + iOExceptionArr2.length];
                    arrayList.toArray(iOExceptionArr3);
                    System.arraycopy(iOExceptionArr2, 0, iOExceptionArr3, arrayList.size(), iOExceptionArr2.length);
                    iOExceptionArr = iOExceptionArr3;
                }
                b.set(classLoader, iOExceptionArr);
            }
        }

        /* JADX INFO: Access modifiers changed from: private */
        public static Object[] b(Object obj, ArrayList arrayList, File file, ArrayList arrayList2) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException {
            Method method = null;
            try {
                method = b.b(obj, "makeDexElements", ArrayList.class, File.class, ArrayList.class);
            } catch (Exception e) {
            }
            if (method == null) {
                try {
                    method = b.b(obj, "makePathElements", List.class, File.class, List.class);
                } catch (Exception e2) {
                }
            }
            return (Object[]) method.invoke(obj, arrayList, file, arrayList2);
        }
    }

    /* JADX INFO: Access modifiers changed from: private */
    /* loaded from: classes.dex */
    public static final class c {
        /* JADX INFO: Access modifiers changed from: private */
        public static void b(ClassLoader classLoader, List list) throws IllegalArgumentException, IllegalAccessException, NoSuchFieldException, IOException {
            int size = list.size();
            Field b = b.b(classLoader, "path");
            StringBuilder sb = new StringBuilder((String) b.get(classLoader));
            String[] strArr = new String[size];
            File[] fileArr = new File[size];
            ZipFile[] zipFileArr = new ZipFile[size];
            DexFile[] dexFileArr = new DexFile[size];
            ListIterator listIterator = list.listIterator();
            while (listIterator.hasNext()) {
                File file = (File) listIterator.next();
                String absolutePath = file.getAbsolutePath();
                sb.append(':').append(absolutePath);
                int previousIndex = listIterator.previousIndex();
                strArr[previousIndex] = absolutePath;
                fileArr[previousIndex] = file;
                zipFileArr[previousIndex] = new ZipFile(file);
                dexFileArr[previousIndex] = DexFile.loadDex(absolutePath, absolutePath + ".dex", 0);
            }
            b.set(classLoader, sb.toString());
            b.b(classLoader, "mPaths", strArr);
            b.b(classLoader, "mFiles", fileArr);
            b.b(classLoader, "mZips", zipFileArr);
            b.b(classLoader, "mDexs", dexFileArr);
        }
    }

    private static void a(ClassLoader classLoader, File file, List list) throws IllegalArgumentException, IllegalAccessException, NoSuchFieldException, InvocationTargetException, NoSuchMethodException, IOException {
        if (list.isEmpty()) {
            return;
        }
        if ((Build.VERSION.RELEASE.equals("P") || Build.VERSION.SDK_INT >= 28) && !Boolean.parseBoolean(Helper.ISMPASS)) {
            a(classLoader, ((File) list.get(0)).getAbsolutePath());
        } else if (Build.VERSION.SDK_INT >= 19) {
            C0000b.b(classLoader, list, file);
        } else if (Build.VERSION.SDK_INT >= 14) {
            a.b(classLoader, list, file);
        } else {
            c.b(classLoader, list);
        }
    }

    private static void a(ClassLoader classLoader, String str) throws IllegalArgumentException, IllegalAccessException, NoSuchFieldException, InvocationTargetException, NoSuchMethodException {
        IOException[] iOExceptionArr;
        Object obj = b(classLoader, "pathList").get(classLoader);
        ArrayList arrayList = new ArrayList();
        b(obj, "dexElements", Helper.e(obj, arrayList, str), false);
        if (arrayList.size() > 0) {
            Iterator it = arrayList.iterator();
            while (it.hasNext()) {
                ((IOException) it.next()).printStackTrace(System.out);
            }
            Field b = b(classLoader, "dexElementsSuppressedExceptions");
            IOException[] iOExceptionArr2 = (IOException[]) b.get(classLoader);
            if (iOExceptionArr2 == null) {
                iOExceptionArr = (IOException[]) arrayList.toArray(new IOException[arrayList.size()]);
            } else {
                IOException[] iOExceptionArr3 = new IOException[arrayList.size() + iOExceptionArr2.length];
                arrayList.toArray(iOExceptionArr3);
                System.arraycopy(iOExceptionArr2, 0, iOExceptionArr3, arrayList.size(), iOExceptionArr2.length);
                iOExceptionArr = iOExceptionArr3;
            }
            b.set(classLoader, iOExceptionArr);
        }
    }

    public static void a(ClassLoader classLoader, String str, String str2) {
        try {
            a(classLoader, new File(str2), Arrays.asList(new File(str)));
        } catch (Exception e) {
        }
    }

    public static void a(Object obj) {
        Object[] objArr;
        try {
            ArrayList arrayList = new ArrayList();
            Field b = b(obj, "dexElements");
            for (Object obj2 : (Object[]) b.get(obj)) {
                DexFile dexFile = (DexFile) b(obj2, "dexFile").get(obj2);
                if (dexFile != null) {
                    arrayList.add(new File(dexFile.getName()));
                    a.add(dexFile);
                }
            }
            b.set(obj, C0000b.b(obj, arrayList, null, new ArrayList()));
        } catch (Exception e) {
        }
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static Field b(Object obj, String str) throws NoSuchFieldException {
        for (Class<?> cls = obj.getClass(); cls != null; cls = cls.getSuperclass()) {
            try {
                Field declaredField = cls.getDeclaredField(str);
                if (!declaredField.isAccessible()) {
                    declaredField.setAccessible(true);
                }
                return declaredField;
            } catch (NoSuchFieldException e) {
            }
        }
        throw new NoSuchFieldException("Field " + str + " not found in " + obj.getClass());
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static Method b(Object obj, String str, Class... clsArr) throws NoSuchMethodException {
        for (Class<?> cls = obj.getClass(); cls != null; cls = cls.getSuperclass()) {
            try {
                Method declaredMethod = cls.getDeclaredMethod(str, clsArr);
                if (!declaredMethod.isAccessible()) {
                    declaredMethod.setAccessible(true);
                }
                return declaredMethod;
            } catch (NoSuchMethodException e) {
            }
        }
        throw new NoSuchMethodException("Method " + str + " with parameters " + Arrays.asList(clsArr) + " not found in " + obj.getClass());
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static void b(Object obj, String str, Object[] objArr) throws NoSuchFieldException, IllegalArgumentException, IllegalAccessException {
        b(obj, str, objArr, true);
    }

    /* JADX INFO: Access modifiers changed from: private */
    public static void b(Object obj, String str, Object[] objArr, boolean z) throws NoSuchFieldException, IllegalArgumentException, IllegalAccessException {
        Field b = b(obj, str);
        Object[] objArr2 = (Object[]) b.get(obj);
        Object[] objArr3 = (Object[]) Array.newInstance(objArr2.getClass().getComponentType(), objArr2.length + objArr.length);
        if (z) {
            System.arraycopy(objArr2, 0, objArr3, objArr.length, objArr2.length);
            System.arraycopy(objArr, 0, objArr3, 0, objArr.length);
        } else {
            System.arraycopy(objArr2, 0, objArr3, 0, objArr2.length);
            System.arraycopy(objArr, 0, objArr3, objArr2.length, objArr.length);
        }
        b.set(obj, objArr3);
    }
}

c

/* loaded from: classes.dex */
public class c {
    public static int a(String[] strArr) {
        try {
            int i = 0;
            for (String str : strArr) {
                try {
                    if (b(str)) {
                        i++;
                    }
                } catch (Throwable th) {
                    return i;
                }
            }
            return i;
        } catch (Throwable th2) {
            return 0;
        }
    }

    public static boolean a(String str) {
        try {
            return new File(str).exists();
        } catch (Exception e) {
            return false;
        }
    }

    public static boolean b(String str) {
        try {
            return a(str);
        } catch (Throwable th) {
            th.printStackTrace();
            return false;
        }
    }
}

d

/* loaded from: classes.dex */
public class d extends FileObserver {
    private static d a;
    private static Object b = new Object();
    private static boolean c = true;

    public d(String str, int i) {
        super(str, i);
    }

    public static void a() {
        Thread[] threadArr = new Thread[20];
        int enumerate = Thread.currentThread().getThreadGroup().enumerate(threadArr);
        boolean z = false;
        for (int i = 0; i < enumerate; i++) {
            if ("FileObserver".equals(threadArr[i].getName())) {
                z = true;
            }
        }
        if (z) {
            String b2 = b();
            new File(b2, "miui_notify" + Process.myPid()).delete();
            a = new d(b2, 256);
            a.startWatching();
            try {
                new File(b2, "miui_notify" + Process.myPid()).createNewFile();
            } catch (IOException e) {
            }
            synchronized (b) {
                try {
                    if (c) {
                        b.wait(1000L);
                    }
                } catch (InterruptedException e2) {
                }
            }
            new File(b2, "miui_notify" + Process.myPid()).delete();
        }
    }

    private static String b() {
        try {
            Class<?> cls = Class.forName("android.app.ActivityThread");
            Method method = cls.getMethod("currentActivityThread", new Class[0]);
            Field declaredField = cls.getDeclaredField("mBoundApplication");
            boolean isAccessible = declaredField.isAccessible();
            declaredField.setAccessible(true);
            Object obj = declaredField.get(method.invoke(null, new Object[0]));
            declaredField.setAccessible(isAccessible);
            Field declaredField2 = obj.getClass().getDeclaredField("appInfo");
            boolean isAccessible2 = declaredField2.isAccessible();
            declaredField2.setAccessible(true);
            declaredField2.setAccessible(isAccessible2);
            return ((ApplicationInfo) declaredField2.get(obj)).dataDir;
        } catch (Exception e) {
            return "/data/data/" + Helper.PKGNAME;
        }
    }

    @Override // android.os.FileObserver
    public void onEvent(int i, String str) {
        stopWatching();
        synchronized (b) {
            c = false;
            b.notify();
        }
        try {
            Thread.sleep(3000L);
        } catch (InterruptedException e) {
        }
    }
}

e

/* loaded from: classes.dex */
public class e {
    private final Context a;
    private boolean b = true;

    public e(Context context) {
        this.a = context;
    }

    public static void a(Context context) {
        if (new e(context).a()) {
            System.exit(0);
        }
    }

    private boolean a(List list) {
        boolean z = false;
        PackageManager packageManager = this.a.getPackageManager();
        Iterator it = list.iterator();
        while (true) {
            boolean z2 = z;
            if (!it.hasNext()) {
                return z2;
            }
            try {
                packageManager.getPackageInfo((String) it.next(), 0);
                z = true;
            } catch (PackageManager.NameNotFoundException e) {
                z = z2;
            }
        }
    }

    public boolean a() {
        return b() || c() || a("su") || d() || e() || f() || h();
    }

    public boolean a(String str) {
        String[] strArr;
        int length = a.d.length;
        boolean z = false;
        for (int i = 0; i < length; i++) {
            if (new File(strArr[i] + str).exists()) {
                z = true;
            }
        }
        return z;
    }

    public boolean a(String[] strArr) {
        ArrayList arrayList = new ArrayList();
        arrayList.addAll(Arrays.asList(a.a));
        if (strArr != null && strArr.length > 0) {
            arrayList.addAll(Arrays.asList(strArr));
        }
        return a(arrayList);
    }

    public boolean b() {
        return a((String[]) null);
    }

    public boolean b(String[] strArr) {
        ArrayList arrayList = new ArrayList();
        arrayList.addAll(Arrays.asList(a.b));
        if (strArr != null && strArr.length > 0) {
            arrayList.addAll(Arrays.asList(strArr));
        }
        return a(arrayList);
    }

    public boolean c() {
        return b(null);
    }

    /* JADX WARN: Code restructure failed: missing block: B:14:0x0072, code lost:
        if (r3.equals("0") != false) goto L18;
     */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct code enable 'Show inconsistent code' option in preferences
    */
    public boolean d() {
        /*
            r8 = this;
            r4 = 0
            r0 = 1
            r2 = 0
            java.lang.ProcessBuilder r1 = new java.lang.ProcessBuilder     // Catch: java.lang.Exception -> L78 java.lang.Throwable -> L82
            r3 = 2
            java.lang.String[] r3 = new java.lang.String[r3]     // Catch: java.lang.Exception -> L78 java.lang.Throwable -> L82
            r5 = 0
            java.lang.String r6 = "getprop"
            r3[r5] = r6     // Catch: java.lang.Exception -> L78 java.lang.Throwable -> L82
            r5 = 1
            java.lang.String r6 = "ro.debuggable"
            r3[r5] = r6     // Catch: java.lang.Exception -> L78 java.lang.Throwable -> L82
            r1.<init>(r3)     // Catch: java.lang.Exception -> L78 java.lang.Throwable -> L82
            r3 = 1
            r1.redirectErrorStream(r3)     // Catch: java.lang.Exception -> L78 java.lang.Throwable -> L82
            java.lang.Process r1 = r1.start()     // Catch: java.lang.Exception -> L78 java.lang.Throwable -> L82
            java.io.BufferedReader r3 = new java.io.BufferedReader     // Catch: java.lang.Exception -> L78 java.lang.Throwable -> L82
            java.io.InputStreamReader r5 = new java.io.InputStreamReader     // Catch: java.lang.Exception -> L78 java.lang.Throwable -> L82
            java.io.InputStream r1 = r1.getInputStream()     // Catch: java.lang.Exception -> L78 java.lang.Throwable -> L82
            r5.<init>(r1)     // Catch: java.lang.Exception -> L78 java.lang.Throwable -> L82
            r3.<init>(r5)     // Catch: java.lang.Exception -> L78 java.lang.Throwable -> L82
            java.lang.String r1 = ""
            java.lang.String r1 = r3.readLine()     // Catch: java.lang.Throwable -> L88 java.lang.Exception -> L8d
            if (r1 == 0) goto L97
            java.lang.String r2 = "1"
            boolean r1 = r1.equals(r2)     // Catch: java.lang.Throwable -> L88 java.lang.Exception -> L8d
            if (r1 == 0) goto L97
            r1 = r0
        L3c:
            if (r1 != 0) goto L94
            java.lang.ProcessBuilder r2 = new java.lang.ProcessBuilder     // Catch: java.lang.Throwable -> L88 java.lang.Exception -> L8d
            r5 = 2
            java.lang.String[] r5 = new java.lang.String[r5]     // Catch: java.lang.Throwable -> L88 java.lang.Exception -> L8d
            r6 = 0
            java.lang.String r7 = "getprop"
            r5[r6] = r7     // Catch: java.lang.Throwable -> L88 java.lang.Exception -> L8d
            r6 = 1
            java.lang.String r7 = "ro.secure"
            r5[r6] = r7     // Catch: java.lang.Throwable -> L88 java.lang.Exception -> L8d
            r2.<init>(r5)     // Catch: java.lang.Throwable -> L88 java.lang.Exception -> L8d
            r5 = 1
            r2.redirectErrorStream(r5)     // Catch: java.lang.Throwable -> L88 java.lang.Exception -> L8d
            java.lang.Process r5 = r2.start()     // Catch: java.lang.Throwable -> L88 java.lang.Exception -> L8d
            java.io.BufferedReader r2 = new java.io.BufferedReader     // Catch: java.lang.Throwable -> L88 java.lang.Exception -> L8d
            java.io.InputStreamReader r6 = new java.io.InputStreamReader     // Catch: java.lang.Throwable -> L88 java.lang.Exception -> L8d
            java.io.InputStream r5 = r5.getInputStream()     // Catch: java.lang.Throwable -> L88 java.lang.Exception -> L8d
            r6.<init>(r5)     // Catch: java.lang.Throwable -> L88 java.lang.Exception -> L8d
            r2.<init>(r6)     // Catch: java.lang.Throwable -> L88 java.lang.Exception -> L8d
            java.lang.String r3 = r2.readLine()     // Catch: java.lang.Throwable -> L8a java.lang.Exception -> L8f
            if (r3 == 0) goto L92
            java.lang.String r5 = "0"
            boolean r3 = r3.equals(r5)     // Catch: java.lang.Throwable -> L8a java.lang.Exception -> L8f
            if (r3 == 0) goto L92
        L74:
            com.SecShell.SecShell.g.a(r2)
        L77:
            return r0
        L78:
            r0 = move-exception
            r3 = r2
        L7a:
            r0.printStackTrace()     // Catch: java.lang.Throwable -> L88
            com.SecShell.SecShell.g.a(r3)
            r0 = r4
            goto L77
        L82:
            r0 = move-exception
            r3 = r2
        L84:
            com.SecShell.SecShell.g.a(r3)
            throw r0
        L88:
            r0 = move-exception
            goto L84
        L8a:
            r0 = move-exception
            r3 = r2
            goto L84
        L8d:
            r0 = move-exception
            goto L7a
        L8f:
            r0 = move-exception
            r3 = r2
            goto L7a
        L92:
            r0 = r1
            goto L74
        L94:
            r0 = r1
            r2 = r3
            goto L74
        L97:
            r1 = r4
            goto L3c
        */
        throw new UnsupportedOperationException("Method not decompiled: com.SecShell.SecShell.e.d():boolean");
    }

    public boolean e() {
        BufferedReader bufferedReader;
        BufferedReader bufferedReader2 = null;
        try {
            ProcessBuilder processBuilder = new ProcessBuilder("mount");
            processBuilder.redirectErrorStream(true);
            Process start = processBuilder.start();
            bufferedReader = new BufferedReader(new InputStreamReader(start.getInputStream()));
            boolean z = false;
            while (true) {
                try {
                    String readLine = bufferedReader.readLine();
                    if (readLine == null) {
                        start.waitFor();
                        g.a(bufferedReader);
                        return z;
                    }
                    String[] split = readLine.split(" ");
                    if (split.length >= 4) {
                        String str = split[1];
                        String str2 = split[3];
                        for (String str3 : a.e) {
                            if (str.equalsIgnoreCase(str3)) {
                                String[] split2 = str2.split(",");
                                int length = split2.length;
                                int i = 0;
                                while (true) {
                                    if (i >= length) {
                                        break;
                                    } else if (split2[i].equalsIgnoreCase("rw")) {
                                        z = true;
                                        break;
                                    } else {
                                        i++;
                                    }
                                }
                            }
                        }
                    }
                } catch (Exception e) {
                    bufferedReader2 = bufferedReader;
                    g.a(bufferedReader2);
                    return false;
                } catch (Throwable th) {
                    th = th;
                    g.a(bufferedReader);
                    throw th;
                }
            }
        } catch (Exception e2) {
        } catch (Throwable th2) {
            th = th2;
            bufferedReader = null;
        }
    }

    public boolean f() {
        BufferedReader bufferedReader;
        Process start;
        BufferedReader bufferedReader2;
        try {
            ProcessBuilder processBuilder = new ProcessBuilder("which", "su");
            processBuilder.redirectErrorStream(false);
            start = processBuilder.start();
            bufferedReader2 = new BufferedReader(new InputStreamReader(start.getInputStream()));
        } catch (Throwable th) {
            bufferedReader = null;
        }
        try {
            String readLine = bufferedReader2.readLine();
            start.waitFor();
            g.a(bufferedReader2);
            if (readLine != null) {
                if (readLine.endsWith("su")) {
                    return true;
                }
            }
            return false;
        } catch (Throwable th2) {
            bufferedReader = bufferedReader2;
            if (bufferedReader != null) {
                g.a(bufferedReader);
            }
            return false;
        }
    }

    public boolean g() {
        return true;
    }

    public boolean h() {
        if (g()) {
            String[] strArr = new String[a.d.length];
            for (int i = 0; i < strArr.length; i++) {
                strArr[i] = a.d[i] + "su";
            }
            return c.a(strArr) > 0;
        }
        return false;
    }
}

f

/* loaded from: classes.dex */
class f extends PathClassLoader {
    private final ClassLoader a;

    public f(String str, ClassLoader classLoader) {
        super(str, classLoader.getParent());
        this.a = classLoader;
    }

    @Override // dalvik.system.BaseDexClassLoader, java.lang.ClassLoader
    public Class findClass(String str) throws ClassNotFoundException {
        return (str == null || !str.equals(Helper.class.getName())) ? super.findClass(str) : this.a.loadClass(str);
    }
}

g


/* loaded from: classes.dex */
public class g {
    public static void a(Closeable closeable) {
        if (closeable != null) {
            try {
                closeable.close();
            } catch (Exception e) {
            }
        }
    }
}

乐谷加固样本特征(ELF区段加密和案例)

主要看assets文件夹和lib文件夹

so文件

lib-shell.so

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1556417.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

Flutter开发之objectbox

Flutter开发之objectbox 在之前进行iOS开发的时候使用WCDB去进行管理数据库很方便&#xff0c;它支持ORM&#xff08;Object-Relational Mapping&#xff0c;对象关系映射&#xff09;&#xff0c;用于实现面向对象编程语言里不同类型系统的数据之间的转换。 那么在Flutter开发…

【C++】const限定符|const引用

const的引用 说const引用之前需要说明&#xff0c;这是建立在引用的前提下&#xff0c;如果是普通的拷贝赋值就基本不需要使用到const(有关权限)。 1 权限不能放大&#xff08;可平移、缩小&#xff09; 如何解释权限不能放大&#xff1f; 阅读下面的代码 可以看到&#xff1a…

Taskflow:子流任务(Subflow Tasking)

创建Subflow DAG任务中&#xff0c;有一种常见的场景&#xff0c;一个任务可能在执行期间产生新的任务&#xff0c;然后紧接着执行新任务。 之前提到的静态图就没有办法实现这样一个功能了&#xff0c;所以Taskflow提供了另一种流的节点&#xff1a;Subflow&#xff0c;Subflo…

多张图片怎么合成一张gif?快来试试这个方法

将多张图片合成一张gif动图是现在常见的图像处理的方式&#xff0c;适合制作一些简单的动态图片。通过使用在线图片合成网站制作的gif动图不仅体积小画面丰富&#xff0c;画质还很清晰。不需要下载任何软件小白也能轻松上手&#xff0c;支持上传jpg、png以及gif格式图片&#x…

在同一个网站上自动下载多个子页面内容

一、问题现象 第一次遇到这样的问题&#xff0c;如下图&#xff1a; 即在同一个网站上下载多个内容时&#xff0c;第一个内容明明已经正常get到了&#xff0c;但开始第二个页面的查询 以后&#xff0c;原来已经查出的内容就找不到了。 二、解决办法 我不知道大家是不是遇到…

meanshift论文学习

1. abstract 2. 理论解读 目标函数 然后对(11)求导&#xff0c;求解x&#xff0c;x实际就是求解当图像位置的值&#xff0c;求导之后表示为&#xff1a; 进一步整理得&#xff1a; 上式第二项即为meanshift 进一步整理为 上式表明了均值漂移与核函数之间的关系。 3. 缺点…

多语言多货币多入口FecMall跨境电商B2C商城系统源码

FecMall是一套多语言多货币多入口的开源电商 B2C 商城&#xff0c;支持移动端vue, app, html5&#xff0c;微信小程序微店&#xff0c;微信小程序商城等。很适合用来做跨境电商外贸独立站。 Fecmall 全称为Fancy ECommerce Mall&#xff0c;是基于php Yii2框架之上开发的一款优…

基于ssm中国咖啡文化宣传网站的设计与实现论文

摘 要 本课题是根据咖啡文化宣传需要以及网络的优势建立的一个中国咖啡文化宣传网站&#xff0c;来实现中国咖啡文化宣传以及咖啡商品售卖的功能。 本中国咖啡文化宣传网站应用Java技术&#xff0c;MYSQL数据库存储数据&#xff0c;基于SSMVue框架开发。在网站的整个开发过程中…

Filter、Listener、AJAX、Vue、Element

Filter 概念&#xff1a;Filter 表示过滤器&#xff0c;是JavaWeb三大组件(Servlet、Filter、 Listener)之一。 过滤器可以把对资源的请求拦截下来&#xff0c;从而实现一些特殊的功能。 过滤器一般完成一些通用的操作&#xff0c;比如&#xff1a;权限控制、统一编码处理、敏感…

Gitea 的详细介绍

什么是 Gitea&#xff1f; Gitea 是一个开源、轻量级的自托管 Git 服务&#xff0c;它允许用户搭建类似于 GitHub 或 GitLab 的代码托管平台。由于采用 Go 语言开发&#xff0c;Gitea 具有高效的性能和跨平台特性&#xff0c;适合个人开发者或小团队使用。 Gitea 的特点 轻量…

pycharm修改主题颜色和注释颜色

目录 一、修改主题颜色 二、修改注释颜色 一、修改主题颜色 总结的来说就是&#xff1a;File-Settings-Appearance-Theme。 有三种主题&#xff1a; Darcula&#xff1a;默认主题&#xff0c;可以看作是黑的&#xff1a; IntelliJ Light:可以看作是白的&#xff1a; High con…

在新能源充电桩、智能充电枪、储能等产品领域得到广泛应用的两款微功耗轨至轨运算放大器芯片——D8541和D8542

D8541和D8542是我们推荐的两款微功耗轨至轨运算放大器芯片&#xff0c;其中D8541为单运放&#xff0c; D8542为双运放&#xff0c;它特别适用于NTC温度采集电路、ADC基准电压电路、有源滤波器、电压跟随器、信号放大器等电路应用&#xff0c;在新能源充电桩、智能充电枪、…

JavaScript练手小技巧:仿米哈游官网人物跟随鼠标位移效果

最近&#xff0c;有同学找到我&#xff0c;说&#xff1a;老师&#xff0c;我想模仿米哈游官网。 我说&#xff1a;可以&#xff0c;很不错的。 她说&#xff1a;有些效果有点难&#xff0c;能不能帮我看下。 于是&#xff0c;我就简单大概粗糙的讲解了下大致的原理&#xf…

unity学习(78)--unity调试--长痛不如短痛

1.在vs2022中&#xff0c;工具--获取工具与功能。 2. 安装图中工具&#xff0c;原来我早就安装了。 3 f9下断 同时点击图中按钮 vs此时变为如下状态 unity中出现如下提示&#xff1a; 4 在unity中运行游戏&#xff0c;vs这边确实成功断住了&#xff01;

柔数组的介绍

柔数组简单介绍 这个词你可能没有听过但是他的确是存在的。 1.在c99中结构中的最后⼀个元素允许是未知⼤⼩的数组&#xff0c;这就叫做『柔性数组』成员 2这就代表了它存在与结构体中&#xff0c;很重要的一点是&#xff0c;他只能是结构体的最后的一个成员&#xff0c;这是…

面向对象特征二:继承

继承的概述 生活中的继承 财产继承&#xff1a; 绿化&#xff1a;前人栽树&#xff0c;后人乘凉 “绿水青山&#xff0c;就是金山银山” 样貌&#xff1a; 继承之外&#xff0c;是不是还可以"进化"&#xff1a; 继承有延续&#xff08;下一代延续上一代的基因、财…

动态内存管理【malloc,calloc,realloc和free的理解】【柔性数组的概念】

一.为什么要有动态内存分配 我们知道&#xff0c;当我们创建变量的时候&#xff0c;我们会向系统申请一定大小的空间内存。比如int a10或者int arr[10]&#xff1b;我就向内存申请了4或者40个字节的大小来存放数据。但是当我们一旦申请好这个空间&#xff0c;大小就无法调整了…

Linux部署Kafka2.8.1

安装Jdk 首先确保你的机器上安装了Jdk&#xff0c;Kafka需要Java运行环境&#xff0c;低版本的Kafka还需要Zookeeper&#xff0c;我此次要安装的Kafka版本为2.8.1&#xff0c;已经内置了一个Zookeeper环境&#xff0c;所以我们可以不部署Zookeeper直接使用。 1、解压Jdk包 t…

缓存和缓存的常用使用场景

想象一下,一家公司在芬兰 Google Cloud 数据中心的服务器上托管一个网站。对于欧洲用户来说,加载可能需要大约 100 毫秒,但对于墨西哥用户来说,加载需要 3-5 秒。幸运的是,有一些策略可以最大限度地减少远程用户的请求延迟。 这些策略称为缓存和内容交付网络 (CDN),它们是…

HarmonyOS实战开发-使用List组件实现导航与内容联动的效果。

1 卡片介绍 使用ArkTS语言&#xff0c;实现一个导航与内容二级联动的效果。 2 标题 二级联动&#xff08;ArkTS&#xff09; 3 介绍 本篇Codelab是主要介绍了如何基于List组件实现一个导航和内容的二级联动效果。样例主要包含以下功能&#xff1a; 切换左侧导航&#xff…