GOUTY SSH V2 🌐 v4.2.5版本的 MD5 值为:635449b1ebcf1b9e08b24bdcbf1c404a
以下内容为反编译后的 d.java 源代码,内容仅作参考
package g8;
import a4.o;
import android.content.Context;
import d.p0;
import go.libv2ray.gojni.R;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Locale;
import l1.l;
public final class d {
public final Context f4695a;
public final String[] f4696b;
public final int f4697c;
public final String f4698d;
public final int f4699e;
public final String f4700f;
public final String f4701g;
public boolean f4702h;
public d(Context context, String[] strArr) {
o9.f.l("context", context);
o9.f.l("dnsHosts", strArr);
this.f4695a = context;
this.f4696b = strArr;
this.f4697c = 53;
this.f4698d = "172.16.0.1";
this.f4699e = 5502;
this.f4700f = "\nserver {\n label=\"%1$s\";\n ip=%2$s;\n port=%3$d;\n uptest=none;\n}\n";
this.f4701g = "libpdnsd.so";
this.f4702h = true;
}
public final void a() {
Context context = this.f4695a;
File filesDir = context.getFilesDir();
o9.f.k("context.filesDir", filesDir);
InputStream openRawResource = context.getResources().openRawResource(R.raw.pdnsd_local);
o9.f.k("context.resources.openRa…source(R.raw.pdnsd_local)", openRawResource);
Reader inputStreamReader = new InputStreamReader(openRawResource, ic.a.f5842a);
BufferedReader bufferedReader = inputStreamReader instanceof BufferedReader ? (BufferedReader) inputStreamReader : new BufferedReader(inputStreamReader, 8192);
try {
String E = com.bumptech.glide.f.E(bufferedReader);
l.g(bufferedReader, null);
StringBuilder sb2 = new StringBuilder();
int i10 = 0;
for (String str : this.f4696b) {
i10++;
String format = String.format(Locale.ENGLISH, this.f4700f, Arrays.copyOf(new Object[]{o.i("s", i10), str, Integer.valueOf(this.f4697c)}, 3));
o9.f.k("format(locale, format, *args)", format);
sb2.append(format);
}
String format2 = String.format(E, Arrays.copyOf(new Object[]{sb2, filesDir.getAbsolutePath(), this.f4698d, Integer.valueOf(this.f4699e)}, 4));
o9.f.k("format(format, *args)", format2);
File file = new File(filesDir, "pdnsd.conf");
file.delete();
Charset charset = ic.a.f5842a;
o9.f.l("charset", charset);
byte[] bytes = format2.getBytes(charset);
o9.f.k("this as java.lang.String).getBytes(charset)", bytes);
FileOutputStream fileOutputStream = new FileOutputStream(file);
try {
fileOutputStream.write(bytes);
l.g(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.f4701g).getAbsolutePath();
o9.f.k("File(context.application…r, pdnsdBin).absolutePath", absolutePath);
arrayList.add(absolutePath);
arrayList.add("-v9");
arrayList.add("-c");
String file3 = file.toString();
o9.f.k("config.toString()", file3);
arrayList.add(file3);
ProcessBuilder processBuilder = new ProcessBuilder(arrayList);
processBuilder.redirectErrorStream(true);
try {
new Thread(new p0(processBuilder.start(), 16, this)).start();
} catch (Exception e10) {
e10.printStackTrace();
}
} catch (Throwable th) {
try {
throw th;
} catch (Throwable th2) {
l.g(fileOutputStream, th);
throw th2;
}
}
} catch (Throwable th3) {
try {
throw th3;
} catch (Throwable th4) {
l.g(bufferedReader, th3);
throw th4;
}
}
}
}