百度手机卫士 v8.4.5版本的 MD5 值为:c65ef854a40bb6200c4d8c4603c58403
以下内容为反编译后的 eib.java 源代码,内容仅作参考
package dxoptimizer;
import com.baidu.sapi2.result.LoginResult;
import com.quickbird.sdk.internal.HttpsClient;
import java.io.StringReader;
import java.net.URLDecoder;
import java.net.URLEncoder;
import java.util.Stack;
import javax.xml.parsers.DocumentBuilderFactory;
import org.w3c.dom.Element;
import org.xml.sax.InputSource;
public class eib {
private static final String[] c = {"si", "indication", "info", "item"};
private static final String[] d = {"<?xml version=\"1.0\" encoding=\"\"?>", "<?xml version=\"1.2\" encoding=\"\"?>", "<?xml version=\"1.3\" encoding=\"\"?>"};
private static final String[] e = {"<!DOCTYPE si PUBLIC \"-//WAPFORUM//DTD SI 1.0//EN\" \"http://www.wapforum.org/DTD/si.dtd\">", "<!DOCTYPE sl PUBLIC \"-//WAPFORUM//DTD SL 1.0//EN\" \"http://www.wapforum.org/DTD/sl.dtd\">"};
private static final String[] f = {" action=\"signal-none\"", " action=\"signal-low\"", " action=\"signal-medium\"", " action=\"signal-high\"", " action=\"signal-delete\"", " created=\"", " href=\"", " href=\"http://", " href=\"http://www.", " href=\"https://", " href=\"https://www.", " si-expires=\"", " si-id=\"", " class=\"", " \""};
private static final String[] g = {".com/", ".edu/", ".net/", ".org/"};
private byte[] h;
private String i;
private String j;
Stack b = new Stack();
private String k = HttpsClient.HTTP_CHARSET;
public StringBuffer a = new StringBuffer("");
public eib(byte[] bArr) {
this.h = bArr;
this.b.clear();
a();
}
public void a() {
int i;
String str;
boolean z;
boolean z2;
boolean z3;
if (this.h == null) {
throw new Exception("WapPushWbxmParser data length is 0!");
}
int length = this.h.length;
switch (this.h[0]) {
case 1:
case 2:
case 3:
this.a.append(d[this.h[0] - 1]);
break;
}
String str2 = null;
boolean z4 = false;
boolean z5 = false;
for (int i2 = 1; i2 < length; i2 = i + 1) {
switch (this.h[i2]) {
case -125:
if (str2 != null) {
this.a.append(str2);
i = i2;
z = z4;
str = null;
z2 = z5;
break;
} else {
i = i2;
str = str2;
z = z4;
z2 = z5;
break;
}
case -58:
this.a.append("<indication ");
this.b.add("indication");
this.b.add(">");
i = i2;
str = str2;
z = z4;
z2 = z5;
break;
case 0:
i = i2;
str = str2;
z = z4;
z2 = z5;
break;
case 1:
String str3 = (String) this.b.pop();
StringBuffer stringBuffer = this.a;
if (!">".equals(str3)) {
str3 = "</" + str3 + ">";
}
stringBuffer.append(str3);
i = i2;
str = str2;
z = z4;
z2 = z5;
break;
case 3:
int i3 = i2 + 1;
i = i3;
while (i < this.h.length && this.h[i] != 0) {
i++;
}
byte[] bArr = new byte[i - i3];
System.arraycopy(this.h, i3, bArr, 0, i - i3);
if (z5) {
this.a.append(URLEncoder.encode(new String(bArr, this.k), this.k));
this.a.append("\"");
z3 = z4;
z2 = false;
} else {
if (bArr != null) {
this.a.append(new String(bArr, this.k));
}
if (z4) {
this.a.append("\"");
z3 = false;
z2 = z5;
} else {
z3 = z4;
z2 = z5;
}
}
String str4 = str2;
z = z3;
str = str4;
break;
case 5:
this.a.append(e[0]);
int i4 = i2 + 1;
switch (this.h[i4]) {
case 3:
this.k = "US-ASCII";
break;
case 4:
this.k = "iso-8859-1";
break;
case 106:
this.k = HttpsClient.HTTP_CHARSET;
break;
case 113:
this.k = "GBK";
break;
case 114:
this.k = "GB18030";
break;
}
case 6:
case 7:
case 8:
this.a.append(f[this.h[i2] - 5]);
i = i2;
str = str2;
z = z4;
z2 = z5;
break;
case 10:
this.a.append(f[this.h[i2] - 5]);
int i5 = i2 + 1;
if (this.h[i5] == -61) {
i5++;
}
int i6 = this.h[i5];
byte[] bArr2 = new byte[i6];
System.arraycopy(this.h, i5 + 1, bArr2, 0, i6 - 1);
this.a.append(a(bArr2));
this.a.append("\"");
i = i5 + i6;
str = str2;
z = z4;
z2 = z5;
break;
case 11:
case 12:
case 13:
case 14:
case 15:
this.a.append(f[this.h[i2] - 5]);
i = i2;
str = str2;
z = z4;
z2 = true;
break;
case 16:
this.a.append(f[this.h[i2] - 5]);
int i7 = i2 + 1;
if (this.h[i7] == -61) {
i7++;
}
int i8 = this.h[i7];
byte[] bArr3 = new byte[i8];
System.arraycopy(this.h, i7 + 1, bArr3, 0, i8 - 1);
this.a.append(a(bArr3));
this.a.append("\"");
i = i7 + i8;
str = str2;
z = z4;
z2 = z5;
break;
case 17:
case LoginResult.RESULT_CODE_LOGIN_TYPE_CONFLICT:
this.a.append(f[this.h[i2] - 5]);
i = i2;
z2 = z5;
str = str2;
z = true;
break;
case 69:
this.a.append("<si>");
this.b.add("si");
i = i2;
str = str2;
z = z4;
z2 = z5;
break;
default:
throw new Exception("Unkonwn byte: pos: " + i2 + " si=" + ((Object) this.a));
}
z5 = z2;
z4 = z;
str2 = str;
}
Element element = (Element) DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new InputSource(new StringReader(this.a.toString().replaceAll("&", "&")))).getDocumentElement().getElementsByTagName("indication").item(0);
this.j = URLDecoder.decode(element.getAttribute("href"), this.k);
this.i = element.getFirstChild().getNodeValue();
}
public String b() {
return this.i;
}
public String c() {
return this.j;
}
private String a(byte[] bArr) {
StringBuffer stringBuffer = new StringBuffer("");
switch (bArr.length) {
case 0:
return stringBuffer.toString();
case 4:
stringBuffer.append(a(bArr[0]));
stringBuffer.append(a(bArr[1]));
stringBuffer.append("-");
stringBuffer.append(a(bArr[2]));
stringBuffer.append("-");
stringBuffer.append(a(bArr[3]));
stringBuffer.append("T");
stringBuffer.append("00:00:00Z");
return stringBuffer.toString();
case 7:
stringBuffer.append(a(bArr[0]));
stringBuffer.append(a(bArr[1]));
stringBuffer.append("-");
stringBuffer.append(a(bArr[2]));
stringBuffer.append("-");
stringBuffer.append(a(bArr[3]));
stringBuffer.append("T");
stringBuffer.append(a(bArr[4]));
stringBuffer.append(":");
stringBuffer.append(a(bArr[5]));
stringBuffer.append(":");
stringBuffer.append(a(bArr[6]));
stringBuffer.append("Z");
return stringBuffer.toString();
default:
return stringBuffer.toString();
}
}
private int a(byte b) {
return (((byte) (b >> 4)) * 10) + ((byte) (b & 15));
}
}