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

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

MD5 校验值:d47de9d0b292a5cbd7377502c33607ba

反编译源代码说明

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


package e4;

import java.io.OutputStream;
import java.nio.charset.StandardCharsets;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Locale;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import n.f;

public final class a {

    public static final LinkedHashMap f2420d = new LinkedHashMap();

    public static String f2421e;

    public final String f2422a;

    public final String f2423b;

    public final int f2424c;

    public a(String str, int i10, String str2) {
        this.f2423b = str == null ? "127.0.0.1" : str;
        this.f2424c = i10;
        this.f2422a = str2;
    }

    public static boolean b(String str, OutputStream outputStream) {
        i4.b bVar;
        boolean z9;
        HashMap hashMap = new HashMap();
        hashMap.put("[split]", new i4.a(1));
        hashMap.put("[delay_split]", new i4.a(0));
        Iterator it = hashMap.keySet().iterator();
        while (true) {
            if (it.hasNext()) {
                String str2 = (String) it.next();
                if (str.contains(str2)) {
                    bVar = (i4.b) hashMap.get(str2);
                    break;
                }
            } else {
                bVar = null;
                break;
            }
        }
        if (bVar != null) {
            try {
                switch (((i4.a) bVar).f4089a) {
                    case 0:
                        for (String str3 : str.split(Pattern.quote("[delay_split]"))) {
                            outputStream.write(str3.getBytes(StandardCharsets.UTF_8));
                            outputStream.flush();
                            Thread.sleep(1000);
                        }
                        break;
                    default:
                        for (String str4 : str.split(Pattern.quote("[split]"))) {
                            outputStream.write(str4.getBytes());
                            outputStream.flush();
                        }
                        break;
                }
                z9 = true;
            } catch (Exception unused) {
                z9 = false;
            }
            if (z9) {
                return true;
            }
        }
        return false;
    }

    public final String a() {
        int intValue;
        String str = this.f2423b;
        String str2 = this.f2422a;
        if (str2 != null && !str2.isEmpty()) {
            f fVar = new f();
            fVar.put("[method]", "CONNECT");
            fVar.put("[host]", str);
            int i10 = this.f2424c;
            fVar.put("[port]", String.valueOf(i10));
            Locale locale = Locale.ENGLISH;
            fVar.put("[host_port]", String.format(locale, "%s:%d", str, Integer.valueOf(i10)));
            fVar.put("[app_host]", String.format(locale, "%s:%d", str, Integer.valueOf(i10)));
            fVar.put("[protocol]", "HTTP/1.0");
            fVar.put("[ssh]", String.format(locale, "%s:%d", str, Integer.valueOf(i10)));
            fVar.put("[crlf]", "\r\n");
            fVar.put("[cr]", "\r");
            fVar.put("[lf]", "\n");
            fVar.put("[lfcr]", "\n\r");
            fVar.put("\\n", "\n");
            fVar.put("\\r", "\r");
            String property = System.getProperty("http.agent");
            if (property == null) {
                property = "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.130 Safari/537.36";
            }
            fVar.put("[ua]", property);
            for (Map.Entry entry : fVar.entrySet()) {
                str2 = str2.replace((CharSequence) entry.getKey(), (CharSequence) entry.getValue()).replace(((String) entry.getKey()).toLowerCase(Locale.ROOT), (CharSequence) entry.getValue());
            }
            Matcher matcher = Pattern.compile("\\[rotate=(.*?)\\]").matcher(str2);
            String str3 = f2421e;
            LinkedHashMap linkedHashMap = f2420d;
            if (str3 == null || !str3.equals(str2)) {
                linkedHashMap.clear();
                f2421e = str2;
            }
            int i11 = 0;
            while (matcher.find()) {
                String[] split = matcher.group(1).split(";");
                if (linkedHashMap.get(Integer.valueOf(i11)) == null) {
                    intValue = 0;
                } else {
                    intValue = ((Integer) linkedHashMap.get(Integer.valueOf(i11))).intValue() + 1;
                }
                int length = intValue % split.length;
                linkedHashMap.put(Integer.valueOf(i11), Integer.valueOf(length));
                str2 = str2.replace(matcher.group(), split[length]);
                i11++;
            }
            Matcher matcher2 = Pattern.compile("\\[random=(.*?)\\]").matcher(str2);
            while (matcher2.find()) {
                str2 = str2.replace(matcher2.group(), matcher2.group(1).split(";")[(int) (Math.random() * r2.length)]);
            }
            return str2;
        }
        return a.a.k("GET / HTTP/1.1\r\nHost: ", str, "\r\n\r\n");
    }
}