百度手机卫士 v8.4.5版本的 MD5 值为:c65ef854a40bb6200c4d8c4603c58403
以下内容为反编译后的 frl.java 源代码,内容仅作参考
package dxoptimizer;
import android.content.Context;
import android.net.DhcpInfo;
import android.net.wifi.WifiManager;
import android.os.SystemClock;
import android.text.TextUtils;
import android.util.Base64;
import com.baidu.im.frame.pb.EnumPlatformType;
import com.baidu.mobads.interfaces.utils.IXAdSystemUtils;
import java.lang.ref.WeakReference;
public class frl {
private static final String[] b = {"192.168.1.1", "192.168.0.1", "10.0.0.2", "10.0.0.1"};
private static final String[][] c = {new String[]{"admin", "admin"}, new String[]{"admin", ""}, new String[]{"admin", "password"}, new String[]{"guest", "guest"}, new String[]{"root", "root"}, new String[]{"root", "admin"}, new String[]{"admin", "000000"}, new String[]{"admin", "123456"}, new String[]{"root", "123456"}};
fry a;
private WeakReference d;
private WifiManager e;
private fta g;
private Context i;
private boolean h = false;
private ftb f = new ftb();
public frl(Context context, frf frfVar) {
this.i = context.getApplicationContext();
this.e = (WifiManager) this.i.getApplicationContext().getSystemService(IXAdSystemUtils.NT_WIFI);
if (frfVar != null) {
a(frfVar);
}
this.a = new fry();
}
public void a(frf frfVar) {
this.d = new WeakReference(frfVar);
}
private frf b() {
if (this.d == null) {
return null;
}
return (frf) this.d.get();
}
private String c() {
DhcpInfo dhcpInfo = this.e.getDhcpInfo();
if (dhcpInfo != null) {
return fsa.b(dhcpInfo.gateway);
}
return null;
}
private boolean d() {
String c2 = c();
if (TextUtils.isEmpty(c2)) {
return false;
}
return a(c2);
}
private boolean a(String str) {
StringBuilder sb = new StringBuilder();
sb.append("http://").append(str).append("/");
String[] a = frm.a(sb.toString());
if (Integer.valueOf(a[0]).intValue() != 401) {
return false;
}
this.f.e = sb.toString();
this.g = this.f.a(this.i, a[1]);
return true;
}
private boolean e() {
for (String[] strArr : c) {
if (a(strArr[0], strArr[1])) {
hts.a(this.i);
hts.a("ps", "ps_rls", (Number) 1);
return true;
}
}
hts.a(this.i);
hts.a("ps", "ps_rlf", (Number) 1);
return false;
}
private boolean a(String str, String str2) {
String str3 = new String(Base64.encode((str + ":" + str2).getBytes(), 2));
if (200 != frm.a(this.f.e, str3, null)) {
return false;
}
this.f.b = str;
this.f.c = str2;
this.f.d = str3;
this.h = true;
return true;
}
private void a(frf frfVar, int i) {
if (frfVar != null) {
frfVar.a(i);
}
}
private void a(frf frfVar, int i, Object obj) {
if (frfVar != null) {
if (obj instanceof ftd) {
ftd ftdVar = (ftd) obj;
frfVar.a(i, !ftdVar.a || ftdVar.b);
} else if (obj instanceof Boolean) {
frfVar.a(i, ((Boolean) obj).booleanValue());
}
}
}
public fry a() {
this.a = frr.a(this.i).a(fon.a(this.i));
if (this.a == null || (this.a.a(this.i) != -1 && this.a.a(this.i) != 128)) {
g();
} else {
f();
}
return this.a;
}
private void f() {
frf b2 = b();
if (b2 != null) {
b2.a(EnumPlatformType.WINDOW_MOBILE);
a(EnumPlatformType.WINDOW_MOBILE);
a(b2, EnumPlatformType.WINDOW_MOBILE, Boolean.valueOf(this.a.a));
if (this.a.a) {
b2.a(256);
SystemClock.sleep(1000L);
a(b2, 256, Boolean.valueOf(this.a.c));
b2.a(4);
SystemClock.sleep(1000L);
a(b2, 4, this.a.e.get(4));
b2.a(8);
a(b2, 8, this.a.e.get(8));
b2.a(32);
SystemClock.sleep(1000L);
a(b2, 32, this.a.e.get(32));
b2.a(2);
SystemClock.sleep(1000L);
a(b2, 2, this.a.e.get(2));
b2.a(64);
SystemClock.sleep(1000L);
a(b2, 64, Boolean.valueOf(this.a.b));
}
b2.b();
}
}
private void g() {
this.a = new fry();
String a = fon.a(this.i);
frf b2 = b();
boolean z = b2 == null;
a(b2, EnumPlatformType.WINDOW_MOBILE);
a(EnumPlatformType.WINDOW_MOBILE);
a(b2, EnumPlatformType.WINDOW_MOBILE, Boolean.valueOf(this.a.a));
if (this.a.a) {
a(b2, 256);
a(256);
if (!z) {
SystemClock.sleep(1000L);
}
a(b2, 256, Boolean.valueOf(this.a.c));
a(b2, 4);
boolean z2 = false;
if (!z) {
b2.a();
}
boolean d = d();
if (!z) {
b2.a(d);
}
if (d) {
z2 = e();
}
if (!z) {
b2.a(z2, this.f.a());
}
if (z2 && this.g != null) {
a(4);
a(b2, 4, this.a.e.get(4));
a(b2, 8);
a(8);
a(b2, 8, this.a.e.get(8));
a(b2, 32);
a(32);
a(b2, 32, this.a.e.get(32));
a(b2, 2);
a(2);
a(b2, 2, this.a.e.get(2));
} else {
fsu fsuVar = new fsu(this.i, this.f);
this.a.e.put(4, fsuVar.b().b());
this.a.e.put(8, fsuVar.c().b());
this.a.e.put(32, fsuVar.d().b());
this.a.e.put(2, fsuVar.a().b());
if (!z) {
SystemClock.sleep(1000L);
}
a(b2, 4, fsuVar.b().b());
a(b2, 8);
if (!z) {
SystemClock.sleep(1000L);
}
a(b2, 8, fsuVar.c().b());
a(b2, 32);
if (!z) {
SystemClock.sleep(1000L);
}
a(b2, 32, fsuVar.d().b());
a(b2, 2);
if (!z) {
SystemClock.sleep(1000L);
}
a(b2, 2, fsuVar.a().b());
}
a(b2, 64);
a(64);
if (!z) {
SystemClock.sleep(1000L);
}
a(b2, 64, Boolean.valueOf(this.a.b));
}
this.a.d = System.currentTimeMillis();
frr.a(this.i).a(a, this.a);
if (!z) {
b2.b();
}
}
private void a(int i) {
switch (i) {
case 2:
fsz a = this.g.a();
a.a();
this.a.e.put(Integer.valueOf(i), a.b());
return;
case 4:
fsz b2 = this.g.b();
b2.a();
this.a.e.put(Integer.valueOf(i), b2.b());
return;
case 8:
fsz c2 = this.g.c();
c2.a();
this.a.e.put(Integer.valueOf(i), c2.b());
return;
case 32:
fsz d = this.g.d();
d.a();
this.a.e.put(Integer.valueOf(i), d.b());
return;
case 64:
this.a.b = true;
return;
case EnumPlatformType.WINDOW_MOBILE:
this.a.a = fsa.a(this.i);
return;
case 256:
this.a.c = fon.d(this.i) ? false : true;
return;
default:
return;
}
}
}