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

应用版本信息
应用名称:SUWAS SSH VPN
版本号:3.0
包名称:suwas.vpn.inject

MD5 校验值:1fc9c7d9bea45dd359a8e0644d6972ec

反编译源代码说明

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


package kpn.soft.dev.kpntunnel;

import android.app.Activity;
import android.app.Application;
import android.content.Context;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;
import android.support.design.widget.Snackbar;
import android.view.View;
import android.widget.Toast;
import kpn.soft.dev.kpntunnel.a.d;
import kpn.soft.dev.kpntunnel.b.b;
import kpn.soft.dev.kpntunnel.b.k;

public class App extends Application {

    private static Context f3201a;

    private static SharedPreferences f3202b;

    private static SharedPreferences f3203c;

    public static String A() {
        return f3202b.getString("SSH_PASSWORD", "");
    }

    public static boolean B() {
        return f3202b.getBoolean("SSH_RECONNECT", true);
    }

    public static boolean C() {
        return f3202b.getBoolean("SSH_COMPRESSION", true);
    }

    public static String D() {
        return f3202b.getString("SSH_PINGER", "m.facebook.com");
    }

    public static int E() {
        String string = f3202b.getString("SSH_SOCKS", "1080");
        if (string.equals("")) {
            string = "1080";
        }
        return Integer.parseInt(string);
    }

    public static int F() {
        String string = f3202b.getString("SSH_TIMEOUT", "10");
        if (string.equals("")) {
            string = "0";
        }
        return Integer.parseInt(string);
    }

    public static boolean G() {
        return f3202b.getBoolean("SSH_SOUND", true);
    }

    public static String H() {
        return f3202b.getString("SSH_FORWARDER", "2");
    }

    public static String I() {
        return f3202b.getString("SSH_UDPGW", "7300");
    }

    public static boolean J() {
        return f3202b.getBoolean("SSH_DNS", false);
    }

    public static boolean K() {
        return f3202b.getBoolean("SSH_ENABLE_DNS", false);
    }

    public static String L() {
        return f3202b.getString("SSH_PRIMARY_DNS", "8.8.8.8");
    }

    public static String M() {
        return f3202b.getString("SSH_SECONDARY_DNS", "8.8.1.1");
    }

    public static float a(float f) {
        return f3201a.getResources().getDisplayMetrics().density * f;
    }

    public static Context a() {
        return f3201a;
    }

    public static void a(Activity activity, boolean z, boolean z2) {
        activity.runOnUiThread(new a(z, z2));
    }

    public static void a(View view, String str) {
        if (view == null) {
            Toast.makeText(f3201a, str, 0).show();
        } else {
            Snackbar.a(view, str, -1).a();
        }
    }

    public static void a(String str) {
        f3202b.edit().putString(b.f, str).apply();
    }

    public static void a(boolean z) {
        f3202b.edit().putBoolean(b.i, z).apply();
    }

    public static SharedPreferences b() {
        return f3202b;
    }

    public static void b(String str) {
        f3202b.edit().putString(b.g, str).apply();
    }

    public static void b(boolean z) {
        f3202b.edit().putBoolean(b.j, z).apply();
    }

    public static SharedPreferences c() {
        return f3203c;
    }

    public static void c(String str) {
        f3202b.edit().putString(b.h, str).apply();
    }

    public static void c(boolean z) {
        f3202b.edit().putBoolean(b.k, z).apply();
    }

    public static String d() {
        return f3202b.getString(b.f, "");
    }

    public static void d(String str) {
        f3202b.edit().putString(b.n, str).apply();
    }

    public static void d(boolean z) {
        f3202b.edit().putBoolean(b.l, z).apply();
    }

    public static String e() {
        return f3202b.getString(b.g, "");
    }

    public static void e(String str) {
        f3202b.edit().putString(b.o, str).apply();
    }

    public static void e(boolean z) {
        f3202b.edit().putBoolean(b.m, z).apply();
    }

    public static String f() {
        return e().split(":")[0];
    }

    public static void f(String str) {
        f3203c.edit().putString(b.u, str).apply();
    }

    public static void f(boolean z) {
        f3203c.edit().putBoolean(b.v, z).apply();
    }

    public static int g() {
        return e().contains("@") ? Integer.valueOf(e().split("@")[0].split(":")[1]).intValue() : Integer.valueOf(e().split(":")[1]).intValue();
    }

    public static String h() {
        return e().split("@")[1];
    }

    public static int i() {
        String string = f3202b.getString(b.h, "8989");
        if (string.equals("")) {
            string = "8989";
        }
        return Integer.valueOf(string).intValue();
    }

    public static boolean j() {
        return f3202b.getBoolean(b.i, false);
    }

    public static boolean k() {
        return f3202b.getBoolean(b.j, false);
    }

    public static boolean l() {
        return f3202b.getBoolean(b.k, true);
    }

    public static boolean m() {
        return f3202b.getBoolean(b.l, true);
    }

    public static boolean n() {
        return f3202b.getBoolean(b.m, true);
    }

    public static int o() {
        String string = f3202b.getString(b.n, "1024");
        if (string.equals("")) {
            string = "1024";
        }
        return Integer.valueOf(string).intValue();
    }

    public static int p() {
        String string = f3202b.getString(b.o, "4092");
        if (string.equals("")) {
            string = "4092";
        }
        return Integer.valueOf(string).intValue();
    }

    public static String q() {
        return f3203c.getString(b.u, "");
    }

    public static boolean r() {
        return f3203c.getBoolean(b.v, k.f3276a);
    }

    public static boolean s() {
        return f3202b.getBoolean(b.p, false);
    }

    public static boolean t() {
        return f3202b.getBoolean(b.q, false);
    }

    public static boolean u() {
        return f3202b.getBoolean(b.r, false);
    }

    public static boolean v() {
        return f3202b.getBoolean(b.s, false);
    }

    public static String w() {
        return f3202b.getString(b.t, "");
    }

    public static String x() {
        return f3202b.getString("SSH_HOST", "");
    }

    public static int y() {
        String string = f3202b.getString("SSH_PORT", "22");
        if (string.equals("")) {
            string = "443";
        }
        return Integer.parseInt(string);
    }

    public static String z() {
        return f3202b.getString("SSH_USERNAME", "");
    }

    @Override
    public void onCreate() {
        super.onCreate();
        f3201a = getApplicationContext();
        f3202b = new d(this, "kpn.soft.dev.kpntunnel_main_preferences");
        f3203c = PreferenceManager.getDefaultSharedPreferences(f3201a);
    }
}