畅玩新葡京 v8.2.8版本的 MD5 值为:1e36e0a7adef719a26e0a466b52c398d
以下内容为反编译后的 e.java 源代码,内容仅作参考
package com.xiongmao.security.xiongmao.android.sdk.traceroute;
import android.annotation.SuppressLint;
import android.content.Context;
import android.net.ConnectivityManager;
import android.net.DhcpInfo;
import android.net.NetworkInfo;
import android.net.Proxy;
import android.net.wifi.WifiInfo;
import android.net.wifi.WifiManager;
import android.telephony.TelephonyManager;
import android.text.TextUtils;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.Inet4Address;
import java.net.InetAddress;
import java.net.NetworkInterface;
import java.net.UnknownHostException;
import java.util.Enumeration;
@SuppressLint({"DefaultLocale"})
public class e {
public static final String a = "UNKNOWN";
public static final String b = "WAP";
public static final String c = "WIFI";
public static String a() {
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().toString();
}
}
}
return null;
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
public static String a(Context context) {
if (context == null) {
return b;
}
ConnectivityManager connectivityManager = (ConnectivityManager) context.getSystemService("connectivity");
if (connectivityManager == null) {
return "ConnectivityManager not found";
}
NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();
if (activeNetworkInfo == null || !activeNetworkInfo.isConnected()) {
return a;
}
String typeName = activeNetworkInfo.getTypeName();
if (typeName.equalsIgnoreCase(c)) {
return c;
}
if (typeName.equalsIgnoreCase("MOBILE")) {
return TextUtils.isEmpty(Proxy.getDefaultHost()) ? f(context) : b;
}
return null;
}
public static String a(InputStream inputStream) {
int read;
byte[] bArr = new byte[1024];
String str = "";
while (true) {
try {
try {
try {
if (inputStream.read(bArr) == -1) {
break;
}
str = str + new String(bArr, 0, read, "gbk");
} catch (Throwable th) {
if (inputStream != null) {
try {
inputStream.close();
} catch (IOException e) {
e.printStackTrace();
}
}
throw th;
}
} catch (IOException e2) {
e2.printStackTrace();
if (inputStream != null) {
inputStream.close();
}
}
} catch (IOException e3) {
e3.printStackTrace();
}
}
if (inputStream != null) {
inputStream.close();
}
return str;
}
public static String a(String str) {
Process process;
String str2;
Process process2;
Process process3;
Process process4;
String str3;
Process process5;
String str4;
Process process6;
?? r0 = "";
BufferedReader bufferedReader = null;
try {
try {
process = Runtime.getRuntime().exec("getprop net." + str);
try {
BufferedReader bufferedReader2 = new BufferedReader(new InputStreamReader(process.getInputStream()));
String str5 = r0;
while (true) {
try {
String readLine = bufferedReader2.readLine();
if (readLine == null) {
break;
}
str5 = str5 + readLine;
} catch (IOException e) {
str4 = str5;
process6 = process;
e = e;
bufferedReader = bufferedReader2;
str2 = str4;
process3 = process6;
e.printStackTrace();
r0 = process3;
process4 = process3;
} catch (InterruptedException e2) {
str3 = str5;
process5 = process;
e = e2;
bufferedReader = bufferedReader2;
str2 = str3;
process2 = process5;
e.printStackTrace();
r0 = process2;
process4 = process2;
} catch (Throwable th) {
th = th;
bufferedReader = bufferedReader2;
if (bufferedReader != null) {
try {
bufferedReader.close();
} catch (Exception unused) {
throw th;
}
}
process.destroy();
throw th;
}
}
bufferedReader2.close();
process.waitFor();
try {
bufferedReader2.close();
process.destroy();
} catch (Exception unused2) {
}
str2 = str5;
} catch (IOException e3) {
str4 = "";
process6 = process;
e = e3;
} catch (InterruptedException e4) {
str3 = "";
process5 = process;
e = e4;
} catch (Throwable th2) {
th = th2;
}
} catch (Throwable th3) {
Process process7 = r0;
th = th3;
process = process7;
}
} catch (IOException e5) {
e = e5;
str2 = "";
process3 = null;
} catch (InterruptedException e6) {
e = e6;
str2 = "";
process2 = null;
} catch (Throwable th4) {
th = th4;
process = null;
}
return str2.trim();
}
public static Boolean b(Context context) {
if (context == null) {
return true;
}
ConnectivityManager connectivityManager = (ConnectivityManager) context.getApplicationContext().getSystemService("connectivity");
if (connectivityManager == null) {
return false;
}
NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();
return activeNetworkInfo != null && activeNetworkInfo.isAvailable();
}
public static InetAddress b(String str) {
try {
InetAddress byName = InetAddress.getByName(str);
if (byName != null) {
try {
if (byName.getHostAddress().equals("0.0.0.0")) {
return null;
}
return byName;
} catch (UnknownHostException unused) {
return byName;
}
}
return byName;
} catch (UnknownHostException unused2) {
return null;
}
}
public static String c(Context context) {
TelephonyManager telephonyManager;
String simOperator;
return (context == null || (telephonyManager = (TelephonyManager) context.getSystemService("phone")) == null || (simOperator = telephonyManager.getSimOperator()) == null) ? "未知运营商" : (simOperator.equals("46000") || simOperator.equals("46002") || simOperator.equals("46007")) ? "中国移动" : simOperator.equals("46001") ? "中国联通" : simOperator.equals("46003") ? "中国电信" : "未知运营商";
}
public static String d(Context context) {
if (context == null) {
return "127.0.0.1";
}
WifiManager wifiManager = (WifiManager) context.getSystemService("wifi");
if (wifiManager == null) {
return "wifiManager not found";
}
WifiInfo connectionInfo = wifiManager.getConnectionInfo();
if (connectionInfo == null) {
return "wifiInfo not found";
}
int ipAddress = connectionInfo.getIpAddress();
return String.format("%d.%d.%d.%d", Integer.valueOf(ipAddress & 255), Integer.valueOf((ipAddress >> 8) & 255), Integer.valueOf((ipAddress >> 16) & 255), Integer.valueOf((ipAddress >> 24) & 255));
}
public static String e(Context context) {
if (context == null) {
return "127.0.0.1";
}
WifiManager wifiManager = (WifiManager) context.getSystemService("wifi");
if (wifiManager == null) {
return "wifiManager not found";
}
DhcpInfo dhcpInfo = wifiManager.getDhcpInfo();
if (dhcpInfo != null) {
int i = dhcpInfo.gateway;
return String.format("%d.%d.%d.%d", Integer.valueOf(i & 255), Integer.valueOf((i >> 8) & 255), Integer.valueOf((i >> 16) & 255), Integer.valueOf((i >> 24) & 255));
}
return null;
}
private static String f(Context context) {
if (context == null) {
return a;
}
TelephonyManager telephonyManager = (TelephonyManager) context.getSystemService("phone");
if (telephonyManager == null) {
return "TM==null";
}
switch (telephonyManager.getNetworkType()) {
case 0:
return a;
case 1:
return "2G";
case 2:
return "2G";
case 3:
return "3G";
case 4:
return "2G";
case 5:
return "3G";
case 6:
return "3G";
case 7:
return "2G";
case 8:
return "3G";
case 9:
return "3G";
case 10:
return "3G";
case 11:
return "2G";
case 12:
return "3G";
case 13:
return "4G";
case 14:
return "3G";
case 15:
return "3G";
default:
return "4G";
}
}
}