📄 ag.java
字号:
// pica客户端J2ME源码,100%可运行可修改,J2ME逆向工程经典作品
// 作者:fangji999
// QQ:57979471 Email:fangji999@163.com
// 博客:http://hi.baidu.com/ccall_net
// QQ群:51719370
// 如用此源码重新改写的软件或转载,请保留本人联系方式,作品原创作者
package pica;
import java.util.Date;
import java.util.Vector;
import javax.microedition.lcdui.Display;
import utils.a;
import utils.b;
// Referenced classes of package pica:
// Pica, aa, ab, ac,
// ai, c, i, l,
// o, q, r, s,
// t, v, w
//主要XML消息处理管理连接
public final class ag
implements Runnable
{
q aq;
public ag(q q1)
{
aq = q1;
}
public final void run()
{
}
public final void a(utils.a a1, String s1)
throws Exception
{
if (s1.equals("cache"))
aq.g = true;
for (; a1.a() == 2; System.gc())
{
String s2;
if ((s2 = a1.b()) == null)
return;
if (s2.equals("jabber"))
{
//System.out.println("处理jabber消息:"+s2+":类型:"+s1);
b(a1, s1);
continue;
}
System.out.println("处理其消息:"+s2);
if (s2.equals("ad"))
a(a1);
}
}
private void a(utils.a a1)
throws Exception
{
int i1 = a1.a();
do
{
if (i1 != 2)
break;
String s1;
if ((s1 = a1.b()) == null)
return;
if (s1.equals("item"))
b(a1);
else
r(a1);
if ((i1 = a1.a()) == 3)
i1 = a1.a();
} while (true);
}
private void b(utils.a a1)
throws Exception
{
String s1 = a1.a("type");
String s2;
Pica.aX = Integer.parseInt(s2 = a1.a("id"));
String s3 = a1.a("action");
String s4 = a1.a("target");
String s5 = a1.a("param0");
String s6 = "";
String s7 = "";
String s8 = "";
while (a1.a() == 2)
if (a1.b().equals("text"))
s6 = q(a1);
else
if (a1.b().equals("media"))
{
s7 = a1.a("src");
s8 = a1.a("alt");
} else
{
r(a1);
}
l l1 = new l(Pica.l, s1, s2, s3, s4, s5, s6, s7, s8);
Pica.aY.addElement(l1);
}
private void b(utils.a a1, String s1)
throws Exception
{
boolean flag = !aq.d;
while (a1.a() == 2)
{
String s2;
if ((s2 = a1.b()) == null)
return;
if (s2.equals("sid"))
{
if (!aq.d)
{
aq.d = true;
aq.e = q(a1);
} else
{
r(a1);
}
} else
{
if (s2.equals("jerror"))
{
if (flag)
aq.d = false;
aq.j = q(a1);
aq.f = true;
if (aq.j.equals("连接中断"))
Pica.W = true;
throw new Exception(aq.j);
}
if (s2.equals("message"))
{
if (s1.equals("cache"))
aq.g = false;
n(a1);
} else
if (s2.equals("presence"))
{
if (s1.equals("cache"))
aq.g = false;
Pica.aR = true;
m(a1);
} else
if (s2.equals("iq"))
{
if (s1.equals("cache"))
aq.g = false;
h(a1);
} else
{
r(a1);
}
}
}
}
private void c(utils.a a1, String s1)
throws Exception
{
while (a1.a() == 2)
if (a1.b().equals("item"))
{
a1.a("type");
String s2 = a1.a("jid");
String s3 = a1.a("name");
String s4 = a1.a("online");
String s5 = "";
while (a1.a() == 2)
if (a1.b().equals("group"))
s5 = q(a1);
else
r(a1);
pica.s.a(s2, s3, s4, s5);
} else
{
r(a1);
}
}
private void c(utils.a a1)
throws Exception
{
String s1 = "";
while (a1.a() == 2)
if (a1.b().equals("CATEGORY"))
s1 = q(a1);
else
r(a1);
pica.s.e(s1);
}
private void d(utils.a a1)
throws Exception
{
Object obj = null;
Object obj1 = null;
Object obj2 = null;
Object obj3 = null;
String s5 = "";
do
{
if (a1.a() != 2)
break;
if (a1.b().equals("item"))
{
String s1 = a1.a("jid");
String s2 = a1.a("name");
String s3 = a1.a("online");
String s4 = a1.a("subscription");
while (a1.a() == 2)
if (a1.b().equals("group"))
s5 = q(a1);
else
r(a1);
pica.s.a(s1, s2, s3, s4, s5, false);
if (!s4.equals("pending") && Pica.M != null && !Pica.M.equals(s1) && Pica.J.b(s1).t == 0)
{
Pica.h.h(s1, "online");
Pica.J.b(s1).t = 1;
} else
if (!s4.equals("pending") && Pica.M == null && Pica.J.b(s1).t == 0)
{
Pica.h.h(s1, "online");
Pica.J.b(s1).t = 1;
}
} else
{
r(a1);
}
} while (true);
}
private void d(utils.a a1, String s1)
throws Exception
{
boolean flag = false;
int i1;
if ((i1 = a1.a()) == 3)
{
aq.h.e();
return;
}
for (; i1 == 2; i1 = a1.a())
if (a1.b().equals("item"))
{
a1.a("type");
String s2 = a1.a("jid");
String s3 = a1.a("name");
String s4 = a1.a("subscription");
String s5 = a1.a("ask");
String s6 = a1.a("cast");
String s7 = s2.indexOf('/') != -1 ? s2.substring(0, s2.indexOf('/')) : s2;
String s8 = "";
while (a1.a() == 2)
if (a1.b().equals("group"))
s8 = q(a1);
else
r(a1);
if (s4 != null && s4.equals("remove"))
{
aq.h.g(s7);
continue;
}
if ((s5 == null || !s5.equals("subscribe")) && s4 != null && (s4.equals("from") || s4.equals("none")) || s5 != null && s5.equals("unsubscribe"))
continue;
byte byte0;
if (s5 != null && s5.equals("subscribe"))
byte0 = 1;
else
byte0 = 2;
//处理组员
aq.h.a(s7, s3, s8, byte0, pica.c.a(s8), (byte)0, (String[][])null, false, s6, "", "");
} else
{
r(a1);
}
aq.h.e();
}
private void e(utils.a a1)
throws Exception
{
String s1 = "";
while (a1.a() == 2)
if (a1.b().equals("username"))
q(a1);
else
if (a1.b().equals("password"))
s1 = q(a1);
else
r(a1);
w.m = s1;
w.p();
pica.w.a("密码修改成功,你的新密码为:" + s1, 3000, Pica.l);
}
private void f(a a1)
throws Exception
{
while (a1.a() == 2)
if (a1.b().equals("item"))
{
String s1 = a1.a("jid");
String s2 = a1.a("name");
String s3 = s1.indexOf('/') != -1 ? s1.substring(0, s1.indexOf('/')) : s1;
String s4 = "";
while (a1.a() == 2)
if (a1.b().equals("group"))
s4 = q(a1);
else
r(a1);
Pica.aR = false;
aq.h.a(s3, s2, s4, (byte)11, (byte)0, (byte)0, (String[][])null, false, "", "", "");
Pica.aR = true;
} else
{
r(a1);
}
}
private void g(utils.a a1)
throws Exception
{
Object obj = null;
String s2 = null;
Object obj1 = null;
Object obj2 = null;
Object obj3 = null;
String s6 = null;
String s7 = null;
String as[][] = (String[][])null;
boolean flag = false;
while (a1.a() == 2)
if (a1.b().equals("item"))
{
int i1 = 0;
String s9 = a1.a("jid");
String s10 = a1.a("name");
String s11 = a1.a("type");
String s12 = s9.indexOf('/') != -1 ? s9.substring(0, s9.indexOf('/')) : s9;
label0:
do
{
if (a1.a() != 2)
break;
if (a1.b().equals("group"))
{
s2 = q(a1);
continue;
}
if (a1.b().equals("x"))
{
String s3;
if ((s3 = a1.a("type")).equals("msg"))
flag = true;
else
if (s3.equals("wap"))
{
if ((s6 = a1.a("auth")) == null)
s6 = "";
if ((s7 = a1.a("ztype")) == null)
s7 = "";
}
do
{
do
if (a1.a() != 2)
continue label0;
while (!a1.b().equals("option"));
if (as == null)
as = new String[20][5];
String s5 = a1.a("value");
String s1 = a1.a("name");
String s4 = a1.a("to");
a1.a();
as[i1][0] = Integer.toString(i1);
as[i1][1] = s3;
as[i1][2] = s1;
as[i1][3] = s5;
as[i1][4] = s4;
i1++;
} while (true);
}
r(a1);
} while (true);
Pica.aR = false;
aq.h.a(s12, s10, s2, (byte)11, (byte)0, (byte)0, as, flag, s6, s11, s7);
Pica.aR = true;
if (as != null)
{
for (int j1 = 0; j1 < 20; j1++)
{
for (int k1 = 0; k1 < 5; k1++)
as[j1][k1] = null;
}
}
as = (String[][])null;
flag = false;
} else
{
r(a1);
}
String s8 = "";
if (Pica.h.a.indexOf('@') > 0)
{
//String = s8 + Pica.h.a.substring(0, Pica.h.a.indexOf('@'));
s8= Pica.h.a.substring(0, Pica.h.a.indexOf('@'));
return;
} else
{
//String 1 = s8 + Pica.h.a;
s8 = Pica.h.a;
return;
}
}
private String h(a a1)
throws Exception
{
String s1 = a1.a("type");
String s2 = a1.a("id");
String s3 = a1.a("from");
String s4 = a1.a("to");
if (s1.equals("error"))
while (a1.a() == 2)
if (a1.b().equals("error"))
{
String s5 = q(a1);
pica.s.a(s3, s5);
} else
{
r(a1);
}
else
if (s1.equals("result") && s2 != null && s2.equals("auth"))
r(a1);
else
do
{
if (a1.a() != 2)
break;
String s6;
if (a1.b().equals("query"))
{
if ((s6 = a1.a("xmlns")) == null || s6.length() == 0)
r(a1);
else
if (s6.equals("jabber:iq:roster"))
try
{
d(a1, s1);//联系人信息
}
catch (Exception exception)
{
pica.w.a("获取联系人时" + exception.getMessage(), 2000, Pica.l);
}
else
if (s6.equals("jabber:iq:version"))
while (a1.a() == 2)
r(a1);
else
if (s6.equals("vcard-temp"))
{
if (s1.equals("set"))
a(a1, s4, s3, true);
else
a(a1, s4, s3, false);
} else
if (s6.equals("jabber:iq:newsearch"))
a(s3, a1);
else
if (s6.equals("jabber:iq:blacklist"))
l(a1);
else
if (s6.equals("jabber:iq:picazone"))
g(a1);
else
if (s6.equals("jabber:iq:register") && s1.equals("set"))
e(a1);
else
if (s6.equals("jabber:iq:newgroup"))
k(a1);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -