-
-
[求助]用wifi联网注册的时候一直显示“网络故障30,请重试!”,是啥原因?谁给看看
-
发表于: 2013-3-21 09:45 6962
-
下面的apk,用wifi联网注册的时候一直显示“网络故障30,请重试!”,是啥原因?
这个是app ZuCe.apk
package com.EnPadF.ZuCe; import android.app.Activity; import android.app.AlertDialog; import android.app.AlertDialog.Builder; import android.app.Dialog; import android.app.ProgressDialog; import android.content.Context; import android.content.DialogInterface; import android.content.DialogInterface.OnClickListener; import android.content.Intent; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; import android.os.Build.VERSION; import android.os.Bundle; import android.os.Environment; import android.os.Handler; import android.os.Message; import android.text.Editable; import android.text.format.Time; import android.view.Display; import android.view.KeyEvent; import android.view.View; import android.view.View.OnClickListener; import android.view.View.OnKeyListener; import android.view.WindowManager; import android.widget.AbsoluteLayout.LayoutParams; import android.widget.Button; import android.widget.EditText; import android.widget.TextView; import android.widget.Toast; import java.io.BufferedReader; import java.io.DataOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.InputStream; import java.io.InputStreamReader; import java.io.PrintStream; import java.io.RandomAccessFile; import java.net.HttpURLConnection; import java.net.Inet4Address; import java.net.InetAddress; import java.net.NetworkInterface; import java.net.SocketException; import java.net.URL; import java.util.Collections; import java.util.Iterator; import java.util.List; import java.util.Timer; import java.util.TimerTask; import javax.xml.parsers.SAXParser; import javax.xml.parsers.SAXParserFactory; import org.xml.sax.InputSource; import org.xml.sax.XMLReader; public class ZuCe extends Activity { private static final int DISMISS_PROGRESS_DIALOG = 2; private static final int REGISTER_NOT_EXIT_NO_WIFI = 3; private static final int SHOW_PROGRESS_DIALOG = 1; public static String down_file_name; private static int m_IsDownloadMacFile = 0; private int HaveGetCode = 0; private String INTERNAL_CACHE_DIR = "/data/data/com.EnPadF.ZuCe/cache"; private int LCD_H; private int LCD_W; private int SerNo_Index = 0; private AlertDialog alertDialog = null; private byte[] btr_buf = new byte[50]; private Button button_0; private Button button_1; private Button button_2; private Button button_3; private Button button_4; private Button button_5; private Button button_6; private Button button_7; private Button button_8; private Button button_9; private Button button_autoreg; private Button button_del; private Button button_ok; private String ctr_buf = ""; private int dlg_type = 0; private String down_mac_Url; private String dtr_buf = ""; private List<Enpad> enpadList; public RandomAccessFile fSysReg; public RandomAccessFile fbin; private int getser_ok = 0; Handler handler; private byte[] http256bin = new byte[260]; private char[] inbuf = new char[50]; private int inlen = 0; public String ipaddr; private String kf_name = ""; private String kf_regbin_name = "reg_pad0505.bin"; private int local_isregistered; private Enpad mEnpad; private Handler mHandler = null; private ProgressDialog mProgressDialog; private Runnable mRunnable = null; private Timer mTimer; private TimerTask mTimerTask; public int m_AutoUpdateTime; private int m_RegCodeType = 0; private String mac_str; private byte[] msgbuf = new byte[64]; View.OnClickListener myButtonPro = new View.OnClickListener() { public void onClick(View paramView) { int m = 0; Object localObject1; Object localObject3; switch (paramView.getId()) { case 2131034123: m = 0 + 1; case 2131034122: m++; case 2131034121: m++; case 2131034120: m++; case 2131034119: m++; case 2131034118: m++; case 2131034117: m++; case 2131034116: m++; case 2131034115: m++; case 2131034114: ZuCe.this.getEditData(); if (ZuCe.this.inlen < 20) { localObject1 = ZuCe.this.inbuf; localObject3 = ZuCe.this; int j = ((ZuCe)localObject3).inlen; ((ZuCe)localObject3).inlen = (j + 1); localObject1[j] = (char)(m + 48); } ZuCe.this.myEdit.setText(ZuCe.this.inbuf, 0, ZuCe.this.inlen); ZuCe.this.myEdit.setSelection(ZuCe.this.inlen); break; case 2131034124: ZuCe.this.getEditData(); if ((ZuCe.this.inlen < 1) || (!ZuCe.this.Register_PrePare())) break; ZuCe.this.Register_Pro(); break; case 2131034125: ZuCe.this.getEditData(); if (ZuCe.this.inlen < 1) break; localObject1 = ZuCe.this; ((ZuCe)localObject1).inlen = (-1 + ((ZuCe)localObject1).inlen); ZuCe.this.myEdit.setText(ZuCe.this.inbuf, 0, ZuCe.this.inlen); ZuCe.this.myEdit.setSelection(ZuCe.this.inlen); break; case 2131034126: if (ZuCe.this.getser_ok == 1) break; ZuCe.this.getser_ok = 1; localObject1 = ZuCe.this.GetMacStr(); localObject1 = ZuCe.this.strUpr((String)localObject1); if (ZuCe.downloadBIN(ZuCe.this.down_mac_Url + "test" + "/" + (String)localObject1 + ".bin", ZuCe.this.path, localObject1 + ".bin")) { ZuCe.this.local_isregistered = ZuCe.this.pubFun.lib_cetFileCheck(ZuCe.this.path, ZuCe.this.path.length()); if ((0x2000 & ZuCe.this.local_isregistered) != 8192) System.out.println("**注册文件下载e... "); } else { ZuCe.this.inlen = 0; Object localObject2 = ZuCe.this.inbuf; localObject3 = ZuCe.this; int i = ((ZuCe)localObject3).inlen; ((ZuCe)localObject3).inlen = (i + 1); localObject2[i] = 51; localObject2 = ZuCe.this.inbuf; localObject3 = ZuCe.this; i = ((ZuCe)localObject3).inlen; ((ZuCe)localObject3).inlen = (i + 1); localObject2[i] = 49; localObject3 = ZuCe.this.inbuf; localObject2 = ZuCe.this; i = ((ZuCe)localObject2).inlen; ((ZuCe)localObject2).inlen = (i + 1); localObject3[i] = 57; for (i = 3; i < 19; i++) { localObject2 = ZuCe.this.inbuf; ZuCe localZuCe2 = ZuCe.this; int k = localZuCe2.inlen; localZuCe2.inlen = (k + 1); localObject2[k] = 56; } localObject2 = ZuCe.this.inbuf; ZuCe localZuCe1 = ZuCe.this; i = localZuCe1.inlen; localZuCe1.inlen = (i + 1); localObject2[i] = 57; ZuCe.this.inlen = 20; ZuCe.this.regcode_type = 1; if (!ZuCe.this.Register_PrePare()) break; ZuCe.this.Register_testPro(); break; } if (ZuCe.this.local_isregistered != 12287) ZuCe.this.AfxMsg_timer("试用版 注册文件已经恢复!"); else ZuCe.this.AfxMsg_timer("试用期已过,请购买正式版!"); } } }; private EditText myEdit; View.OnKeyListener myEditSetOnKeyListener = new View.OnKeyListener() { public boolean onKey(View paramView, int paramInt, KeyEvent paramKeyEvent) { ZuCe.this.getEditData(); return false; } }; private TextView mySerNo; private TextView myText; private String nettest_url; private String path; public pubfunc pubFun; private int regcode_type; private String requestURL = "http://www.enpad18.com/"; private File sdDir = null; private File sdcardDir; private byte[] snbuf = new byte[30]; private String str_check; public Time sys_t = new Time(); private int timer_countTime = 255; private byte timer_type = 0; private String upload_delexe_Url; private String upload_findexe_Url; private String upload_regfind_Url; private void DelErrRegFile(String paramString) { File localFile = new File(paramString); if (localFile.exists()) localFile.delete(); } private void ExitPro() { this.mTimer.cancel(); this.timer_countTime = 255; finish(); } private void GetLcdSize() { Display localDisplay = getWindowManager().getDefaultDisplay(); int i = localDisplay.getWidth(); int j = localDisplay.getHeight(); if (j != 444) { if (j != 564) { if (j == 732) j = 768; } else j = 600; } else j = 480; this.LCD_W = i; this.LCD_H = j; this.btr_buf[19] = 15; switch (i) { default: this.btr_buf[20] = 14; break; case 160: this.btr_buf[20] = 1; break; case 240: this.btr_buf[20] = 2; break; case 272: this.btr_buf[20] = 3; break; case 320: this.btr_buf[20] = 4; break; case 360: this.btr_buf[20] = 5; break; case 480: this.btr_buf[20] = 6; break; case 576: this.btr_buf[20] = 7; break; case 600: this.btr_buf[20] = 8; break; case 640: this.btr_buf[20] = 9; break; case 768: this.btr_buf[20] = 10; break; case 800: this.btr_buf[20] = 11; break; case 1024: this.btr_buf[20] = 12; break; case 1440: this.btr_buf[20] = 13; } switch (j) { default: this.btr_buf[21] = 14; break; case 160: this.btr_buf[21] = 1; break; case 240: this.btr_buf[21] = 2; break; case 272: this.btr_buf[21] = 3; break; case 320: this.btr_buf[21] = 4; break; case 360: this.btr_buf[21] = 5; break; case 480: this.btr_buf[21] = 6; break; case 576: this.btr_buf[21] = 7; break; case 600: this.btr_buf[21] = 8; break; case 640: this.btr_buf[21] = 9; break; case 768: this.btr_buf[21] = 10; break; case 800: this.btr_buf[21] = 11; break; case 1024: this.btr_buf[21] = 12; break; case 1440: this.btr_buf[21] = 13; } System.out.println("**LCD_W = " + i); System.out.println("** LCD_W = " + j); } private boolean Register_PrePare() { int k = 0; if (downloadBIN(this.nettest_url, this.INTERNAL_CACHE_DIR, "net.bin")) { if (this.pubFun.lib_NetCheck(this.INTERNAL_CACHE_DIR, this.INTERNAL_CACHE_DIR.length()) == 1) { int i = 1; if (this.inlen != 20) i = 0; for (int j = 0; j < 20; j++) { if ((this.inbuf[j] <= '9') && (this.inbuf[j] >= '0')) continue; i = 0; } if (i != 0) { k = 1; } else { AfxMsg_noexit("注册码格式不对!"); System.out.println("**注册码格式不对 2 "); this.getser_ok = 0; } } else { AfxMsg_noexit("网络故障20"); System.out.println("**网络故障 2 "); this.getser_ok = 0; } } else { AfxMsg_noexit("网络故障10"); System.out.println("**网络故障 1 "); this.getser_ok = 0; } return k; } // ERROR // public static boolean download(String paramString1, String paramString2, String paramString3) { // Byte code: // 0: aconst_null // 1: astore 5 // 3: aconst_null // 4: astore 6 // 6: iconst_0 // 7: istore_3 // 8: new 373 java/io/BufferedReader // 11: dup // 12: new 375 java/io/InputStreamReader // 15: dup // 16: new 377 java/net/URL // 19: dup // 20: aload_0 // 21: invokespecial 378 java/net/URL:<init> (Ljava/lang/String;)V // 24: invokevirtual 382 java/net/URL:openStream ()Ljava/io/InputStream; // 27: invokespecial 385 java/io/InputStreamReader:<init> (Ljava/io/InputStream;)V // 30: invokespecial 388 java/io/BufferedReader:<init> (Ljava/io/Reader;)V // 33: astore 5 // 35: new 209 java/io/File // 38: dup // 39: aload_1 // 40: invokespecial 211 java/io/File:<init> (Ljava/lang/String;)V // 43: invokevirtual 391 java/io/File:mkdirs ()Z // 46: pop // 47: new 393 java/io/BufferedWriter // 50: dup // 51: new 395 java/io/OutputStreamWriter // 54: dup // 55: new 397 java/io/FileOutputStream // 58: dup // 59: new 209 java/io/File // 62: dup // 63: aload_1 // 64: aload_2 // 65: invokespecial 400 java/io/File:<init> (Ljava/lang/String;Ljava/lang/String;)V // 68: invokespecial 403 java/io/FileOutputStream:<init> (Ljava/io/File;)V // 71: invokespecial 406 java/io/OutputStreamWriter:<init> (Ljava/io/OutputStream;)V // 74: invokespecial 409 java/io/BufferedWriter:<init> (Ljava/io/Writer;)V // 77: astore 6 // 79: aload 5 // 81: invokevirtual 412 java/io/BufferedReader:readLine ()Ljava/lang/String; // 84: astore 4 // 86: aload 4 // 88: ifnonnull +40 -> 128 // 91: aload 6 // 93: invokevirtual 415 java/io/BufferedWriter:flush ()V // 96: iconst_1 // 97: istore_3 // 98: aload 6 // 100: astore 6 // 102: aload 5 // 104: astore 5 // 106: aload 6 // 108: ifnull +8 -> 116 // 111: aload 6 // 113: invokevirtual 418 java/io/BufferedWriter:close ()V // 116: aload 5 // 118: ifnull +8 -> 126 // 121: aload 5 // 123: invokevirtual 419 java/io/BufferedReader:close ()V // 126: iload_3 // 127: ireturn // 128: aload 6 // 130: aload 4 // 132: invokevirtual 422 java/io/BufferedWriter:write (Ljava/lang/String;)V // 135: goto -56 -> 79 // 138: astore 4 // 140: aload 6 // 142: astore 6 // 144: aload 5 // 146: astore 5 // 148: aload 4 // 150: invokevirtual 425 java/lang/Exception:printStackTrace ()V // 153: goto -47 -> 106 // 156: pop // 157: goto -51 -> 106 // 160: astore 4 // 162: aload 4 // 164: invokevirtual 426 java/io/IOException:printStackTrace ()V // 167: goto -51 -> 116 // 170: astore 4 // 172: aload 4 // 174: invokevirtual 426 java/io/IOException:printStackTrace ()V // 177: goto -51 -> 126 // 180: pop // 181: aload 5 // 183: astore 5 // 185: goto -79 -> 106 // 188: pop // 189: aload 6 // 191: astore 6 // 193: aload 5 // 195: astore 5 // 197: goto -91 -> 106 // 200: astore 4 // 202: goto -54 -> 148 // 205: astore 4 // 207: aload 5 // 209: astore 5 // 211: goto -63 -> 148 // // Exception table: // from to target type // 79 96 138 java/lang/Exception // 128 135 138 java/lang/Exception // 8 35 156 finally // 148 153 156 finally // 111 116 160 java/io/IOException // 121 126 170 java/io/IOException // 35 79 180 finally // 79 96 188 finally // 128 135 188 finally // 8 35 200 java/lang/Exception // 35 79 205 java/lang/Exception } // ERROR // public static boolean downloadBIN(String paramString1, String paramString2, String paramString3) { // Byte code: // 0: aconst_null // 1: astore 4 // 3: iconst_0 // 4: istore_3 // 5: getstatic 259 java/lang/System:out Ljava/io/PrintStream; // 8: new 261 java/lang/StringBuilder // 11: dup // 12: ldc_w 430 // 15: invokespecial 264 java/lang/StringBuilder:<init> (Ljava/lang/String;)V // 18: aload_0 // 19: invokevirtual 433 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder; // 22: invokevirtual 272 java/lang/StringBuilder:toString ()Ljava/lang/String; // 25: invokevirtual 277 java/io/PrintStream:println (Ljava/lang/String;)V // 28: getstatic 259 java/lang/System:out Ljava/io/PrintStream; // 31: new 261 java/lang/StringBuilder // 34: dup // 35: ldc_w 435 // 38: invokespecial 264 java/lang/StringBuilder:<init> (Ljava/lang/String;)V // 41: aload_2 // 42: invokevirtual 433 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder; // 45: invokevirtual 272 java/lang/StringBuilder:toString ()Ljava/lang/String; // 48: invokevirtual 277 java/io/PrintStream:println (Ljava/lang/String;)V // 51: new 437 org/apache/http/impl/client/DefaultHttpClient // 54: dup // 55: invokespecial 438 org/apache/http/impl/client/DefaultHttpClient:<init> ()V // 58: new 440 org/apache/http/client/methods/HttpGet // 61: dup // 62: aload_0 // 63: invokespecial 441 org/apache/http/client/methods/HttpGet:<init> (Ljava/lang/String;)V // 66: invokeinterface 447 2 0 // 71: invokeinterface 453 1 0 // 76: astore 5 // 78: aload 5 // 80: invokeinterface 459 1 0 // 85: pop2 // 86: aload 5 // 88: invokeinterface 462 1 0 // 93: astore 5 // 95: aload 5 // 97: ifnull +63 -> 160 // 100: new 209 java/io/File // 103: dup // 104: aload_1 // 105: invokespecial 211 java/io/File:<init> (Ljava/lang/String;)V // 108: invokevirtual 391 java/io/File:mkdirs ()Z // 111: pop // 112: new 397 java/io/FileOutputStream // 115: dup // 116: new 209 java/io/File // 119: dup // 120: aload_1 // 121: aload_2 // 122: invokespecial 400 java/io/File:<init> (Ljava/lang/String;Ljava/lang/String;)V // 125: invokespecial 403 java/io/FileOutputStream:<init> (Ljava/io/File;)V // 128: astore 4 // 130: sipush 16384 // 133: newarray byte // 135: astore 6 // 137: iconst_0 // 138: istore 7 // 140: aload 5 // 142: aload 6 // 144: invokevirtual 468 java/io/InputStream:read ([B)I // 147: istore 8 // 149: iload 8 // 151: bipush 255 // 153: if_icmpne +35 -> 188 // 156: aload 4 // 158: astore 4 // 160: aload 4 // 162: invokevirtual 469 java/io/FileOutputStream:flush ()V // 165: iconst_1 // 166: istore_3 // 167: getstatic 259 java/lang/System:out Ljava/io/PrintStream; // 170: ldc_w 471 // 173: invokevirtual 277 java/io/PrintStream:println (Ljava/lang/String;)V // 176: aload 4 // 178: ifnull +8 -> 186 // 181: aload 4 // 183: invokevirtual 472 java/io/FileOutputStream:close ()V // 186: iload_3 // 187: ireturn // 188: aload 4 // 190: aload 6 // 192: iconst_0 // 193: iload 8 // 195: invokevirtual 475 java/io/FileOutputStream:write ([BII)V // 198: iload 7 // 200: iload 8 // 202: iadd // 203: istore 7 // 205: goto -65 -> 140 // 208: astore 5 // 210: getstatic 259 java/lang/System:out Ljava/io/PrintStream; // 213: ldc_w 477 // 216: invokevirtual 277 java/io/PrintStream:println (Ljava/lang/String;)V // 219: aload 5 // 221: invokevirtual 478 org/apache/http/client/ClientProtocolException:printStackTrace ()V // 224: aload 4 // 226: ifnull -40 -> 186 // 229: aload 4 // 231: invokevirtual 472 java/io/FileOutputStream:close ()V // 234: goto -48 -> 186 // 237: astore 4 // 239: aload 4 // 241: invokevirtual 426 java/io/IOException:printStackTrace ()V // 244: getstatic 259 java/lang/System:out Ljava/io/PrintStream; // 247: ldc_w 480 // 250: invokevirtual 277 java/io/PrintStream:println (Ljava/lang/String;)V // 253: goto -67 -> 186 // 256: astore 5 // 258: aload 5 // 260: invokevirtual 426 java/io/IOException:printStackTrace ()V // 263: getstatic 259 java/lang/System:out Ljava/io/PrintStream; // 266: ldc_w 482 // 269: invokevirtual 277 java/io/PrintStream:println (Ljava/lang/String;)V // 272: aload 4 // 274: ifnull -88 -> 186 // 277: aload 4 // 279: invokevirtual 472 java/io/FileOutputStream:close ()V // 282: goto -96 -> 186 // 285: astore 4 // 287: aload 4 // 289: invokevirtual 426 java/io/IOException:printStackTrace ()V // 292: getstatic 259 java/lang/System:out Ljava/io/PrintStream; // 295: ldc_w 480 // 298: invokevirtual 277 java/io/PrintStream:println (Ljava/lang/String;)V // 301: goto -115 -> 186 // 304: astore_3 // 305: aload 4 // 307: ifnull +8 -> 315 // 310: aload 4 // 312: invokevirtual 472 java/io/FileOutputStream:close ()V // 315: aload_3 // 316: athrow // 317: astore 4 // 319: aload 4 // 321: invokevirtual 426 java/io/IOException:printStackTrace ()V // 324: getstatic 259 java/lang/System:out Ljava/io/PrintStream; // 327: ldc_w 480 // 330: invokevirtual 277 java/io/PrintStream:println (Ljava/lang/String;)V // 333: goto -18 -> 315 // 336: astore 4 // 338: aload 4 // 340: invokevirtual 426 java/io/IOException:printStackTrace ()V // 343: getstatic 259 java/lang/System:out Ljava/io/PrintStream; // 346: ldc_w 480 // 349: invokevirtual 277 java/io/PrintStream:println (Ljava/lang/String;)V // 352: goto -166 -> 186 // 355: astore_3 // 356: aload 4 // 358: astore 4 // 360: goto -55 -> 305 // 363: astore 5 // 365: aload 4 // 367: astore 4 // 369: goto -111 -> 258 // 372: astore 5 // 374: aload 4 // 376: astore 4 // 378: goto -168 -> 210 // // Exception table: // from to target type // 51 130 208 org/apache/http/client/ClientProtocolException // 160 176 208 org/apache/http/client/ClientProtocolException // 229 234 237 java/io/IOException // 51 130 256 java/io/IOException // 160 176 256 java/io/IOException // 277 282 285 java/io/IOException // 51 130 304 finally // 160 176 304 finally // 210 224 304 finally // 258 272 304 finally // 310 315 317 java/io/IOException // 181 186 336 java/io/IOException // 130 149 355 finally // 188 198 355 finally // 130 149 363 java/io/IOException // 188 198 363 java/io/IOException // 130 149 372 org/apache/http/client/ClientProtocolException // 188 198 372 org/apache/http/client/ClientProtocolException } // ERROR // public static boolean downloadRegFile(String paramString1, String paramString2, String paramString3) { // Byte code: // 0: iconst_0 // 1: istore_3 // 2: getstatic 259 java/lang/System:out Ljava/io/PrintStream; // 5: new 261 java/lang/StringBuilder // 8: dup // 9: ldc_w 485 // 12: invokespecial 264 java/lang/StringBuilder:<init> (Ljava/lang/String;)V // 15: aload_0 // 16: invokevirtual 433 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder; // 19: invokevirtual 272 java/lang/StringBuilder:toString ()Ljava/lang/String; // 22: invokevirtual 277 java/io/PrintStream:println (Ljava/lang/String;)V // 25: getstatic 259 java/lang/System:out Ljava/io/PrintStream; // 28: new 261 java/lang/StringBuilder // 31: dup // 32: ldc_w 487 // 35: invokespecial 264 java/lang/StringBuilder:<init> (Ljava/lang/String;)V // 38: aload_2 // 39: invokevirtual 433 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder; // 42: invokevirtual 272 java/lang/StringBuilder:toString ()Ljava/lang/String; // 45: invokevirtual 277 java/io/PrintStream:println (Ljava/lang/String;)V // 48: new 437 org/apache/http/impl/client/DefaultHttpClient // 51: dup // 52: invokespecial 438 org/apache/http/impl/client/DefaultHttpClient:<init> ()V // 55: new 440 org/apache/http/client/methods/HttpGet // 58: dup // 59: aload_0 // 60: invokespecial 441 org/apache/http/client/methods/HttpGet:<init> (Ljava/lang/String;)V // 63: invokeinterface 447 2 0 // 68: invokeinterface 453 1 0 // 73: astore 4 // 75: aload 4 // 77: invokeinterface 459 1 0 // 82: pop2 // 83: aload 4 // 85: invokeinterface 462 1 0 // 90: astore 5 // 92: aload 5 // 94: ifnull +26 -> 120 // 97: sipush 16384 // 100: newarray byte // 102: astore 6 // 104: aload 5 // 106: aload 6 // 108: invokevirtual 468 java/io/InputStream:read ([B)I // 111: istore 4 // 113: iload 4 // 115: bipush 255 // 117: if_icmpne +28 -> 145 // 120: aconst_null // 121: invokevirtual 469 java/io/FileOutputStream:flush ()V // 124: iconst_1 // 125: istore_3 // 126: getstatic 259 java/lang/System:out Ljava/io/PrintStream; // 129: ldc_w 471 // 132: invokevirtual 277 java/io/PrintStream:println (Ljava/lang/String;)V // 135: iconst_0 // 136: ifeq +7 -> 143 // 139: aconst_null // 140: invokevirtual 472 java/io/FileOutputStream:close ()V // 143: iload_3 // 144: ireturn // 145: aload 6 // 147: iconst_0 // 148: baload // 149: bipush 86 // 151: if_icmpne +39 -> 190 // 154: aload 6 // 156: iconst_1 // 157: baload // 158: bipush 120 // 160: if_icmpne +30 -> 190 // 163: aload 6 // 165: iconst_2 // 166: baload // 167: bipush 90 // 169: if_icmpne +21 -> 190 // 172: aload 6 // 174: iconst_3 // 175: baload // 176: bipush 49 // 178: if_icmpne +12 -> 190 // 181: aload 6 // 183: iconst_4 // 184: baload // 185: bipush 16 // 187: if_icmpeq +156 -> 343 // 190: getstatic 259 java/lang/System:out Ljava/io/PrintStream; // 193: new 261 java/lang/StringBuilder // 196: dup // 197: ldc_w 489 // 200: invokespecial 264 java/lang/StringBuilder:<init> (Ljava/lang/String;)V // 203: iload 4 // 205: invokevirtual 268 java/lang/StringBuilder:append (I)Ljava/lang/StringBuilder; // 208: ldc_w 491 // 211: invokevirtual 433 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder; // 214: aload 6 // 216: iconst_0 // 217: baload // 218: invokevirtual 268 java/lang/StringBuilder:append (I)Ljava/lang/StringBuilder; // 221: ldc_w 493 // 224: invokevirtual 433 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder; // 227: aload 6 // 229: iconst_1 // 230: baload // 231: invokevirtual 268 java/lang/StringBuilder:append (I)Ljava/lang/StringBuilder; // 234: ldc_w 493 // 237: invokevirtual 433 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder; // 240: aload 6 // 242: iconst_2 // 243: baload // 244: invokevirtual 268 java/lang/StringBuilder:append (I)Ljava/lang/StringBuilder; // 247: ldc_w 493 // 250: invokevirtual 433 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder; // 253: aload 6 // 255: iconst_3 // 256: baload // 257: invokevirtual 268 java/lang/StringBuilder:append (I)Ljava/lang/StringBuilder; // 260: ldc_w 493 // 263: invokevirtual 433 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder; // 266: aload 6 // 268: iconst_4 // 269: baload // 270: invokevirtual 268 java/lang/StringBuilder:append (I)Ljava/lang/StringBuilder; // 273: invokevirtual 272 java/lang/StringBuilder:toString ()Ljava/lang/String; // 276: invokevirtual 277 java/io/PrintStream:println (Ljava/lang/String;)V // 279: bipush 64 // 281: putstatic 135 com/EnPadF/ZuCe/ZuCe:m_IsDownloadMacFile I // 284: goto -180 -> 104 // 287: astore 4 // 289: getstatic 259 java/lang/System:out Ljava/io/PrintStream; // 292: ldc_w 477 // 295: invokevirtual 277 java/io/PrintStream:println (Ljava/lang/String;)V // 298: bipush 82 // 300: putstatic 135 com/EnPadF/ZuCe/ZuCe:m_IsDownloadMacFile I // 303: aload 4 // 305: invokevirtual 478 org/apache/http/client/ClientProtocolException:printStackTrace ()V // 308: iconst_0 // 309: ifeq -166 -> 143 // 312: aconst_null // 313: invokevirtual 472 java/io/FileOutputStream:close ()V // 316: goto -173 -> 143 // 319: astore 4 // 321: aload 4 // 323: invokevirtual 426 java/io/IOException:printStackTrace ()V // 326: getstatic 259 java/lang/System:out Ljava/io/PrintStream; // 329: ldc_w 480 // 332: invokevirtual 277 java/io/PrintStream:println (Ljava/lang/String;)V // 335: bipush 84 // 337: putstatic 135 com/EnPadF/ZuCe/ZuCe:m_IsDownloadMacFile I // 340: goto -197 -> 143 // 343: aload 6 // 345: iconst_5 // 346: baload // 347: putstatic 135 com/EnPadF/ZuCe/ZuCe:m_IsDownloadMacFile I // 350: goto -246 -> 104 // 353: astore 4 // 355: aload 4 // 357: invokevirtual 426 java/io/IOException:printStackTrace ()V // 360: getstatic 259 java/lang/System:out Ljava/io/PrintStream; // 363: ldc_w 482 // 366: invokevirtual 277 java/io/PrintStream:println (Ljava/lang/String;)V // 369: bipush 83 // 371: putstatic 135 com/EnPadF/ZuCe/ZuCe:m_IsDownloadMacFile I // 374: iconst_0 // 375: ifeq -232 -> 143 // 378: aconst_null // 379: invokevirtual 472 java/io/FileOutputStream:close ()V // 382: goto -239 -> 143 // 385: astore 4 // 387: aload 4 // 389: invokevirtual 426 java/io/IOException:printStackTrace ()V // 392: getstatic 259 java/lang/System:out Ljava/io/PrintStream; // 395: ldc_w 480 // 398: invokevirtual 277 java/io/PrintStream:println (Ljava/lang/String;)V // 401: bipush 84 // 403: putstatic 135 com/EnPadF/ZuCe/ZuCe:m_IsDownloadMacFile I // 406: goto -263 -> 143 // 409: astore_3 // 410: iconst_0 // 411: ifeq +7 -> 418 // 414: aconst_null // 415: invokevirtual 472 java/io/FileOutputStream:close ()V // 418: aload_3 // 419: athrow // 420: astore 4 // 422: aload 4 // 424: invokevirtual 426 java/io/IOException:printStackTrace ()V // 427: getstatic 259 java/lang/System:out Ljava/io/PrintStream; // 430: ldc_w 480 // 433: invokevirtual 277 java/io/PrintStream:println (Ljava/lang/String;)V // 436: bipush 84 // 438: putstatic 135 com/EnPadF/ZuCe/ZuCe:m_IsDownloadMacFile I // 441: goto -23 -> 418 // 444: astore 4 // 446: aload 4 // 448: invokevirtual 426 java/io/IOException:printStackTrace ()V // 451: getstatic 259 java/lang/System:out Ljava/io/PrintStream; // 454: ldc_w 480 // 457: invokevirtual 277 java/io/PrintStream:println (Ljava/lang/String;)V // 460: bipush 84 // 462: putstatic 135 com/EnPadF/ZuCe/ZuCe:m_IsDownloadMacFile I // 465: goto -322 -> 143 // // Exception table: // from to target type // 48 135 287 org/apache/http/client/ClientProtocolException // 145 284 287 org/apache/http/client/ClientProtocolException // 343 350 287 org/apache/http/client/ClientProtocolException // 312 316 319 java/io/IOException // 48 135 353 java/io/IOException // 145 284 353 java/io/IOException // 343 350 353 java/io/IOException // 378 382 385 java/io/IOException // 48 135 409 finally // 145 284 409 finally // 289 308 409 finally // 343 350 409 finally // 355 374 409 finally // 414 418 420 java/io/IOException // 139 143 444 java/io/IOException } private boolean download_regrtn() { try { new Thread(new Runnable() { public void run() { try { String str1 = ZuCe.this.GetMacStr(); ZuCe.this.strUpr(str1); String str2 = ""; for (int i = 0; ; i++) { if (i >= 20) { ZuCe.m_IsDownloadMacFile = 0; ZuCe.downloadRegFile(ZuCe.this.upload_regfind_Url + "/" + str2 + ".bin", ZuCe.this.INTERNAL_CACHE_DIR, "check.bin"); break; } str2 = str2 + ZuCe.this.inbuf[i]; str2 = str2; } } catch (Exception localException) { } } }).start(); label18: return true; } catch (Exception localException) { break label18; } } public static String getAPKVersionName(Context paramContext) { try { str = paramContext.getPackageName(); str = paramContext.getPackageManager().getPackageInfo(str, 0).versionName; return str; } catch (Exception localException) { while (true) String str = null; } } private void parseXML(String paramString) { try { System.out.println("**parse xml"); Object localObject = SAXParserFactory.newInstance(); ((SAXParserFactory)localObject).setValidating(false); ((SAXParserFactory)localObject).setNamespaceAware(false); EnpadXmlHanlder localEnpadXmlHanlder = new EnpadXmlHanlder(); localObject = ((SAXParserFactory)localObject).newSAXParser().getXMLReader(); ((XMLReader)localObject).setContentHandler(localEnpadXmlHanlder); ((XMLReader)localObject).parse(new InputSource(new FileInputStream(new File(paramString)))); System.out.println("**parse xml 33333333332999999999"); this.enpadList = localEnpadXmlHanlder.getEnpadList(); for (int i = 0; i < this.enpadList.size(); i++) System.out.println("***name=" + ((Enpad)this.enpadList.get(i)).getName()); } catch (Exception localException) { localException.printStackTrace(); System.out.println("**parse xml fail 00000 "); } } private boolean unRegister_PrePare() { int i = 0; if (downloadBIN(this.nettest_url, this.INTERNAL_CACHE_DIR, "net.bin")) { if (this.pubFun.lib_NetCheck(this.INTERNAL_CACHE_DIR, this.INTERNAL_CACHE_DIR.length()) == 1) { i = 1; } else { AfxMsg_timer("网络故障x20"); System.out.println("**网络故障 2 "); this.getser_ok = 0; } } else { AfxMsg_timer("网络故障x10"); System.out.println("**网络故障 1 "); this.getser_ok = 0; } return i; } private boolean uploadFile_libfind(String paramString1, String paramString2, byte[] paramArrayOfByte) { int i = 0; try { Object localObject = (HttpURLConnection)new URL(paramString1).openConnection(); ((HttpURLConnection)localObject).setChunkedStreamingMode(131072); ((HttpURLConnection)localObject).setDoInput(true); ((HttpURLConnection)localObject).setDoOutput(true); ((HttpURLConnection)localObject).setUseCaches(false); ((HttpURLConnection)localObject).setRequestMethod("POST"); ((HttpURLConnection)localObject).setRequestProperty("Connection", "Keep-Alive"); ((HttpURLConnection)localObject).setRequestProperty("Charset", "UTF-8"); ((HttpURLConnection)localObject).setRequestProperty("Content-Type", "multipart/form-data;boundary=" + "******"); DataOutputStream localDataOutputStream = new DataOutputStream(((HttpURLConnection)localObject).getOutputStream()); localDataOutputStream.writeBytes("--" + "******" + "\r\n"); localDataOutputStream.writeBytes("Content-Disposition: form-data; name=\"uploadedfile\"; filename=\"" + paramString2.substring(1 + paramString2.lastIndexOf("/")) + "\"" + "\r\n"); localDataOutputStream.writeBytes("\r\n"); localDataOutputStream.write(paramArrayOfByte, 0, 57); localDataOutputStream.writeBytes("\r\n"); localDataOutputStream.writeBytes("--" + "******" + "--" + "\r\n"); localDataOutputStream.flush(); localObject = ((HttpURLConnection)localObject).getInputStream(); Toast.makeText(this, new BufferedReader(new InputStreamReader((InputStream)localObject, "utf-8")).readLine(), 1).show(); localDataOutputStream.close(); ((InputStream)localObject).close(); i = 1; return i; } catch (Exception localException) { while (true) { localException.printStackTrace(); System.out.println("**上传失败 ... " + localException.getMessage()); } } } private boolean uploadFile_macdel(String paramString1, String paramString2) { int i = 0; System.out.println("***mac del =" + paramString1 + "==" + paramString2); try { HttpURLConnection localHttpURLConnection = (HttpURLConnection)new URL(paramString1).openConnection(); localHttpURLConnection.setChunkedStreamingMode(131072); localHttpURLConnection.setDoInput(true); localHttpURLConnection.setDoOutput(true); localHttpURLConnection.setUseCaches(false); localHttpURLConnection.setRequestMethod("POST"); localHttpURLConnection.setRequestProperty("Connection", "Keep-Alive"); localHttpURLConnection.setRequestProperty("Charset", "UTF-8"); localHttpURLConnection.setRequestProperty("Content-Type", "multipart/form-data;boundary=" + "******"); DataOutputStream localDataOutputStream = new DataOutputStream(localHttpURLConnection.getOutputStream()); localDataOutputStream.writeBytes("--" + "******" + "\r\n"); localDataOutputStream.writeBytes("Content-Disposition: form-data; name=\"uploadedfile\"; filename=\"" + paramString2.substring(1 + paramString2.lastIndexOf("/")) + "\"" + "\r\n"); localDataOutputStream.writeBytes("\r\n"); System.out.println("**上传 .01.. "); Object localObject = new byte[10]; localObject[0] = 97; localObject[1] = 98; localObject[2] = 99; localDataOutputStream.write(localObject, 0, 3); localDataOutputStream.writeBytes("\r\n"); localDataOutputStream.writeBytes("--" + "******" + "--" + "\r\n"); localDataOutputStream.flush(); localObject = localHttpURLConnection.getInputStream(); Toast.makeText(this, new BufferedReader(new InputStreamReader((InputStream)localObject, "utf-8")).readLine(), 1).show(); localDataOutputStream.close(); ((InputStream)localObject).close(); i = 1; return i; } catch (Exception localException) { while (true) { localException.printStackTrace(); System.out.println("**上传失败 ... " + localException.getMessage()); } } } public void AfxMsg(String paramString) { AlertDialog localAlertDialog = new AlertDialog.Builder(this).setIcon(2130837505).setCancelable(false).setMessage(paramString).setPositiveButton("确定", new DialogInterface.OnClickListener() { public void onClick(DialogInterface paramDialogInterface, int paramInt) { ZuCe.this.finish(); } }).create(); localAlertDialog.setCanceledOnTouchOutside(false); localAlertDialog.show(); } public void AfxMsg_movesd(String paramString) { AlertDialog localAlertDialog = new AlertDialog.Builder(this).setIcon(2130837505).setCancelable(false).setMessage(paramString).setPositiveButton("确定", new DialogInterface.OnClickListener() { public void onClick(DialogInterface paramDialogInterface, int paramInt) { ZuCe.this.getser_ok = 0; ZuCe.this.mySerNo.setText(""); } }).create(); localAlertDialog.setCanceledOnTouchOutside(false); localAlertDialog.show(); } public void AfxMsg_noexit(String paramString) { AlertDialog localAlertDialog = new AlertDialog.Builder(this).setIcon(2130837505).setCancelable(false).setMessage(paramString).setPositiveButton("确定", new DialogInterface.OnClickListener() { public void onClick(DialogInterface paramDialogInterface, int paramInt) { } }).create(); localAlertDialog.setCanceledOnTouchOutside(false); localAlertDialog.show(); } public void AfxMsg_noexit_timer(String paramString, int paramInt) { this.alertDialog = new AlertDialog.Builder(this).setCancelable(false).setTitle(paramString).setMessage(paramInt + "秒").setPositiveButton("确定", new DialogInterface.OnClickListener() { public void onClick(DialogInterface paramDialogInterface, int paramInt) { ZuCe.this.timer_countTime = 255; } }).create(); this.alertDialog.setCanceledOnTouchOutside(false); this.alertDialog.show(); this.timer_countTime = paramInt; } public void AfxMsg_timer(String paramString) { this.alertDialog = new AlertDialog.Builder(this).setCancelable(false).setTitle(paramString).setMessage("5秒").setPositiveButton("确定", new DialogInterface.OnClickListener() { public void onClick(DialogInterface paramDialogInterface, int paramInt) { ZuCe.this.ExitPro(); } }).create(); this.alertDialog.setCanceledOnTouchOutside(false); this.alertDialog.show(); this.timer_countTime = 5; this.dlg_type = 1; } public void AutoUpdate() { String str1 = Environment.getExternalStorageDirectory().getPath(); try { new Thread(new Runnable(str1) { public void run() { try { ZuCe.download("http://www.enpad18.com/enpad.xml", this.val$pathsd + "/enpad", "enpad.xml"); label30: return; } catch (Exception localException) { break label30; } } }).start(); label26: parseXML(str1 + "/enpad/enpad.xml"); PublicRAM.versionNameNew = null; String str2; int i; if (this.enpadList != null) { str2 = getAPKVersionName(this); i = 0; if (i >= this.enpadList.size()) label81: if (PublicRAM.versionNameNew != null) break label148; } while (true) { return; Enpad localEnpad = (Enpad)this.enpadList.get(i); if (localEnpad.getName().equalsIgnoreCase(PublicRAM.ClassName)) { this.mEnpad = ((Enpad)this.enpadList.get(i)); PublicRAM.versionNameNew = localEnpad.getVersion(); break label81; } i++; break; label148: if (PublicRAM.versionNameNew.equalsIgnoreCase(str2)) continue; PublicRAM.mdelay = 1; Intent localIntent = new Intent(); localIntent.setClass(this, UpdateActivity.class); localIntent.putExtra(PublicRAM.SER_KEY, this.mEnpad); startActivity(localIntent); continue; getAPKVersionName(this); System.out.println("**enpadList == null"); } } catch (Exception localException) { break label26; } } public boolean CopyRegFileToEnpad() { int i = 0; Object localObject2 = strUpr(GetMacStr()); Object localObject1 = new File(Environment.getExternalStorageDirectory().getPath() + "/" + (String)localObject2 + ".bin"); localObject2 = new File(Environment.getExternalStorageDirectory().getPath() + "/enpad/" + (String)localObject2 + ".bin"); if (!((File)localObject1).exists()); while (true) { return i; if (((File)localObject1).length() > 512L) continue; try { localObject1 = new RandomAccessFile((File)localObject1, "r"); RandomAccessFile localRandomAccessFile = new RandomAccessFile((File)localObject2, "rw"); localObject2 = new byte[1034]; while (true) { int j = ((RandomAccessFile)localObject1).read(localObject2, 0, 1024); if (j <= 0) { ((RandomAccessFile)localObject1).close(); localRandomAccessFile.close(); i = 1; break; } localRandomAccessFile.write(localObject2, 0, j); } } catch (Exception localException) { } } } public void DelNetTempFile() { this.http256bin[0] = 18; this.http256bin[1] = 52; this.http256bin[2] = 17; this.http256bin[3] = 49; this.http256bin[4] = 90; for (int i = 0; i < 30; i++) this.http256bin[(i + 5)] = this.msgbuf[i]; for (i = 0; i < 22; i++) this.http256bin[(i + 35)] = this.btr_buf[i]; String str = ""; for (i = 0; i < 20; i++) str = str + this.inbuf[i]; uploadFile_libfind(this.upload_delexe_Url, this.INTERNAL_CACHE_DIR + "/" + str + ".bin", this.http256bin); } public void DelRegFile() { String str = strUpr(GetMacStr()); File localFile = new File(Environment.getExternalStorageDirectory().getPath() + "/" + str + ".bin"); if (localFile.exists()) localFile.delete(); localFile = new File(Environment.getExternalStorageDirectory().getPath() + "/enpad/" + str + ".bin"); if (localFile.exists()) localFile.delete(); } public String GetMacStr() { String str = ""; for (int i = 0; i < 6; i++) str = str + this.mac_str.substring(i * 3, 2 + i * 3); return str; } public void HaveRegister(String paramString) { this.alertDialog = new AlertDialog.Builder(this).setCancelable(false).setTitle(paramString).setPositiveButton("是", new DialogInterface.OnClickListener() { public void onClick(DialogInterface paramDialogInterface, int paramInt) { ZuCe.this.unRegister(); } }).setNegativeButton("否", new DialogInterface.OnClickListener() { public void onClick(DialogInterface paramDialogInterface, int paramInt) { ZuCe.this.ExitPro(); } }).create(); this.alertDialog.setCanceledOnTouchOutside(false); this.alertDialog.show(); this.dlg_type = 0; } public byte Hextobyte(int paramInt) { int i; if (paramInt >= 10) i = (byte)(65 + (paramInt - 10)); else i = (byte)(paramInt + 48); return i; } public void Register_Pro() { getEditData(); makeMsgBuf(); this.http256bin[0] = 18; this.http256bin[1] = 52; this.http256bin[2] = 16; this.http256bin[3] = 49; this.http256bin[4] = 90; int i = 0; label58: String str; int j; if (i >= 30) { i = 0; if (i < 22) break label165; str = ""; j = 0; label69: if (j < 20) break label186; if (uploadFile_libfind(this.upload_findexe_Url, this.INTERNAL_CACHE_DIR + "/" + str + ".bin", this.http256bin)) break label216; AfxMsg_noexit("网络故障30,请重试!"); System.out.println("**网络故障 30 "); this.getser_ok = 0; } while (true) { return; this.http256bin[(str + 5)] = this.msgbuf[str]; str++; break; label165: this.http256bin[(str + 35)] = this.btr_buf[str]; str++; break label58; label186: str = str + this.inbuf[j]; j++; break label69; try { label216: Thread.sleep(2000L); label222: this.alertDialog = new AlertDialog.Builder(this).setCancelable(false).setTitle("请稍候...").setMessage("10秒").setPositiveButton("取消", new DialogInterface.OnClickListener() { public void onClick(DialogInterface paramDialogInterface, int paramInt) { ZuCe.this.ExitPro(); } }).create(); this.alertDialog.setCanceledOnTouchOutside(false); this.alertDialog.show(); this.timer_countTime = 10; this.dlg_type = 2; download_regrtn(); } catch (InterruptedException localInterruptedException) { break label222; } } } public void Register_rtn_pro(int paramInt) { switch (paramInt) { case 8: case 9: default: AfxMsg("注册失败,未知错误!" + m_IsDownloadMacFile); break; case 1: AfxMsg_timer("该码已被注册!"); break; case 2: AfxMsg("注册失败,请重试!"); break; case 3: AfxMsg_noexit("注册失败,可能是网络不稳定,请重试!"); break; case 4: AfxMsg_noexit("无效的注册码!"); break; case 5: AfxMsg_noexit("注册失败,http请求出错,请重试!"); break; case 6: AfxMsg_noexit("注册失败,网络忙,请重试!"); break; case 7: AfxMsg_noexit("注册失败,注册码异常,请重试!"); break; case 10: String str = strUpr(GetMacStr()); this.path = (Environment.getExternalStorageDirectory().getPath() + "/enpad"); if (this.regcode_type != 1) { if (!downloadBIN(this.down_mac_Url + "/" + str + ".bin", this.path, str + ".bin")) { AfxMsg_noexit("注册失败, 可能是网络不稳定,请重试2!"); break; } } else if (!downloadBIN(this.down_mac_Url + "test" + "/" + str + ".bin", this.path, str + ".bin")) break label523; System.out.println("**register ok==" + this.down_mac_Url + str); this.local_isregistered = this.pubFun.lib_cetFileCheck(this.path, this.path.length()); if ((this.local_isregistered == 0) || ((0x2000 & this.local_isregistered) == 8192)) { m_IsDownloadMacFile = 255; DelNetTempFile(); AfxMsg_timer("注册成功!"); } else { AfxMsg_noexit("注册失败,请重试3+ !" + this.local_isregistered); System.out.println("**register 网络不稳定==" + this.local_isregistered); DelErrRegFile(this.path + "/" + str + ".bin"); break; label523: AfxMsg_noexit("注册失败, 可能是网络不稳定,请重试2!"); } } } public void Register_testPro() { getEditData(); makeMsgBuf(); this.http256bin[0] = 18; this.http256bin[1] = 52; this.http256bin[2] = 16; this.http256bin[3] = 49; this.http256bin[4] = 90; int i = 0; label58: String str; if (i >= 30) { i = 0; if (i < 22) break label165; str = ""; i = 0; label69: if (i < 20) break label186; if (uploadFile_libfind(this.upload_findexe_Url, this.INTERNAL_CACHE_DIR + "/" + str + ".bin", this.http256bin)) break label216; AfxMsg_noexit("网络故障30,请重试!"); System.out.println("**网络故障 30 "); this.getser_ok = 0; } while (true) { return; this.http256bin[(i + 5)] = this.msgbuf[i]; i++; break; label165: this.http256bin[(i + 35)] = this.btr_buf[i]; i++; break label58; label186: str = str + this.inbuf[i]; i++; break label69; try { label216: Thread.sleep(2000L); label222: this.alertDialog = new AlertDialog.Builder(this).setCancelable(false).setTitle("请稍候...").setMessage("10秒").setPositiveButton("取消", new DialogInterface.OnClickListener() { public void onClick(DialogInterface paramDialogInterface, int paramInt) { ZuCe.this.ExitPro(); } }).create(); this.alertDialog.setCanceledOnTouchOutside(false); this.alertDialog.show(); this.timer_countTime = 10; this.dlg_type = 2; download_regrtn(); } catch (InterruptedException localInterruptedException) { break label222; } } } public int byteToHex(int paramInt) { if ((paramInt < 48) || (paramInt > 57)) { if ((paramInt < 97) || (paramInt > 122)) { if ((paramInt >= 65) && (paramInt <= 90)) paramInt = 10 + (paramInt - 65); } else paramInt = 10 + (paramInt - 97); } else paramInt -= 48; return paramInt; } public void getEditData() { int[] arrayOfInt = new int[100]; String str = this.myEdit.getText().toString(); int i = 0; for (int k = 0; k < this.myEdit.length(); k++) { arrayOfInt[i] = str.charAt(k); if (arrayOfInt[i] == 32) continue; i++; } arrayOfInt[i] = 0; for (int j = 0; j < i; j++) { this.inbuf[j] = (char)arrayOfInt[j]; this.snbuf[j] = (byte)(-48 + arrayOfInt[j]); } this.inlen = i; this.myEdit.setText(this.inbuf, 0, this.inlen); this.myEdit.setSelection(this.inlen); System.out.println("**inbuf len = " + this.inlen); } public String getLocalIpAddress() { Object localObject2; try { while (true) { Object localObject1 = Collections.list(NetworkInterface.getNetworkInterfaces()).iterator(); while (true) if (((Iterator)localObject1).hasNext()) { Object localObject3 = (NetworkInterface)((Iterator)localObject1).next(); if (!((NetworkInterface)localObject3).getDisplayName().equals("wlan0")) continue; Iterator localIterator = Collections.list(((NetworkInterface)localObject3).getInetAddresses()).iterator(); if (!localIterator.hasNext()) continue; localObject3 = (InetAddress)localIterator.next(); if (!(localObject3 instanceof Inet4Address)) break; localObject1 = ((InetAddress)localObject3).getHostAddress(); localObject1 = localObject1; } } } catch (SocketException localObject2) { localSocketException.printStackTrace(); localObject2 = null; } return (String)(String)localObject2; } public void getVersion() { String str = Build.VERSION.RELEASE; System.out.println("**getVersion " + str); this.btr_buf[16] = 10; if (str.length() < 3) { this.btr_buf[17] = 0; this.btr_buf[18] = 0; } else { int j = byteToHex(str.charAt(0)); this.btr_buf[17] = (byte)j; int i = byteToHex(str.charAt(2)); this.btr_buf[18] = (byte)i; } System.out.println("**SysVer 17 = " + String.valueOf(this.btr_buf[17])); System.out.println("**SysVer 18 = " + String.valueOf(this.btr_buf[18])); } public void makeMsgBuf() { byte[] arrayOfByte2; if (this.ipaddr != null) { for (i = 0; i < this.ipaddr.length(); i++) this.msgbuf[i] = (byte)this.ipaddr.charAt(i); int j = i; arrayOfByte2 = this.msgbuf; i = j + 1; arrayOfByte2[j] = 0; } else { byte[] arrayOfByte1 = this.msgbuf; i = 0 + 1; arrayOfByte1[0] = 0; } while (i < 16) { arrayOfByte2 = this.msgbuf; k = i + 1; arrayOfByte2[i] = 0; i = k + 1; } this.sys_t.setToNow(); int n = this.sys_t.year; int i = this.sys_t.month; int i2 = this.sys_t.monthDay; int k = this.sys_t.hour; int i1 = this.sys_t.minute; int m = this.sys_t.second; byte[] arrayOfByte3 = this.msgbuf; int i5 = 16 + 1; arrayOfByte3[16] = (byte)(n & 0xFF); byte[] arrayOfByte7 = this.msgbuf; int i3 = i5 + 1; arrayOfByte7[i5] = (byte)(n >> 8); arrayOfByte7 = this.msgbuf; i5 = i3 + 1; arrayOfByte7[i3] = (byte)(i & 0xFF); arrayOfByte7 = this.msgbuf; i3 = i5 + 1; arrayOfByte7[i5] = (byte)(i >> 8); arrayOfByte7 = this.msgbuf; i5 = i3 + 1; arrayOfByte7[i3] = (byte)(i2 & 0xFF); arrayOfByte7 = this.msgbuf; i3 = i5 + 1; arrayOfByte7[i5] = (byte)(i2 >> 8); arrayOfByte7 = this.msgbuf; i5 = i3 + 1; arrayOfByte7[i3] = (byte)(k & 0xFF); byte[] arrayOfByte4 = this.msgbuf; int i7 = i5 + 1; arrayOfByte4[i5] = (byte)(k >> 8); byte[] arrayOfByte6 = this.msgbuf; int i4 = i7 + 1; arrayOfByte6[i7] = (byte)(i1 & 0xFF); byte[] arrayOfByte8 = this.msgbuf; int i6 = i4 + 1; arrayOfByte8[i4] = (byte)(i1 >> 8); arrayOfByte8 = this.msgbuf; i4 = i6 + 1; arrayOfByte8[i6] = (byte)(m & 0xFF); arrayOfByte8 = this.msgbuf; i6 = i4 + 1; arrayOfByte8[i4] = (byte)(m >> 8); byte[] arrayOfByte5 = this.msgbuf; (i6 + 1); arrayOfByte5[i6] = 0; System.out.println("**ip addr... " + this.ipaddr); System.out.println("**system time... " + n + ":" + i + ":" + i2 + ":" + k + ":" + i1 + ":" + m); } public void onCreate(Bundle paramBundle) { super.onCreate(paramBundle); setContentView(2130903040); this.pubFun = ((pubfunc)getApplication()); PublicRAM.mdelay = 0; if (this.m_AutoUpdateTime != 1) this.m_AutoUpdateTime = 1; this.dlg_type = 0; this.sdcardDir = Environment.getExternalStorageDirectory(); String str1 = this.sdcardDir.getPath() + "/enpad"; this.button_0 = ((Button)findViewById(2131034114)); this.button_1 = ((Button)findViewById(2131034115)); this.button_2 = ((Button)findViewById(2131034116)); this.button_3 = ((Button)findViewById(2131034117)); this.button_4 = ((Button)findViewById(2131034118)); this.button_5 = ((Button)findViewById(2131034119)); this.button_6 = ((Button)findViewById(2131034120)); this.button_7 = ((Button)findViewById(2131034121)); this.button_8 = ((Button)findViewById(2131034122)); this.button_9 = ((Button)findViewById(2131034123)); this.button_ok = ((Button)findViewById(2131034124)); this.button_del = ((Button)findViewById(2131034125)); this.button_autoreg = ((Button)findViewById(2131034126)); this.myEdit = ((EditText)findViewById(2131034128)); this.myText = ((TextView)findViewById(2131034113)); this.mySerNo = ((TextView)findViewById(2131034127)); getVersion(); GetLcdSize(); this.m_RegCodeType = 0; this.upload_regfind_Url = this.pubFun.lib_get_upload_regfind_Url(); this.down_mac_Url = this.pubFun.lib_get_down_mac_Url(); this.nettest_url = this.pubFun.lib_get_nettest_url(); this.upload_findexe_Url = this.pubFun.lib_get_upload_findexe_Url(); this.upload_delexe_Url = this.pubFun.lib_get_upload_delexe_Url(); int i = 2 * (this.LCD_W / 12); this.myEdit.setLayoutParams(new AbsoluteLayout.LayoutParams(-180 + this.LCD_W, 80, 5, 100)); int j = 100 + 110; this.button_0.setLayoutParams(new AbsoluteLayout.LayoutParams(i, 60, 0, j)); int k = 0 + i; this.button_1.setLayoutParams(new AbsoluteLayout.LayoutParams(i, 60, k, j)); k += i; this.button_2.setLayoutParams(new AbsoluteLayout.LayoutParams(i, 60, k, j)); k += i; this.button_3.setLayoutParams(new AbsoluteLayout.LayoutParams(i, 60, k, j)); k += i; this.button_4.setLayoutParams(new AbsoluteLayout.LayoutParams(i, 60, k, j)); k += i; this.button_5.setLayoutParams(new AbsoluteLayout.LayoutParams(i, 60, k, j)); j += 100; this.button_6.setLayoutParams(new AbsoluteLayout.LayoutParams(i, 60, 0, j)); k = 0 + i; this.button_7.setLayoutParams(new AbsoluteLayout.LayoutParams(i, 60, k, j)); k += i; this.button_8.setLayoutParams(new AbsoluteLayout.LayoutParams(i, 60, k, j)); k += i; this.button_9.setLayoutParams(new AbsoluteLayout.LayoutParams(i, 60, k, j)); k += i; this.button_del.setLayoutParams(new AbsoluteLayout.LayoutParams(i, 60, k, j)); k += i; this.button_ok.setLayoutParams(new AbsoluteLayout.LayoutParams(i, 60, k, j)); this.myText.setLayoutParams(new AbsoluteLayout.LayoutParams(-280 + this.LCD_W, 50, 5, 15)); this.button_autoreg.setLayoutParams(new AbsoluteLayout.LayoutParams(160, 70, -170 + this.LCD_W, 105)); this.mySerNo.setLayoutParams(new AbsoluteLayout.LayoutParams(120, 50, -130 + this.LCD_W, 15)); this.mySerNo.setText(""); this.button_0.setOnClickListener(this.myButtonPro); this.button_1.setOnClickListener(this.myButtonPro); this.button_2.setOnClickListener(this.myButtonPro); this.button_3.setOnClickListener(this.myButtonPro); this.button_4.setOnClickListener(this.myButtonPro); this.button_5.setOnClickListener(this.myButtonPro); this.button_6.setOnClickListener(this.myButtonPro); this.button_7.setOnClickListener(this.myButtonPro); this.button_8.setOnClickListener(this.myButtonPro); this.button_9.setOnClickListener(this.myButtonPro); this.button_ok.setOnClickListener(this.myButtonPro); this.button_del.setOnClickListener(this.myButtonPro); this.button_autoreg.setOnClickListener(this.myButtonPro); this.timer_countTime = 255; this.regcode_type = 0; this.handler = new Handler() { public void handleMessage(Message paramMessage) { if ((paramMessage.what <= 0) || (paramMessage.what == 255) || (ZuCe.this.alertDialog == null)) { if (paramMessage.what != 255) { paramMessage.what = 255; ZuCe.this.timer_countTime = 255; ZuCe.this.alertDialog.dismiss(); if (ZuCe.this.dlg_type != 1) { if (ZuCe.this.dlg_type == 2) { ZuCe.this.dlg_type = 0; ZuCe.m_IsDownloadMacFile = 255; ZuCe.this.Register_rtn_pro(6); } } else ZuCe.this.ExitPro(); } } else { ZuCe.this.alertDialog.setMessage(paramMessage.what + "秒"); if ((ZuCe.m_IsDownloadMacFile >= 1) && (ZuCe.m_IsDownloadMacFile != 255)) { ZuCe.this.timer_countTime = 255; ZuCe.this.dlg_type = 0; ZuCe.this.alertDialog.dismiss(); ZuCe.this.Register_rtn_pro(ZuCe.m_IsDownloadMacFile); ZuCe.m_IsDownloadMacFile = 255; } } super.handleMessage(paramMessage); } }; this.mTimer = new Timer(true); this.mTimerTask = new TimerTask() { public void run() { if ((ZuCe.this.timer_countTime > 0) && (ZuCe.this.timer_countTime < 100)) { Object localObject = ZuCe.this; ((ZuCe)localObject).timer_countTime = (-1 + ((ZuCe)localObject).timer_countTime); localObject = new Message(); ((Message)localObject).what = ZuCe.this.timer_countTime; ZuCe.this.handler.sendMessage((Message)localObject); } } }; this.mTimer.schedule(this.mTimerTask, 1000L, 1000L); this.local_isregistered = this.pubFun.lib_cetFileCheck(str1, str1.length()); this.m_RegCodeType = this.pubFun.lib_cetFileCheckTemp(str1, str1.length()); if ((this.local_isregistered != 0) || (this.m_RegCodeType == 31)) { this.mac_str = this.pubFun.getLocalMacAddress(); if (this.mac_str.length() < 10) this.mac_str = this.pubFun.getLocalMacAddress(); System.out.println("**mac_str " + this.mac_str); if (this.mac_str.length() >= 10) { this.pubFun.lib_CalMac16(this.btr_buf, this.mac_str); for (i = 0; i < 22; i++) this.ctr_buf += (char)Hextobyte(this.btr_buf[i]); this.inlen = 0; this.SerNo_Index = 0; this.myEdit.setOnKeyListener(this.myEditSetOnKeyListener); this.ipaddr = getLocalIpAddress(); if (this.local_isregistered != 0) { String str2 = strUpr(GetMacStr()); this.path = (Environment.getExternalStorageDirectory().getPath() + "/enpad"); if (CopyRegFileToEnpad()) { this.local_isregistered = this.pubFun.lib_cetFileCheck(str1, str1.length()); if (this.local_isregistered == 0) break label1718; DelErrRegFile(this.path + "/" + str2 + ".bin"); } if ((0x10 & this.local_isregistered) != 16) { if (downloadBIN(this.down_mac_Url + "/" + str2 + ".bin", this.path, str2 + ".bin")) { this.local_isregistered = this.pubFun.lib_cetFileCheck(this.path, this.path.length()); if (this.local_isregistered != 0) { DelErrRegFile(this.path + "/" + str2 + ".bin"); } else { AfxMsg_timer("本机已经注册, 注册文件已经恢复!"); return; } } } else { str1 = this.pubFun.lib_get_pad_macdel_Url(); File localFile = new File(Environment.getExternalStorageDirectory().getPath() + "/" + str2 + ".bin"); if (localFile.exists()) localFile.delete(); localFile = new File(Environment.getExternalStorageDirectory().getPath() + "/enpad/" + str2 + ".bin"); if (localFile.exists()) localFile.delete(); uploadFile_macdel(str1, str2 + ".bin"); } } System.out.println("**参数... " + this.local_isregistered + "==" + this.m_RegCodeType); this.button_autoreg.setEnabled(false); this.button_autoreg.setVisibility(4); return; label1718: ExitPro(); } else { AfxMsg_timer("注册失败,请检查Wifi设置"); } } else { AfxMsg_timer("本机已经注册!"); } } public String strUpr(String paramString) { paramString.toUpperCase(); char[] arrayOfChar = paramString.toCharArray(); StringBuffer localStringBuffer = new StringBuffer(); for (int i = 0; i < arrayOfChar.length; i++) { if (('a' <= arrayOfChar[i]) && (arrayOfChar[i] <= 'z')) arrayOfChar[i] = (char)('¢' + arrayOfChar[i]); localStringBuffer.append(arrayOfChar[i]); } return localStringBuffer.toString(); } public void unRegister() { this.mac_str = this.pubFun.getLocalMacAddress(); if (this.mac_str.length() < 10) this.mac_str = this.pubFun.getLocalMacAddress(); System.out.println("**mac_str " + this.mac_str); if (this.mac_str.length() >= 10) { String str2 = strUpr(GetMacStr()); String str1 = this.pubFun.lib_get_pad_macdel_Url(); if (unRegister_PrePare()) { uploadFile_macdel(str1, str2 + ".bin"); if (!downloadBIN(this.down_mac_Url + "/" + str2 + ".bin", this.path, str2 + ".bin")) { DelRegFile(); } else { this.local_isregistered = this.pubFun.lib_cetFileCheck(this.path, this.path.length()); if (this.local_isregistered != 0) DelRegFile(); else AfxMsg_timer("网络故障310"); } } else { ExitPro(); } } else { AfxMsg_timer("注册失败,请检查Wifi设置"); } } }
这个是app ZuCe.apk
[注意]传递专业知识、拓宽行业人脉——看雪讲师团队等你加入!
赞赏
看原图
赞赏
雪币:
留言: