APK反编译源代码展示 - 南明离火平台提供

应用版本信息
应用名称:SSH T PROJECT VPN
版本号:3.1.2
包名称:app.sshtproject

MD5 校验值:d47de9d0b292a5cbd7377502c33607ba

反编译源代码说明

a.java 文件包含反编译后的源代码,请注意,该内容仅供学习和参考使用,不得用于非法用途。


package d5;

import android.util.Base64;
import android.util.Log;
import c5.d;
import com.bumptech.glide.e;
import com.bumptech.glide.f;
import com.tencent.mmkv.MMKV;
import com.v2ray.ang.dto.V2rayConfig;
import j5.o;
import java.net.URLDecoder;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Pattern;
import p8.m;
import p8.n;
import r5.i;

public abstract class a {

    public static final i f2258a = new i(d.f1420r);

    public static String a(String str) {
        CharSequence charSequence;
        boolean z9;
        String i10 = i(str);
        if (i10 != null) {
            return i10;
        }
        if (m.M0(str, '=')) {
            char[] cArr = {'='};
            int length = str.length() - 1;
            if (length >= 0) {
                while (true) {
                    int i11 = length - 1;
                    char charAt = str.charAt(length);
                    int i12 = 0;
                    while (true) {
                        if (i12 < 1) {
                            if (charAt == cArr[i12]) {
                                break;
                            }
                            i12++;
                        } else {
                            i12 = -1;
                            break;
                        }
                    }
                    if (i12 >= 0) {
                        z9 = true;
                    } else {
                        z9 = false;
                    }
                    if (!z9) {
                        charSequence = str.subSequence(0, length + 1);
                        break;
                    }
                    if (i11 < 0) {
                        break;
                    }
                    length = i11;
                }
            }
            charSequence = "";
            String i13 = i(charSequence.toString());
            if (i13 != null) {
                return i13;
            }
        }
        return "";
    }

    public static String b(String str) {
        e.m("str", str);
        return m.g1(m.g1(str, " ", "%20"), "|", "%7C");
    }

    public static List c() {
        String str;
        boolean z9;
        MMKV mmkv = (MMKV) f2258a.getValue();
        if (mmkv == null || (str = mmkv.e("pref_domestic_dns")) == null) {
            str = "223.5.5.5";
        }
        List k12 = m.k1(str, new String[]{","});
        ArrayList arrayList = new ArrayList();
        for (Object obj : k12) {
            String str2 = (String) obj;
            if (!h(str2) && !e(str2)) {
                z9 = false;
            } else {
                z9 = true;
            }
            if (z9) {
                arrayList.add(obj);
            }
        }
        if (arrayList.isEmpty()) {
            return f.B("223.5.5.5");
        }
        return arrayList;
    }

    public static List d() {
        String str;
        boolean z9;
        MMKV mmkv = (MMKV) f2258a.getValue();
        if (mmkv == null || (str = mmkv.e("pref_remote_dns")) == null) {
            str = "1.1.1.1";
        }
        List k12 = m.k1(str, new String[]{","});
        ArrayList arrayList = new ArrayList();
        for (Object obj : k12) {
            String str2 = (String) obj;
            if (!h(str2) && !e(str2)) {
                z9 = false;
            } else {
                z9 = true;
            }
            if (z9) {
                arrayList.add(obj);
            }
        }
        if (arrayList.isEmpty()) {
            return f.B("1.1.1.1");
        }
        return arrayList;
    }

    public static boolean e(String str) {
        if (!m.m1(str, "https", false) && !m.m1(str, V2rayConfig.DEFAULT_NETWORK, false) && !m.m1(str, "quic", false)) {
            return false;
        }
        return true;
    }

    public static boolean f(String str) {
        boolean z9;
        e.m("value", str);
        try {
            if (str.length() == 0) {
                z9 = true;
            } else {
                z9 = false;
            }
            if (!z9 && !m.W0(str)) {
                if (m.U0(str, "/", 0, false, 6) > 0) {
                    List k12 = m.k1(str, new String[]{"/"});
                    if (k12.size() == 2 && Integer.parseInt((String) k12.get(1)) > 0) {
                        str = (String) k12.get(0);
                    }
                }
                if (m.m1(str, "::ffff:", false) && m.K0(str, '.')) {
                    str = n.v1(7, str);
                } else if (m.m1(str, "[::ffff:", false) && m.K0(str, '.')) {
                    str = m.g1(n.v1(8, str), "]", "");
                }
                Object[] array = m.j1(str, new char[]{'.'}).toArray(new String[0]);
                e.k("null cannot be cast to non-null type kotlin.Array<T of kotlin.collections.ArraysKt__ArraysJVMKt.toTypedArray>", array);
                String[] strArr = (String[]) array;
                if (strArr.length == 4) {
                    if (m.U0(strArr[3], ":", 0, false, 6) > 0) {
                        str = str.substring(0, m.U0(str, ":", 0, false, 6));
                        e.l("this as java.lang.String…ing(startIndex, endIndex)", str);
                    }
                    Pattern compile = Pattern.compile("^([01]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])\\.([01]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])\\.([01]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])\\.([01]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])$");
                    e.l("compile(pattern)", compile);
                    return compile.matcher(str).matches();
                }
                return g(str);
            }
            return false;
        } catch (Exception e10) {
            e10.printStackTrace();
            return false;
        }
    }

    public static boolean g(String str) {
        e.m("value", str);
        int i10 = 0;
        if (m.U0(str, "[", 0, false, 6) == 0 && m.Y0(str, "]", 6) > 0) {
            boolean z9 = true;
            String v12 = n.v1(1, str);
            int length = v12.length() - m.Y0(v12, "]", 6);
            if (length < 0) {
                z9 = false;
            }
            if (z9) {
                int length2 = v12.length() - length;
                if (length2 >= 0) {
                    i10 = length2;
                }
                str = n.w1(i10, v12);
            } else {
                throw new IllegalArgumentException(o.g("Requested character count ", length, " is less than zero.").toString());
            }
        }
        Pattern compile = Pattern.compile("^((?:[0-9A-Fa-f]{1,4}))?((?::[0-9A-Fa-f]{1,4}))*::((?:[0-9A-Fa-f]{1,4}))?((?::[0-9A-Fa-f]{1,4}))*|((?:[0-9A-Fa-f]{1,4}))((?::[0-9A-Fa-f]{1,4})){7}$");
        e.l("compile(pattern)", compile);
        return compile.matcher(str).matches();
    }

    public static boolean h(String str) {
        e.m("value", str);
        Pattern compile = Pattern.compile("^([01]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])\\.([01]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])\\.([01]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])\\.([01]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])$");
        e.l("compile(pattern)", compile);
        if (!compile.matcher(str).matches() && !g(str)) {
            return false;
        }
        return true;
    }

    public static String i(String str) {
        e.m("text", str);
        try {
            byte[] decode = Base64.decode(str, 2);
            e.l("decode(text, Base64.NO_WRAP)", decode);
            Charset forName = Charset.forName("UTF-8");
            e.l("forName(charsetName)", forName);
            return new String(decode, forName);
        } catch (Exception e10) {
            Log.i("com.v2ray.ang", "Parse base64 standard failed " + e10);
            try {
                byte[] decode2 = Base64.decode(str, 10);
                e.l("decode(text, Base64.NO_WRAP.or(Base64.URL_SAFE))", decode2);
                Charset forName2 = Charset.forName("UTF-8");
                e.l("forName(charsetName)", forName2);
                return new String(decode2, forName2);
            } catch (Exception e11) {
                Log.i("com.v2ray.ang", "Parse base64 url safe failed " + e11);
                return null;
            }
        }
    }

    public static String j(String str) {
        e.m("url", str);
        try {
            String decode = URLDecoder.decode(str, "UTF-8");
            e.l("{\n            URLDecoder…e(url, \"UTF-8\")\n        }", decode);
            return decode;
        } catch (Exception e10) {
            e10.printStackTrace();
            return str;
        }
    }
}