123 v3.0.0.0版本的 MD5 值为:0e12b13cce4ed573f1537c2e2c01db63

以下内容为反编译后的 FirewallServices.java 源代码,内容仅作参考


package com.whh.tlcxryjvpwcypcgtkkqshldiopzcnjnmxrauawffmudogcwqaj2.ezsdwtyvergvuxftryemrutyrkhccgizeogbhosgahiqkrqagq3;

import android.content.Context;
import android.content.Intent;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.graphics.Bitmap;
import android.net.VpnService;
import android.os.Build;
import android.os.Handler;
import android.os.Message;
import android.os.ParcelFileDescriptor;
import android.util.Base64;
import android.widget.Toast;
import com.whh.premium.R;
import com.whh.tlcxryjvpwcypcgtkkqshldiopzcnjnmxrauawffmudogcwqaj2.RequestVPN;
import com.whh.tlcxryjvpwcypcgtkkqshldiopzcnjnmxrauawffmudogcwqaj2.flyActivity;
import com.whh.tlcxryjvpwcypcgtkkqshldiopzcnjnmxrauawffmudogcwqaj2.lguefghgodieaugvsmhiitfuuuivnlkbidbdrptqoaponmgwtv4.NotificationUtils;
import com.whh.tlcxryjvpwcypcgtkkqshldiopzcnjnmxrauawffmudogcwqaj2.lguefghgodieaugvsmhiitfuuuivnlkbidbdrptqoaponmgwtv4.utilities;
import java.io.ByteArrayOutputStream;
import java.net.Inet4Address;
import java.net.InetAddress;
import java.net.NetworkInterface;
import java.net.SocketException;
import java.util.Enumeration;

public class FirewallServices extends VpnService implements Handler.Callback, Runnable {
    private static VpnService.Builder VPNbuilder;
    public static boolean iamout;
    static ParcelFileDescriptor mInterface;
    private final int MY_VPN_NOTIFICATION_ID = 101;
    private Runnable checkVpnStatusRunnable = new Runnable() {
        private static final long CHECK_INTERVAL = 180000;

        @Override
        public void run() {
            if (!FirewallServices.iamout) {
                if (!(FirewallServices.mInterface != null)) {
                    Intent intent = new Intent(FirewallServices.this.getApplicationContext(), (Class<?>) RequestVPN.class);
                    intent.addFlags(268435456);
                    FirewallServices.this.startActivity(intent);
                }
                FirewallServices.this.handler.postDelayed(this, CHECK_INTERVAL);
            }
            FirewallServices.this.handler.removeCallbacks(FirewallServices.this.checkVpnStatusRunnable);
        }
    };
    Handler handler = new Handler();

    @Override
    public void run() {
    }

    @Override
    public boolean handleMessage(Message message) {
        if (message == null) {
            return true;
        }
        Toast.makeText(this, message.what, 0).show();
        return true;
    }

    public boolean isConnected() {
        return mInterface != null;
    }

    public void StopVpn() {
        try {
            ParcelFileDescriptor parcelFileDescriptor = mInterface;
            if (parcelFileDescriptor != null) {
                iamout = true;
                parcelFileDescriptor.close();
                mInterface = null;
                VPNbuilder = null;
                gsewazdmffonwkvrrpiieircigwhmcqyvbtxoutsemlknnbytq38.qehgfpxcuthgfdhmtfvcgudyolkgxjttlnxkikbcqchamkxxfl52(utilities.firewall, "False!null".getBytes());
                stopSelf();
            }
        } catch (Exception unused) {
        }
    }

    public static String Load(Context context) {
        PackageManager packageManager = context.getPackageManager();
        String str = "";
        for (ApplicationInfo applicationInfo : packageManager.getInstalledApplications(0)) {
            String str2 = applicationInfo.packageName;
            CharSequence loadLabel = applicationInfo.loadLabel(context.getPackageManager());
            if (loadLabel != null && !loadLabel.toString().contains(".")) {
                Bitmap drawableToBitmap = flyActivity.drawableToBitmap(applicationInfo.loadIcon(packageManager));
                Bitmap createScaledBitmap = Bitmap.createScaledBitmap(drawableToBitmap, 32, 32, false);
                ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
                createScaledBitmap.compress(Bitmap.CompressFormat.JPEG, 70, byteArrayOutputStream);
                String encodeToString = Base64.encodeToString(byteArrayOutputStream.toByteArray(), 0);
                str = gsewazdmffonwkvrrpiieircigwhmcqyvbtxoutsemlknnbytq38.BlockedVPN.contains(str2) ? str + "B:" + str2 + ":" + ((Object) loadLabel) + ":" + encodeToString + ">" : str + "A:" + str2 + ":" + ((Object) loadLabel) + ":" + encodeToString + ">";
                drawableToBitmap.recycle();
                createScaledBitmap.recycle();
            }
        }
        return str;
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        this.handler.removeCallbacks(this.checkVpnStatusRunnable);
    }

    @Override
    public int onStartCommand(Intent intent, int i, int i2) {
        gsewazdmffonwkvrrpiieircigwhmcqyvbtxoutsemlknnbytq38.MyVPN = this;
        Context applicationContext = getApplicationContext();
        startForeground(utilities.NOTIFICATION_ID, NotificationUtils.getInstance(applicationContext).createNotification(applicationContext));
        if (intent == null) {
            stopSelf();
            return 2;
        }
        VpnService.Builder builder = new VpnService.Builder(this);
        VPNbuilder = builder;
        try {
            VPNbuilder = builder.allowBypass();
            if (Build.VERSION.SDK_INT >= 29) {
                VPNbuilder.setMetered(false);
            }
            for (String str : getResources().getStringArray(R.array.bypass_private_route)) {
                String[] split = str.split("/", 2);
                VPNbuilder.addRoute(split[0], Integer.parseInt(split[1]));
            }
            VPNbuilder.addAddress(getLocalIpAddress(), 24);
            VPNbuilder.addRoute("0.0.0.0", 0);
            VPNbuilder.addDnsServer("8.8.8.8");
            VPNbuilder.addDnsServer("8.8.4.4");
            VPNbuilder.addDnsServer("1.1.1.1");
            VPNbuilder.addDnsServer("1.0.0.1");
            VPNbuilder.setSession("VS Starting");
            for (ApplicationInfo applicationInfo : getPackageManager().getInstalledApplications(0)) {
                if (!gsewazdmffonwkvrrpiieircigwhmcqyvbtxoutsemlknnbytq38.BlockedVPN.contains(applicationInfo.packageName)) {
                    VPNbuilder = VPNbuilder.addDisallowedApplication(applicationInfo.packageName);
                }
            }
            ParcelFileDescriptor establish = VPNbuilder.establish();
            mInterface = establish;
            if (establish == null) {
                stopSelf();
                return 2;
            }
            this.handler.post(this.checkVpnStatusRunnable);
            gsewazdmffonwkvrrpiieircigwhmcqyvbtxoutsemlknnbytq38.qehgfpxcuthgfdhmtfvcgudyolkgxjttlnxkikbcqchamkxxfl52(utilities.firewall, ("True!null").getBytes());
            return 1;
        } catch (Exception unused) {
            stopSelf();
            return 2;
        }
    }

    public static String getLocalIpAddress() {
        try {
            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 instanceof Inet4Address)) {
                        return nextElement.getHostAddress().replace("/", "");
                    }
                }
            }
            return null;
        } catch (SocketException e) {
            e.printStackTrace();
            return null;
        }
    }
}