CONECTA PRO v4.2.8版本的 MD5 值为:ad88cf9e66d8cdaae8c40233e50eb389
以下内容为反编译后的 d.java 源代码,内容仅作参考
package f8;
import android.content.Context;
import com.google.android.gms.internal.measurement.m4;
import f.q0;
import go.libv2ray.gojni.R;
import j.i0;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Locale;
import z8.b1;
public final class d {
public final Context f4137a;
public final String[] f4138b;
public final int f4139c;
public final String f4140d;
public final int f4141e;
public final String f4142f;
public final String f4143g;
public boolean f4144h;
public d(Context context, String[] strArr) {
b1.o("context", context);
b1.o("dnsHosts", strArr);
this.f4137a = context;
this.f4138b = strArr;
this.f4139c = 53;
this.f4140d = "172.16.0.1";
this.f4141e = 5502;
this.f4142f = "\nserver {\n label=\"%1$s\";\n ip=%2$s;\n port=%3$d;\n uptest=none;\n}\n";
this.f4143g = "libpdnsd.so";
this.f4144h = true;
}
public final void a() {
BufferedReader bufferedReader;
Context context = this.f4137a;
File filesDir = context.getFilesDir();
b1.n("getFilesDir(...)", filesDir);
InputStream openRawResource = context.getResources().openRawResource(R.raw.pdnsd_local);
b1.n("openRawResource(...)", openRawResource);
InputStreamReader inputStreamReader = new InputStreamReader(openRawResource, da.a.f3218a);
if (inputStreamReader instanceof BufferedReader) {
bufferedReader = (BufferedReader) inputStreamReader;
} else {
bufferedReader = new BufferedReader(inputStreamReader, 8192);
}
try {
String s5 = m4.s(bufferedReader);
com.bumptech.glide.f.e(bufferedReader, null);
StringBuilder sb2 = new StringBuilder();
int i10 = 0;
for (String str : this.f4138b) {
i10++;
String format = String.format(Locale.ENGLISH, this.f4142f, Arrays.copyOf(new Object[]{i0.n("s", i10), str, Integer.valueOf(this.f4139c)}, 3));
b1.n("format(locale, format, *args)", format);
sb2.append(format);
}
String format2 = String.format(s5, Arrays.copyOf(new Object[]{sb2, filesDir.getAbsolutePath(), this.f4140d, Integer.valueOf(this.f4141e)}, 4));
b1.n("format(format, *args)", format2);
File file = new File(filesDir, "pdnsd.conf");
file.delete();
Charset charset = da.a.f3218a;
b1.o("charset", charset);
byte[] bytes = format2.getBytes(charset);
b1.n("this as java.lang.String).getBytes(charset)", bytes);
FileOutputStream fileOutputStream = new FileOutputStream(file);
try {
fileOutputStream.write(bytes);
com.bumptech.glide.f.e(fileOutputStream, null);
File file2 = new File(filesDir, "pdnsd.cache");
if (!file2.exists()) {
file2.createNewFile();
}
ArrayList arrayList = new ArrayList();
String absolutePath = new File(context.getApplicationInfo().nativeLibraryDir, this.f4143g).getAbsolutePath();
b1.n("getAbsolutePath(...)", absolutePath);
arrayList.add(absolutePath);
arrayList.add("-v9");
arrayList.add("-c");
String file3 = file.toString();
b1.n("toString(...)", file3);
arrayList.add(file3);
ProcessBuilder processBuilder = new ProcessBuilder(arrayList);
processBuilder.redirectErrorStream(true);
try {
new Thread(new q0(processBuilder.start(), 12, this)).start();
} catch (Exception e10) {
e10.printStackTrace();
}
} catch (Throwable th) {
try {
throw th;
} catch (Throwable th2) {
com.bumptech.glide.f.e(fileOutputStream, th);
throw th2;
}
}
} catch (Throwable th3) {
try {
throw th3;
} catch (Throwable th4) {
com.bumptech.glide.f.e(bufferedReader, th3);
throw th4;
}
}
}
}