导航菜单

页面标题

页面副标题

klikUMKM v2.0.1 - k.java 源代码

正在查看: klikUMKM v2.0.1 应用的 k.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.datavisorobfus;

import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.net.wifi.WifiManager;
import com.datavisor.vangogh.bridge.crypto;
import com.datavisor.vangogh.bridge.storage;
import com.google.firebase.encoders.json.BuildConfig;
import java.net.Inet4Address;
import java.net.Inet6Address;
import java.net.InetAddress;
import java.net.InterfaceAddress;
import java.net.NetworkInterface;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Enumeration;
import java.util.Iterator;
import org.json.JSONArray;

public class k {
    private static k a = new k();

    public static k d() {
        return a;
    }

    public String a() {
        String str;
        try {
            JSONArray jSONArray = new JSONArray();
            ArrayList<NetworkInterface> list = Collections.list(NetworkInterface.getNetworkInterfaces());
            if (list != null) {
                for (NetworkInterface networkInterface : list) {
                    if (networkInterface != null && com.datavisor.vangogh.util.h.b(networkInterface.getName())) {
                        byte[] hardwareAddress = networkInterface.getHardwareAddress();
                        String str2 = null;
                        if (hardwareAddress != null) {
                            StringBuilder sb2 = new StringBuilder();
                            for (byte b3 : hardwareAddress) {
                                sb2.append(String.format("%02X:", Integer.valueOf(b3 & 255)));
                            }
                            if (sb2.length() > 0) {
                                sb2.deleteCharAt(sb2.length() - 1);
                            }
                            str = sb2.toString();
                        } else {
                            str = null;
                        }
                        Enumeration<InetAddress> inetAddresses = networkInterface.getInetAddresses();
                        while (true) {
                            if (!inetAddresses.hasMoreElements()) {
                                break;
                            }
                            InetAddress nextElement = inetAddresses.nextElement();
                            if (nextElement instanceof Inet4Address) {
                                str2 = nextElement.getHostAddress();
                                break;
                            }
                        }
                        if (com.datavisor.vangogh.util.h.a(str)) {
                            str = "empty";
                        }
                        if (com.datavisor.vangogh.util.h.a(str2)) {
                            str2 = "empty";
                        }
                        JSONArray jSONArray2 = new JSONArray();
                        jSONArray2.put(networkInterface.getName());
                        jSONArray2.put(str2);
                        jSONArray2.put(str);
                        jSONArray.put(jSONArray2);
                    }
                }
            }
            return jSONArray.toString();
        } catch (Throwable th) {
            com.datavisor.vangogh.util.f.a(th);
            return "exception";
        }
    }

    public String b() {
        try {
            String property = System.getProperty("http.proxyHost");
            String property2 = System.getProperty("http.proxyPort");
            if (com.datavisor.vangogh.util.h.a(property) && com.datavisor.vangogh.util.h.a(property2)) {
                return "empty";
            }
            if (com.datavisor.vangogh.util.h.a(property)) {
                property = "empty";
            }
            if (com.datavisor.vangogh.util.h.a(property2)) {
                property2 = "empty";
            }
            return property + ":" + property2;
        } catch (Throwable th) {
            com.datavisor.vangogh.util.f.a(th);
            return "exception";
        }
    }

    public String c() {
        String str;
        try {
            Iterator it = Collections.list(NetworkInterface.getNetworkInterfaces()).iterator();
            while (true) {
                if (!it.hasNext()) {
                    break;
                }
                NetworkInterface networkInterface = (NetworkInterface) it.next();
                if (networkInterface != null && com.datavisor.vangogh.util.h.b(networkInterface.getName()) && networkInterface.getName().toLowerCase().equals(crypto.convert("K8yOmQ=="))) {
                    byte[] hardwareAddress = networkInterface.getHardwareAddress();
                    if (hardwareAddress != null) {
                        StringBuilder sb2 = new StringBuilder();
                        for (byte b3 : hardwareAddress) {
                            sb2.append(String.format("%02X:", Integer.valueOf(b3 & 255)));
                        }
                        if (sb2.length() > 0) {
                            sb2.deleteCharAt(sb2.length() - 1);
                        }
                        str = sb2.toString();
                    }
                }
            }
            str = null;
            return (com.datavisor.vangogh.util.h.a(str) || str.equals("02:00:00:00:00:00")) ? "empty" : str.equals("00:00:00:00:00:00") ? "empty" : str;
        } catch (Throwable th) {
            com.datavisor.vangogh.util.f.a(th);
            return "exception";
        }
    }

