星辰影院解锁vip v1.0.4版本的 MD5 值为:3d99bbcbb0d5d5e568b9f6134424c24e
以下内容为反编译后的 b.java 源代码,内容仅作参考
package org.qiyi.net.l.n;
import android.net.TrafficStats;
import android.text.TextUtils;
import java.io.IOException;
import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.ArrayList;
import java.util.List;
import org.qiyi.net.n.g;
public class b implements l.a.b {
private InetAddress a = null;
public b(String str) {
a(str);
}
private void a(String str) {
try {
if (TextUtils.isEmpty(str)) {
this.a = InetAddress.getByName("223.5.5.5");
} else {
this.a = InetAddress.getByName(str);
}
} catch (UnknownHostException e2) {
e2.printStackTrace();
}
}
private byte[] b(byte[] bArr) throws IOException {
DatagramSocket datagramSocket;
byte[] bArr2 = new byte[1500];
DatagramSocket datagramSocket2 = null;
try {
TrafficStats.setThreadStatsTag(-844106272);
datagramSocket = new DatagramSocket();
} catch (Throwable th) {
th = th;
}
try {
DatagramPacket datagramPacket = new DatagramPacket(bArr, bArr.length, this.a, 53);
datagramSocket.setSoTimeout(6000);
datagramSocket.send(datagramPacket);
datagramSocket.receive(new DatagramPacket(bArr2, 1500));
datagramSocket.close();
return bArr2;
} catch (Throwable th2) {
th = th2;
datagramSocket2 = datagramSocket;
if (datagramSocket2 != null) {
datagramSocket2.close();
}
throw th;
}
}
@Override
public l.a.c d(String str) throws UnknownHostException {
List<InetAddress> lookup = lookup(str);
if (lookup != null) {
return new l.a.c(lookup, 4);
}
throw new g("PublicDns qyLookup failed for " + str);
}
@Override
public List<InetAddress> lookup(String str) throws UnknownHostException {
if (this.a == null) {
a("223.5.5.5");
}
if (this.a != null) {
ArrayList arrayList = new ArrayList();
try {
if (org.qiyi.net.s.g.f()) {
short b2 = a.b();
d[] c2 = a.c(b(a.a(str, b2, 28)), b2, str);
if (c2 != null) {
for (d dVar : c2) {
if (dVar.f17627b == 28) {
arrayList.add(InetAddress.getByName(dVar.a));
}
}
}
}
short b3 = a.b();
d[] c3 = a.c(b(a.a(str, b3, 1)), b3, str);
if (c3 != null) {
for (d dVar2 : c3) {
if (dVar2.f17627b == 1) {
arrayList.add(InetAddress.getByName(dVar2.a));
}
}
}
return arrayList;
} catch (IOException e2) {
e2.printStackTrace();
throw new g("PublicDns queryDns failed for " + str);
}
}
throw new g("PublicDns failed for " + str);
}
}