Spermatid v6.1.8版本的 MD5 值为:a375ce51a42d528ba6e2583c10478296
以下内容为反编译后的 f.java 源代码,内容仅作参考
package sb;
import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.net.wifi.WifiManager;
import android.util.Log;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class f {
public static String a(Context context) {
try {
return f(((WifiManager) context.getSystemService("wifi")).getConnectionInfo().getIpAddress());
} catch (Exception e10) {
return " 获取IP出错鸟!!!!请保证是WIFI,或者请重新打开网络!\n" + e10.getMessage();
}
}
public static int b(Context context) {
NetworkInfo activeNetworkInfo;
NetworkInfo.State state;
ConnectivityManager connectivityManager = (ConnectivityManager) context.getSystemService("connectivity");
if (connectivityManager != null && (activeNetworkInfo = connectivityManager.getActiveNetworkInfo()) != null && activeNetworkInfo.isAvailable()) {
NetworkInfo networkInfo = connectivityManager.getNetworkInfo(1);
if (networkInfo != null && (state = networkInfo.getState()) != null && (state == NetworkInfo.State.CONNECTED || state == NetworkInfo.State.CONNECTING)) {
return 1;
}
NetworkInfo networkInfo2 = connectivityManager.getNetworkInfo(0);
if (networkInfo2 != null) {
NetworkInfo.State state2 = networkInfo2.getState();
String subtypeName = networkInfo2.getSubtypeName();
activeNetworkInfo.getSubtype();
activeNetworkInfo.getSubtypeName();
if (state2 != null && (state2 == NetworkInfo.State.CONNECTED || state2 == NetworkInfo.State.CONNECTING)) {
switch (activeNetworkInfo.getSubtype()) {
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
case 8:
case 9:
case 10:
case 11:
case 12:
case 13:
case 14:
case 15:
case 16:
case 18:
case 20:
break;
case 17:
case 19:
default:
if (!subtypeName.equalsIgnoreCase("TD-SCDMA") && !subtypeName.equalsIgnoreCase("WCDMA")) {
subtypeName.equalsIgnoreCase("CDMA2000");
break;
}
break;
}
return 2;
}
}
}
return 0;
}
public static String c(Context context) {
NetworkInfo activeNetworkInfo;
NetworkInfo.State state;
ConnectivityManager connectivityManager = (ConnectivityManager) context.getSystemService("connectivity");
if (connectivityManager != null && (activeNetworkInfo = connectivityManager.getActiveNetworkInfo()) != null && activeNetworkInfo.isAvailable()) {
NetworkInfo networkInfo = connectivityManager.getNetworkInfo(1);
if (networkInfo != null && (state = networkInfo.getState()) != null && (state == NetworkInfo.State.CONNECTED || state == NetworkInfo.State.CONNECTING)) {
return "3";
}
NetworkInfo networkInfo2 = connectivityManager.getNetworkInfo(0);
if (networkInfo2 != null) {
NetworkInfo.State state2 = networkInfo2.getState();
String subtypeName = networkInfo2.getSubtypeName();
activeNetworkInfo.getSubtype();
activeNetworkInfo.getSubtypeName();
if (state2 != null && (state2 == NetworkInfo.State.CONNECTED || state2 == NetworkInfo.State.CONNECTING)) {
switch (activeNetworkInfo.getSubtype()) {
case 1:
case 2:
case 4:
case 7:
case 11:
case 16:
return "1";
case 3:
case 5:
case 6:
case 8:
case 9:
case 10:
case 12:
case 14:
case 15:
case 18:
return "2";
case 13:
return "5";
case 17:
case 19:
default:
return (subtypeName.equalsIgnoreCase("TD-SCDMA") || subtypeName.equalsIgnoreCase("WCDMA") || subtypeName.equalsIgnoreCase("CDMA2000")) ? "2" : "4";
case 20:
return "6";
}
}
}
}
return "4";
}
public static String d() {
try {
HttpURLConnection httpURLConnection = (HttpURLConnection) new URL("https://api.ipify.org").openConnection();
httpURLConnection.setUseCaches(false);
httpURLConnection.setRequestMethod("GET");
httpURLConnection.setRequestProperty("user-agent", "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.7 Safari/537.36");
if (httpURLConnection.getResponseCode() == 200) {
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(httpURLConnection.getInputStream()));
StringBuilder sb2 = new StringBuilder();
while (true) {
String readLine = bufferedReader.readLine();
if (readLine != null) {
sb2.append(readLine);
} else {
String sb3 = sb2.toString();
System.out.println("当前外网IP测试:" + sb3);
return sb3;
}
}
} else {
System.out.println("网络连接异常,无法获取IP地址!");
return "";
}
} catch (Exception e10) {
e10.printStackTrace();
System.out.println("网络连接异常,无法获取IP地址!.e=" + e10.toString());
return "";
}
}
public static String e(Context context) {
try {
return ((WifiManager) context.getSystemService("wifi")).getConnectionInfo().getMacAddress();
} catch (Exception e10) {
Log.e("tag", e10.getMessage(), e10);
return "";
}
}
public static String f(int i10) {
return (i10 & 255) + "." + ((i10 >> 8) & 255) + "." + ((i10 >> 16) & 255) + "." + ((i10 >> 24) & 255);
}
}