    public String e(Context context) {
        try {
            NetworkInfo activeNetworkInfo = ((ConnectivityManager) context.getSystemService("connectivity")).getActiveNetworkInfo();
            String str = "default";
            if (activeNetworkInfo != null && activeNetworkInfo.isAvailable() && activeNetworkInfo.getType() == 1) {
                Enumeration<NetworkInterface> networkInterfaces = NetworkInterface.getNetworkInterfaces();
                while (networkInterfaces.hasMoreElements()) {
                    NetworkInterface nextElement = networkInterfaces.nextElement();
                    if (nextElement.getName().toLowerCase().equals("wlan0")) {
                        Enumeration<InetAddress> inetAddresses = nextElement.getInetAddresses();
                        while (true) {
                            if (inetAddresses.hasMoreElements()) {
                                InetAddress nextElement2 = inetAddresses.nextElement();
                                if ((nextElement2 instanceof Inet6Address) && !nextElement2.isLoopbackAddress()) {
                                    str = nextElement2.getHostAddress().split("%")[0];
                                    break;
                                }
                            }
                        }
                    }
                }
            }
            return str;
        } catch (Throwable th) {
            com.datavisor.vangogh.util.f.a(th);
            return "exception";
        }
    }

    public String f(Context context) {
        try {
            NetworkInfo activeNetworkInfo = ((ConnectivityManager) context.getSystemService("connectivity")).getActiveNetworkInfo();
            if (activeNetworkInfo == null || !activeNetworkInfo.isAvailable() || activeNetworkInfo.getType() != 1) {
                return "empty";
            }
            String b3 = b(((WifiManager) context.getSystemService("wifi")).getDhcpInfo().gateway);
            storage.globalSet(crypto.convert("H6ih/XXMmO4KRLN/BOo="), b3, 0);
            return b3;
        } catch (Throwable th) {
            com.datavisor.vangogh.util.f.a(th);
            return "exception";
        }
    }

    public String g(Context context) {
        try {
            NetworkInfo activeNetworkInfo = ((ConnectivityManager) context.getSystemService("connectivity")).getActiveNetworkInfo();
            String str = null;
            if (activeNetworkInfo != null && activeNetworkInfo.isAvailable() && activeNetworkInfo.getType() == 1) {
                Enumeration<NetworkInterface> networkInterfaces = NetworkInterface.getNetworkInterfaces();
                while (networkInterfaces.hasMoreElements()) {
                    NetworkInterface nextElement = networkInterfaces.nextElement();
                    if (nextElement.getName().toLowerCase().equals("wlan0")) {
                        for (InterfaceAddress interfaceAddress : nextElement.getInterfaceAddresses()) {
                            if (interfaceAddress.getAddress() instanceof Inet4Address) {
                                str = a(interfaceAddress.getNetworkPrefixLength());
                            }
                        }
                    }
                }
            }
            return com.datavisor.vangogh.util.h.a(str) ? "empty" : str;
        } catch (Throwable th) {
            com.datavisor.vangogh.util.f.a(th);
            return "exception";
        }
    }

    private String a(int i10) {
        if (i10 > 32) {
            return BuildConfig.FLAVOR;
        }
        int i11 = (-1) << (32 - i10);
        int[] iArr = new int[4];
        for (int i12 = 0; i12 < 4; i12++) {
            iArr[3 - i12] = (i11 >> (i12 * 8)) & 255;
        }
        String str = BuildConfig.FLAVOR + iArr[0];
        for (int i13 = 1; i13 < 4; i13++) {
            StringBuilder C = a1.g.C(str, ".");
            C.append(iArr[i13]);
            str = C.toString();
        }
        return str;
    }

