Souza NET DTunnel v4.2.6版本的 MD5 值为:9c33be9da88136132d2ea8a79815d093
以下内容为反编译后的 f.java 源代码,内容仅作参考
package n8;
import android.content.Context;
import com.souzanetssh.pro.R;
import d.p0;
import f9.k;
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;
public final class f {
public final Context f7940a;
public final String[] f7941b;
public final int f7942c;
public final String f7943d;
public final int f7944e;
public final String f7945f;
public final String f7946g;
public boolean f7947h;
public f(Context context, String[] strArr) {
q7.a.e("context", context);
q7.a.e("dnsHosts", strArr);
this.f7940a = context;
this.f7941b = strArr;
this.f7942c = 53;
this.f7943d = "172.16.0.1";
this.f7944e = 5502;
this.f7945f = "\nserver {\n label=\"%1$s\";\n ip=%2$s;\n port=%3$d;\n uptest=none;\n}\n";
this.f7946g = "libpdnsd.so";
this.f7947h = true;
}
public final void a() {
BufferedReader bufferedReader;
Context context = this.f7940a;
File filesDir = context.getFilesDir();
q7.a.d("getFilesDir(...)", filesDir);
InputStream openRawResource = context.getResources().openRawResource(R.raw.pdnsd_local);
q7.a.d("openRawResource(...)", openRawResource);
InputStreamReader inputStreamReader = new InputStreamReader(openRawResource, ia.a.f6508a);
if (inputStreamReader instanceof BufferedReader) {
bufferedReader = (BufferedReader) inputStreamReader;
} else {
bufferedReader = new BufferedReader(inputStreamReader, 8192);
}
try {
String p10 = k.p(bufferedReader);
com.bumptech.glide.c.h(bufferedReader, null);
StringBuilder sb2 = new StringBuilder();
int i10 = 0;
for (String str : this.f7941b) {
i10++;
String format = String.format(Locale.ENGLISH, this.f7945f, Arrays.copyOf(new Object[]{androidx.activity.d.n("s", i10), str, Integer.valueOf(this.f7942c)}, 3));
q7.a.d("format(locale, format, *args)", format);
sb2.append(format);
}
String format2 = String.format(p10, Arrays.copyOf(new Object[]{sb2, filesDir.getAbsolutePath(), this.f7943d, Integer.valueOf(this.f7944e)}, 4));
q7.a.d("format(format, *args)", format2);
File file = new File(filesDir, "pdnsd.conf");
file.delete();
Charset charset = ia.a.f6508a;
q7.a.e("charset", charset);
byte[] bytes = format2.getBytes(charset);
q7.a.d("this as java.lang.String).getBytes(charset)", bytes);
FileOutputStream fileOutputStream = new FileOutputStream(file);
try {
fileOutputStream.write(bytes);
com.bumptech.glide.c.h(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.f7946g).getAbsolutePath();
q7.a.d("getAbsolutePath(...)", absolutePath);
arrayList.add(absolutePath);
arrayList.add("-v9");
arrayList.add("-c");
String file3 = file.toString();
q7.a.d("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) {
com.bumptech.glide.c.h(fileOutputStream, th);
throw th2;
}
}
} catch (Throwable th3) {
try {
throw th3;
} catch (Throwable th4) {
com.bumptech.glide.c.h(bufferedReader, th3);
throw th4;
}
}
}
}