|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
×
反编译出来的
- ackage net.bbiagent.explorer.ui.admin;
- import java.awt.BorderLayout;
- import java.awt.Color;
- import java.awt.GridBagConstraints;
- import java.awt.GridBagLayout;
- import java.awt.Insets;
- import java.awt.event.ActionEvent;
- import java.awt.event.ActionListener;
- import java.io.LineNumberReader;
- import java.security.Signature;
- import java.util.Date;
- import java.util.Locale;
- import java.util.zip.CRC32;
- import javax.security.cert.X509Certificate;
- import javax.swing.JButton;
- import javax.swing.JLabel;
- import javax.swing.JPanel;
- import javax.swing.JTextField;
- import net.bbiagent.explorer.ui.base.f;
- import net.bbiagent.explorer.util.b;
- import net.bbiagent.explorer.util.d;
- // Referenced classes of package net.bbiagent.explorer.ui.admin:
- // h, i
- public final class c extends f
- {
- private JTextField a;
- private JTextField b;
- private JTextField c;
- private JTextField d;
- private JPanel e;
- private JButton f;
- private Object g[][];
- public c()
- {
- a = new JTextField();
- b = new JTextField();
- c = new JTextField();
- d = new JTextField();
- e = new JPanel();
- new JPanel();
- f = new JButton();
- g = (new Object[][] {
- new Object[] {
- "REF", a
- }, new Object[] {
- "RNAME", b
- }, new Object[] {
- "REMAIL", c
- }, new Object[] {
- "SNO", d
- }
- });
- }
- public final void a()
- throws Exception
- {
- Object aobj[][] = {
- {
- 0, a, "ref", new Integer(20)
- }, {
- 0, b, "nme", new Integer(20)
- }, {
- 0, c, "eml", new Integer(20)
- }, {
- 0, d, "sno", new Integer(20)
- }
- };
- e.setBackground(k);
- e.setLayout(new GridBagLayout());
- for(int j = 0; j < aobj.length; j++)
- {
- aobj[j][0] = new JLabel();
- JLabel jlabel;
- (jlabel = (JLabel)aobj[j][0]).setFont(l);
- jlabel.setText(h.w((String)aobj[j][2]));
- jlabel.setAlignmentX(2.0F);
- ((JTextField)aobj[j][1]).setBackground(Color.white);
- ((JTextField)aobj[j][1]).setColumns(((Integer)aobj[j][3]).intValue());
- e.add((JLabel)aobj[j][0], new GridBagConstraints(0, j, 1, 1, 0.0D, 0.0D, 13, 0, new Insets(4, 0, 0, 0), 0, 0));
- e.add((JTextField)aobj[j][1], new GridBagConstraints(1, j, 2, 1, 0.0D, 0.0D, 17, 0, new Insets(4, 0, 0, 0), 0, 0));
- }
- a.setEditable(false);
- a.setText(h.b("-"));
- f.setFont(l);
- f.setText(h.w("cfm"));
- e.add(f, new GridBagConstraints(1, aobj.length + 1, 2, 1, 0.0D, 0.0D, 17, 0, new Insets(20, 0, 0, 0), 0, 0));
- setLayout(new BorderLayout());
- add(e, "Center");
- f.addActionListener(new i(this));
- b.requestFocus();
- }
- public final void e()
- {
- f.setEnabled(h.i());
- }
- final void a(ActionEvent actionevent)
- {
- if(!c() || !d() || !f())
- {
- h.q("");
- return;
- } else
- {
- b();
- return;
- }
- }
- private boolean c()
- {
- String s;
- if((s = b.getText().trim()).length() == 0)
- {
- b.requestFocus();
- return false;
- } else
- {
- b.setText(s);
- return true;
- }
- }
- private boolean d()
- {
- String s;
- if((s = c.getText().trim()).length() == 0 || s.indexOf('@') < 0)
- {
- c.requestFocus();
- return false;
- } else
- {
- c.setText(s);
- return true;
- }
- }
- private boolean f()
- {
- String s;
- boolean flag;
- if(flag = (s = d.getText().trim()).length() == 22 && s.charAt(6) == '-' && s.charAt(15) == '-')
- {
- CRC32 crc32;
- (crc32 = new CRC32()).update(s.substring(0, 18).getBytes());
- long l1;
- l1 = (l1 = crc32.getValue()) & 65535L ^ l1 >> 16 & 65535L;
- flag = Long.parseLong(s.substring(18, 22), 16) == l1;
- }
- if(flag)
- {
- d.setText(s);
- } else
- {
- d.requestFocus();
- }
- return flag;
- }
- private void a(boolean flag)
- {
- f.setEnabled(flag);
- for(int j = 1; j < g.length; j++)
- {
- ((JTextField)g[j][1]).setEditable(flag);
- }
- }
- private int a(String s, String s1, String s2, String s3)
- {
- ((h)j).b(false);
- if(s.length() != 212)
- {
- return 1;
- }
- CRC32 crc32;
- (crc32 = new CRC32()).update(s.getBytes(), 8, 32);
- byte abyte0[] = net.bbiagent.explorer.util.d.b(s.substring(40, 212));
- h.l = Long.parseLong(s.substring(0, 8), 16) == crc32.getValue();
- if(!h.l)
- {
- return 3;
- }
- try
- {
- X509Certificate x509certificate = X509Certificate.getInstance(net.bbiagent.explorer.util.d.b(h.x()));
- Signature signature;
- (signature = Signature.getInstance(h.y())).initVerify(x509certificate.getPublicKey());
- byte abyte1[] = (s1 + s2 + s3).getBytes();
- signature.update(abyte1);
- h.l = signature.verify(abyte0);
- if(!h.l)
- {
- return 6;
- }
- }
- catch(Exception _ex)
- {
- return 5;
- }
- if(!a(s, h.n, "1"))
- {
- h.l = false;
- return 4;
- } else
- {
- ((h)j).a(b.getText(), c.getText());
- return 0;
- }
- }
- public final void b()
- {
- if(h.n.length() < 12)
- {
- return;
- }
- StringBuffer stringbuffer;
- (stringbuffer = new StringBuffer()).append("ref=" + h.b(""));
- h.n = h.n.substring(0, 12);
- stringbuffer.append("&mac=" + h.n);
- stringbuffer.append("&name=" + net.bbiagent.explorer.c.o(b.getText()));
- stringbuffer.append("&email=" + net.bbiagent.explorer.c.o(c.getText()));
- stringbuffer.append("&sn=" + net.bbiagent.explorer.c.o(d.getText()));
- a(false);
- b b1;
- if(!(b1 = new b(h)).a("reg.cgi", g() + "&" + stringbuffer.toString() + "&" + l()))
- {
- a(true);
- return;
- }
- try
- {
- LineNumberReader linenumberreader = b1.f();
- String s;
- while((s = linenumberreader.readLine()) != null)
- {
- if(s.charAt(0) != '0')
- {
- h.q(s.substring(1) + "(" + s.charAt(0) + ")");
- } else
- {
- int j = 0;
- if((j = a(s.substring(1), h.b(""), c.getText(), h.n)) > 0)
- {
- h.q(h.w("esn") + "(" + j + ")");
- }
- }
- }
- linenumberreader.close();
- }
- catch(Exception _ex) { }
- a(true);
- }
- private boolean a(String s, String s1, String s2)
- {
- String s3 = c.getText();
- String s4 = s.substring(40, 212);
- h.f("EMAIL", s3);
- h.f("SIG", s4);
- h.d("/etc/.user", "KEY=" + s.substring(0, 40) + s1 + "\nNAME=" + b.getText() + "\nEMAIL=" + s3 + "\nSIG=" + s4 + "\n");
- return h.s(s2);
- }
- private String g()
- {
- StringBuffer stringbuffer;
- (stringbuffer = new StringBuffer()).append("bversion=" + net.bbiagent.explorer.c.o("2.0.0"));
- stringbuffer.append("&bbuild=" + net.bbiagent.explorer.c.o("011"));
- stringbuffer.append("&country=" + net.bbiagent.explorer.c.o(h.f.getCountry()));
- stringbuffer.append("&lang=" + net.bbiagent.explorer.c.o(h.f.getLanguage()));
- stringbuffer.append("&mode=" + h.b());
- return stringbuffer.toString();
- }
- private String l()
- {
- Object aobj[][] = {
- {
- "cversion", "java.class.version"
- }, {
- "jversion", "java.version"
- }, {
- "oname", "os.name"
- }, {
- "oarch", "os.arch"
- }, {
- "oversion", "os.version"
- }
- };
- StringBuffer stringbuffer;
- (stringbuffer = new StringBuffer()).append("tz=" + net.bbiagent.explorer.c.o((new Date()).toString()));
- for(int j = 0; j < aobj.length; j++)
- {
- stringbuffer.append("&" + (String)aobj[j][0] + "=" + net.bbiagent.explorer.c.o(System.getProperty((String)aobj[j][1])));
- }
- return stringbuffer.toString();
- }
- // Unreferenced inner class net/bbiagent/explorer/ui/admin/i
- /* anonymous class */
- final class i
- implements ActionListener
- {
- final c a;
- public final void actionPerformed(ActionEvent actionevent)
- {
- a.a(actionevent);
- }
-
- {
- a = c.this;
- }
- }
- }
复制代码 |
|