    private String b(int i10) {
        return (i10 & 255) + "." + ((i10 >> 8) & 255) + "." + ((i10 >> 16) & 255) + "." + ((i10 >> 24) & 255);
    }

    public String c(Context context) {
        String a10 = a(context);
        return com.datavisor.vangogh.util.a.b(a10) ? a10 : "empty";
    }

    public String d(Context context) {
        try {
            NetworkInfo activeNetworkInfo = ((ConnectivityManager) context.getSystemService("connectivity")).getActiveNetworkInfo();
            if (activeNetworkInfo == null || !activeNetworkInfo.isAvailable() || activeNetworkInfo.getType() != 0) {
                return "empty";
            }
            Enumeration<NetworkInterface> networkInterfaces = NetworkInterface.getNetworkInterfaces();
            while (networkInterfaces.hasMoreElements()) {
                NetworkInterface nextElement = networkInterfaces.nextElement();
                Enumeration<InetAddress> inetAddresses = nextElement.getInetAddresses();
                while (true) {
                    if (inetAddresses.hasMoreElements()) {
                        InetAddress nextElement2 = inetAddresses.nextElement();
                        if (!nextElement2.isLoopbackAddress() && !nextElement2.isLinkLocalAddress() && (nextElement2 instanceof Inet4Address)) {
                            Enumeration<InetAddress> inetAddresses2 = nextElement.getInetAddresses();
                            while (inetAddresses2.hasMoreElements()) {
                                InetAddress nextElement3 = inetAddresses2.nextElement();
                                if ((nextElement3 instanceof Inet6Address) && !nextElement3.isLoopbackAddress()) {
                                    String str = nextElement3.getHostAddress().split("%")[0];
                                    if (str.length() > 15) {
                                        return str;
                                    }
                                }
                            }
                        }
                    }
                }
            }
            return "empty";
        } catch (Throwable th) {
            com.datavisor.vangogh.util.f.a(th);
            return "exception";
        }
    }

    public String b(Context context) {
        try {
            NetworkInfo activeNetworkInfo = ((ConnectivityManager) context.getSystemService("connectivity")).getActiveNetworkInfo();
            if (activeNetworkInfo != null && activeNetworkInfo.isAvailable() && activeNetworkInfo.getType() == 1) {
                String a10 = a(context);
                if (com.datavisor.vangogh.util.h.b(a10)) {
                    return NetworkInterface.getByInetAddress(InetAddress.getByName(a10)).getName().toLowerCase();
                }
            }
            return null;
        } catch (Throwable th) {
            com.datavisor.vangogh.util.f.a(th);
            return null;
        }
    }

    public String a(Context context) {
        try {
            NetworkInfo activeNetworkInfo = ((ConnectivityManager) context.getSystemService("connectivity")).getActiveNetworkInfo();
            if (activeNetworkInfo != null && activeNetworkInfo.isAvailable()) {
                if (activeNetworkInfo.getType() == 0) {
                    Enumeration<NetworkInterface> networkInterfaces = NetworkInterface.getNetworkInterfaces();
                    while (networkInterfaces.hasMoreElements()) {
                        Enumeration<InetAddress> inetAddresses = networkInterfaces.nextElement().getInetAddresses();
                        while (inetAddresses.hasMoreElements()) {
                            InetAddress nextElement = inetAddresses.nextElement();
                            if (!nextElement.isLoopbackAddress() && !nextElement.isLinkLocalAddress() && (nextElement instanceof Inet4Address)) {
                                return nextElement.getHostAddress();
                            }
                        }
                    }
                } else if (activeNetworkInfo.getType() == 1) {
                    return b(((WifiManager) context.getSystemService("wifi")).getConnectionInfo().getIpAddress());
                }
            }
        } catch (Throwable unused) {
        }
        return null;
    }
}