├── charles.jar ├── RevealPatch.zip ├── charles.4.1.jar ├── v4.1.3 ├── charles.4.1.3.jar └── hack-4.1.3.sh ├── v4.1.4 ├── charles.4.1.4.jar └── hack.4.1.4.sh ├── .gitignore ├── hack.4.1.sh ├── hack.4.1.1.sh ├── README.md ├── P.java ├── Licence.java └── LICENSE /charles.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ltjin/charles-hacking/HEAD/charles.jar -------------------------------------------------------------------------------- /RevealPatch.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ltjin/charles-hacking/HEAD/RevealPatch.zip -------------------------------------------------------------------------------- /charles.4.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ltjin/charles-hacking/HEAD/charles.4.1.jar -------------------------------------------------------------------------------- /v4.1.3/charles.4.1.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ltjin/charles-hacking/HEAD/v4.1.3/charles.4.1.3.jar -------------------------------------------------------------------------------- /v4.1.4/charles.4.1.4.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ltjin/charles-hacking/HEAD/v4.1.4/charles.4.1.4.jar -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.class 2 | 3 | # Mobile Tools for Java (J2ME) 4 | .mtj.tmp/ 5 | 6 | # Package Files # 7 | *.war 8 | *.ear 9 | 10 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 11 | hs_err_pid* 12 | -------------------------------------------------------------------------------- /hack.4.1.sh: -------------------------------------------------------------------------------- 1 | charles=/Applications/Charles.app/Contents/Java/charles.jar 2 | dir=charleshack 3 | 4 | mkdir $dir 5 | cd $dir 6 | cat >> GFjZ.java <> slZe.java <> psPJ.java <> gIbD.java < 4 | 5 | # WARNING 6 | 7 | This version is only for charles v4.0. you can download it from: , install as usual and replace *charles.jar* with the one in this repository. 8 | 9 | # MORE 10 | 11 | If you're using other version, like v4.0.1 or above, you can hack it by yourself: 12 | 13 | ```bash 14 | 15 | charles=/Applications/Charles.app/Contents/Java/charles.jar 16 | dir=charleshack 17 | 18 | mkdir $dir 19 | cd $dir 20 | cat >> License.java <>> 29) | (i2 << i); 137 | i += g; 138 | } 139 | return i2; 140 | } 141 | 142 | private static final long a(String str) { 143 | return (Long.parseLong(str.substring(h, 10), 16) << o) | Long.parseLong(str.substring(10, 18), 16); 144 | } 145 | 146 | private String a(int i) { 147 | d(j); 148 | try { 149 | String str = n[i]; 150 | byte[] bArr = new byte[(str.length() / h)]; 151 | for (int i2 = 0; i2 < bArr.length; i2 += g) { 152 | bArr[i2] = (byte) Integer.parseInt(str.substring(i2 << g, (i2 << g) + h), 16); 153 | } 154 | bArr = c(bArr); 155 | int length = bArr.length; 156 | // 把null改成了0 157 | while (bArr[length - 1] == 0) { 158 | length--; 159 | } 160 | return new String(bArr, 0, length, "UTF-8"); 161 | } catch (UnsupportedEncodingException e) { 162 | return ""; 163 | } 164 | } 165 | 166 | public static String a(String str, String str2) { 167 | try { 168 | b = new P(str, str2); 169 | return null; 170 | } catch (LicenceException e) { 171 | return e.getMessage(); 172 | } 173 | } 174 | 175 | private static void a(P p) { 176 | b = p; 177 | } 178 | 179 | public static boolean a() { 180 | return true;//b.c; 181 | } 182 | 183 | private boolean a(long j) { 184 | int b = b(j); 185 | d(j); 186 | for (int i = 0; i < b + 35; i += g) { 187 | j = c(j); 188 | } 189 | return j == m; 190 | } 191 | 192 | private static final int b(long j) { 193 | long j2 = 0; 194 | for (int i = 56; i >= 0; i -= 8) { 195 | j2 ^= (j >>> i) & 255; 196 | } 197 | return Math.abs((int) (j2 & 255)); 198 | } 199 | 200 | private static final int b(String str) { 201 | return Integer.parseInt(str.substring(0, h), 16); 202 | } 203 | 204 | public static String b() { 205 | P p = b; 206 | switch (p.f) { 207 | case g /* 1 */: 208 | return p.d; 209 | case h /* 2 */: 210 | return p.d + " - Site License"; 211 | case i /* 3 */: 212 | return p.d + " - Multi-Site License"; 213 | default: 214 | return p.d; 215 | } 216 | } 217 | 218 | private boolean b(String str, String str2) throws LicenceException { 219 | long c = c(str, str2); 220 | int b = b(c); 221 | d(c); 222 | for (int i = 0; i < b + 35; i += g) { 223 | c = c(c); 224 | } 225 | return c == m; 226 | } 227 | 228 | private byte[] b(byte[] bArr) { 229 | int length = bArr.length; 230 | int i = length + 4; 231 | if (i % 8 != 0) { 232 | i += 8 - (i % 8); 233 | } 234 | byte[] bArr2 = new byte[i]; 235 | System.arraycopy(bArr, 0, bArr2, 4, length); 236 | bArr2[0] = (byte) (length >> 24); 237 | bArr2[g] = (byte) (length >> 16); 238 | bArr2[h] = (byte) (length >> 8); 239 | bArr2[i] = (byte) length; 240 | return c(bArr2); 241 | } 242 | 243 | private long c(long j) { 244 | int i = ((int) (j >>> 32)) + this.Q; 245 | int i2 = (((int) j) + this.P) ^ i; 246 | int i3 = i & 31; 247 | i2 = ((i2 >>> (32 - i3)) | (i2 << i3)) + this.R; 248 | i ^= i2; 249 | i3 = i2 & 31; 250 | i = ((i >>> (32 - i3)) | (i << i3)) + this.S; 251 | i2 ^= i; 252 | i3 = i & 31; 253 | i2 = ((i2 >>> (32 - i3)) | (i2 << i3)) + this.T; 254 | i ^= i2; 255 | i3 = i2 & 31; 256 | i = ((i >>> (32 - i3)) | (i << i3)) + this.U; 257 | i2 ^= i; 258 | i3 = i & 31; 259 | i2 = ((i2 >>> (32 - i3)) | (i2 << i3)) + this.V; 260 | i ^= i2; 261 | i3 = i2 & 31; 262 | i = ((i >>> (32 - i3)) | (i << i3)) + this.W; 263 | i2 ^= i; 264 | i3 = i & 31; 265 | i2 = ((i2 >>> (32 - i3)) | (i2 << i3)) + this.X; 266 | i ^= i2; 267 | i3 = i2 & 31; 268 | i = ((i >>> (32 - i3)) | (i << i3)) + this.Y; 269 | i2 ^= i; 270 | i3 = i & 31; 271 | i2 = ((i2 >>> (32 - i3)) | (i2 << i3)) + this.Z; 272 | i ^= i2; 273 | i3 = i2 & 31; 274 | i = ((i >>> (32 - i3)) | (i << i3)) + this.aa; 275 | i2 ^= i; 276 | i3 = i & 31; 277 | i2 = ((i2 >>> (32 - i3)) | (i2 << i3)) + this.ab; 278 | i ^= i2; 279 | i3 = i2 & 31; 280 | i = ((i >>> (32 - i3)) | (i << i3)) + this.ac; 281 | i2 ^= i; 282 | i3 = i & 31; 283 | i2 = ((i2 >>> (32 - i3)) | (i2 << i3)) + this.ad; 284 | i ^= i2; 285 | i3 = i2 & 31; 286 | i = ((i >>> (32 - i3)) | (i << i3)) + this.ae; 287 | i2 ^= i; 288 | i3 = i & 31; 289 | i2 = ((i2 >>> (32 - i3)) | (i2 << i3)) + this.af; 290 | i ^= i2; 291 | i3 = i2 & 31; 292 | i = ((i >>> (32 - i3)) | (i << i3)) + this.ag; 293 | i2 ^= i; 294 | i3 = i & 31; 295 | i2 = ((i2 >>> (32 - i3)) | (i2 << i3)) + this.ah; 296 | i ^= i2; 297 | i3 = i2 & 31; 298 | i = ((i >>> (32 - i3)) | (i << i3)) + this.ai; 299 | i2 ^= i; 300 | i3 = i & 31; 301 | i2 = ((i2 >>> (32 - i3)) | (i2 << i3)) + this.aj; 302 | i ^= i2; 303 | i3 = i2 & 31; 304 | i = ((i >>> (32 - i3)) | (i << i3)) + this.ak; 305 | i2 ^= i; 306 | i3 = i & 31; 307 | i2 = ((i2 >>> (32 - i3)) | (i2 << i3)) + this.al; 308 | i ^= i2; 309 | i3 = i2 & 31; 310 | i = ((i >>> (32 - i3)) | (i << i3)) + this.am; 311 | i2 ^= i; 312 | i3 = i & 31; 313 | i2 = ((i2 >>> (32 - i3)) | (i2 << i3)) + this.an; 314 | i ^= i2; 315 | i3 = i2 & 31; 316 | return (((long) i2) & 4294967295L) + (((long) (((i >>> (32 - i3)) | (i << i3)) + this.ao)) << 32); 317 | } 318 | 319 | private long c(String str, String str2) throws LicenceException { 320 | int i = 0; 321 | if (str2.length() != 18) { 322 | throw new LicenceException(a(0)); 323 | } else if (str2.equalsIgnoreCase("7055ce2f8cb4f9405f") || str2.equalsIgnoreCase("5bae9d8cdea32760ae") 324 | || str2.equalsIgnoreCase("f3264994d9ea6bc595") || str2.equalsIgnoreCase("b9930cef009d3a7865") 325 | || str2.equalsIgnoreCase("62bd6a5f95aa67998e") || str2.equalsIgnoreCase("a1c536c35904e64584") 326 | || str2.equalsIgnoreCase("d6e5590ecc05edd9b3") || str2.equalsIgnoreCase("8fbe36ce2726458b18") 327 | || str2.equalsIgnoreCase("042a8352caf1188945") || str2.equalsIgnoreCase("9d26d5088770221c3c") 328 | || str2.equalsIgnoreCase("e19b2a01905e4129bf") || str2.equalsIgnoreCase("68ebe4c9d792f31057") 329 | || str2.equalsIgnoreCase("4e4beb8a43e9feb9c7") || str2.equalsIgnoreCase("d04d85b44b306fc9ec") 330 | || str2.equalsIgnoreCase("2b5d21a38c9452e342") || str2.equalsIgnoreCase("88cb89c26a813bce44") 331 | || str2.equalsIgnoreCase("76c9ee78c8ab124054") || str2.equalsIgnoreCase("729db7c98163ac7d3d") 332 | || str2.equalsIgnoreCase("7c1d4761993c412472") || str2.equalsIgnoreCase("08bc0b7ec91cd0f4aa") 333 | || str2.equalsIgnoreCase("25bafae175decaedcc") || str2.equalsIgnoreCase("3181aae6822ef90ccd") 334 | || str2.equalsIgnoreCase("d7a8fe9dc9dc919f87") || str2.equalsIgnoreCase("728dae81d9d22aca03") 335 | || str2.equalsIgnoreCase("119a9b593348fa3e74") || str2.equalsIgnoreCase("04ab87c8d69667878e") 336 | || str2.equalsIgnoreCase("4b282d851ebd87a7bb") || str2.equalsIgnoreCase("ed526255313b756e42") 337 | || str2.equalsIgnoreCase("ed5ab211362ab25ca7") || str2.equalsIgnoreCase("18f4789a3df48f3b15") 338 | || str2.equalsIgnoreCase("67549e44b1c8d8d857") || str2.equalsIgnoreCase("4593c6c54227c4f17d") 339 | || str2.equalsIgnoreCase("1c59db29042e7df8ef") || str2.equalsIgnoreCase("a647e3dd42ce9b409b") 340 | || str2.equalsIgnoreCase("7e06d6a70b82858113") || str2.equalsIgnoreCase("ef4b5a48595197a373") 341 | || str2.equalsIgnoreCase("0ac55f6bebd0330640") || str2.equalsIgnoreCase("1beda9831c78994f43") 342 | || str2.equalsIgnoreCase("8a2b9debb15766bff9") || str2.equalsIgnoreCase("da0e7561b10d974216") 343 | || str2.equalsIgnoreCase("86257b04b8c303fd9a") || str2.equalsIgnoreCase("a4036b2761c9583fda") 344 | || str2.equalsIgnoreCase("18e69f6d5bc820d4d3")) { 345 | throw new LicenceException(a((int) g)); 346 | } else { 347 | long parseLong = (Long.parseLong(str2.substring(h, 10), 16) << 32) 348 | | Long.parseLong(str2.substring(10, 18), 16); 349 | int parseInt = Integer.parseInt(str2.substring(0, h), 16); 350 | d(k); 351 | parseLong = c(parseLong); 352 | if (b(parseLong) != parseInt) { 353 | throw new LicenceException(a((int) g)); 354 | } 355 | this.e = (int) (((parseLong << 32) >>> 32) >>> 24); 356 | if (this.e == g) { 357 | this.f = g; 358 | } else if (this.e == i) { 359 | this.f = (int) ((((parseLong << 32) >>> 32) >>> 16) & 255); 360 | if (!(this.f == g || this.f == h || this.f == i)) { 361 | throw new LicenceException(a((int) g)); 362 | } 363 | } else if (this.e > i) { 364 | this.f = (int) ((((parseLong << 32) >>> 32) >>> 16) & 255); 365 | } else { 366 | throw new LicenceException(a((int) g)); 367 | } 368 | d(j); 369 | try { 370 | byte[] bytes = str.getBytes("UTF-8"); 371 | int length = bytes.length; 372 | parseInt = length + 4; 373 | if (parseInt % 8 != 0) { 374 | parseInt += 8 - (parseInt % 8); 375 | } 376 | byte[] bArr = new byte[parseInt]; 377 | System.arraycopy(bytes, 0, bArr, 4, length); 378 | bArr[0] = (byte) (length >> 24); 379 | bArr[g] = (byte) (length >> 16); 380 | bArr[h] = (byte) (length >> 8); 381 | bArr[i] = (byte) length; 382 | byte[] c = c(bArr); 383 | parseInt = 0; 384 | while (i < c.length) { 385 | parseInt ^= c[i]; 386 | parseInt = (parseInt >>> 29) | (parseInt << i); 387 | i += g; 388 | } 389 | return ((((long) (((int) (parseLong >> 32)) ^ parseInt)) << 32) >>> 32) | -6517524747541020672L; 390 | } catch (UnsupportedEncodingException e) { 391 | return -1; 392 | } 393 | } 394 | } 395 | 396 | private boolean c() { 397 | return this.c; 398 | } 399 | 400 | private byte[] c(byte[] bArr) { 401 | byte[] bArr2 = new byte[bArr.length]; 402 | int length = bArr.length; 403 | long j = 0; 404 | int i = 0; 405 | for (int i2 = 0; i2 < length; i2 += g) { 406 | j = (j << 8) | ((long) (bArr[i2] & 255)); 407 | i += g; 408 | if (i == 8) { 409 | j = c(j); 410 | bArr2[i2 - 7] = (byte) ((int) (j >>> 56)); 411 | bArr2[i2 - 6] = (byte) ((int) (j >>> 48)); 412 | bArr2[i2 - 5] = (byte) ((int) (j >>> 40)); 413 | bArr2[i2 - 4] = (byte) ((int) (j >>> o)); 414 | bArr2[i2 - 3] = (byte) ((int) (j >>> 24)); 415 | bArr2[i2 - 2] = (byte) ((int) (j >>> 16)); 416 | bArr2[i2 - 1] = (byte) ((int) (j >>> 8)); 417 | bArr2[i2] = (byte) ((int) j); 418 | j = 0; 419 | i = 0; 420 | } 421 | } 422 | return bArr2; 423 | } 424 | 425 | private String d() { 426 | switch (this.f) { 427 | case g /* 1 */: 428 | return this.d; 429 | case h /* 2 */: 430 | return this.d + " - Site License"; 431 | case i /* 3 */: 432 | return this.d + " - Multi-Site License"; 433 | default: 434 | return this.d; 435 | } 436 | } 437 | 438 | private void d(long j) { 439 | int i = (int) j; 440 | int i2 = (int) (j >>> o); 441 | int i3 = p; 442 | i3 = (i3 >>> 29) | (i3 << i); 443 | this.P = i3; 444 | i += i3; 445 | int i4 = i3 & 31; 446 | i = (i >>> (32 - i4)) | (i << i4); 447 | i3 = (i3 + i) + q; 448 | i3 = (i3 >>> 29) | (i3 << i); 449 | this.Q = i3; 450 | i2 += i3 + i; 451 | i4 = (i3 + i) & 31; 452 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 453 | i3 = (i3 + i2) + r; 454 | i3 = (i3 >>> 29) | (i3 << i); 455 | this.R = i3; 456 | i += i3 + i2; 457 | i4 = (i3 + i2) & 31; 458 | i = (i >>> (32 - i4)) | (i << i4); 459 | i3 = (i3 + i) + s; 460 | i3 = (i3 >>> 29) | (i3 << i); 461 | this.S = i3; 462 | i2 += i3 + i; 463 | i4 = (i3 + i) & 31; 464 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 465 | i3 = (i3 + i2) + t; 466 | i3 = (i3 >>> 29) | (i3 << i); 467 | this.T = i3; 468 | i += i3 + i2; 469 | i4 = (i3 + i2) & 31; 470 | i = (i >>> (32 - i4)) | (i << i4); 471 | i3 = (i3 + i) + u; 472 | i3 = (i3 >>> 29) | (i3 << i); 473 | this.U = i3; 474 | i2 += i3 + i; 475 | i4 = (i3 + i) & 31; 476 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 477 | i3 = (i3 + i2) + v; 478 | i3 = (i3 >>> 29) | (i3 << i); 479 | this.V = i3; 480 | i += i3 + i2; 481 | i4 = (i3 + i2) & 31; 482 | i = (i >>> (32 - i4)) | (i << i4); 483 | i3 = (i3 + i) + w; 484 | i3 = (i3 >>> 29) | (i3 << i); 485 | this.W = i3; 486 | i2 += i3 + i; 487 | i4 = (i3 + i) & 31; 488 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 489 | i3 = (i3 + i2) + x; 490 | i3 = (i3 >>> 29) | (i3 << i); 491 | this.X = i3; 492 | i += i3 + i2; 493 | i4 = (i3 + i2) & 31; 494 | i = (i >>> (32 - i4)) | (i << i4); 495 | i3 = (i3 + i) + y; 496 | i3 = (i3 >>> 29) | (i3 << i); 497 | this.Y = i3; 498 | i2 += i3 + i; 499 | i4 = (i3 + i) & 31; 500 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 501 | i3 = (i3 + i2) + z; 502 | i3 = (i3 >>> 29) | (i3 << i); 503 | this.Z = i3; 504 | i += i3 + i2; 505 | i4 = (i3 + i2) & 31; 506 | i = (i >>> (32 - i4)) | (i << i4); 507 | i3 = (i3 + i) + A; 508 | i3 = (i3 >>> 29) | (i3 << i); 509 | this.aa = i3; 510 | i2 += i3 + i; 511 | i4 = (i3 + i) & 31; 512 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 513 | i3 = (i3 + i2) + B; 514 | i3 = (i3 >>> 29) | (i3 << i); 515 | this.ab = i3; 516 | i += i3 + i2; 517 | i4 = (i3 + i2) & 31; 518 | i = (i >>> (32 - i4)) | (i << i4); 519 | i3 = (i3 + i) + C; 520 | i3 = (i3 >>> 29) | (i3 << i); 521 | this.ac = i3; 522 | i2 += i3 + i; 523 | i4 = (i3 + i) & 31; 524 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 525 | i3 = (i3 + i2) + D; 526 | i3 = (i3 >>> 29) | (i3 << i); 527 | this.ad = i3; 528 | i += i3 + i2; 529 | i4 = (i3 + i2) & 31; 530 | i = (i >>> (32 - i4)) | (i << i4); 531 | i3 = (i3 + i) + E; 532 | i3 = (i3 >>> 29) | (i3 << i); 533 | this.ae = i3; 534 | i2 += i3 + i; 535 | i4 = (i3 + i) & 31; 536 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 537 | i3 = (i3 + i2) + F; 538 | i3 = (i3 >>> 29) | (i3 << i); 539 | this.af = i3; 540 | i += i3 + i2; 541 | i4 = (i3 + i2) & 31; 542 | i = (i >>> (32 - i4)) | (i << i4); 543 | i3 = (i3 + i) + G; 544 | i3 = (i3 >>> 29) | (i3 << i); 545 | this.ag = i3; 546 | i2 += i3 + i; 547 | i4 = (i3 + i) & 31; 548 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 549 | i3 = (i3 + i2) + H; 550 | i3 = (i3 >>> 29) | (i3 << i); 551 | this.ah = i3; 552 | i += i3 + i2; 553 | i4 = (i3 + i2) & 31; 554 | i = (i >>> (32 - i4)) | (i << i4); 555 | i3 = (i3 + i) + I; 556 | i3 = (i3 >>> 29) | (i3 << i); 557 | this.ai = i3; 558 | i2 += i3 + i; 559 | i4 = (i3 + i) & 31; 560 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 561 | i3 = (i3 + i2) + J; 562 | i3 = (i3 >>> 29) | (i3 << i); 563 | this.aj = i3; 564 | i += i3 + i2; 565 | i4 = (i3 + i2) & 31; 566 | i = (i >>> (32 - i4)) | (i << i4); 567 | i3 = (i3 + i) + K; 568 | i3 = (i3 >>> 29) | (i3 << i); 569 | this.ak = i3; 570 | i2 += i3 + i; 571 | i4 = (i3 + i) & 31; 572 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 573 | i3 = (i3 + i2) + L; 574 | i3 = (i3 >>> 29) | (i3 << i); 575 | this.al = i3; 576 | i += i3 + i2; 577 | i4 = (i3 + i2) & 31; 578 | i = (i >>> (32 - i4)) | (i << i4); 579 | i3 = (i3 + i) + M; 580 | i3 = (i3 >>> 29) | (i3 << i); 581 | this.am = i3; 582 | i2 += i3 + i; 583 | i4 = (i3 + i) & 31; 584 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 585 | i3 = (i3 + i2) + N; 586 | i3 = (i3 >>> 29) | (i3 << i); 587 | this.an = i3; 588 | i += i3 + i2; 589 | i4 = (i3 + i2) & 31; 590 | i = (i >>> (32 - i4)) | (i << i4); 591 | i3 = (i3 + i) + O; 592 | i3 = (i3 >>> 29) | (i3 << i); 593 | this.ao = i3; 594 | i2 += i3 + i; 595 | i4 = (i3 + i) & 31; 596 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 597 | i3 = (i3 + i2) + this.P; 598 | i3 = (i3 >>> 29) | (i3 << i); 599 | this.P = i3; 600 | i += i3 + i2; 601 | i4 = (i3 + i2) & 31; 602 | i = (i >>> (32 - i4)) | (i << i4); 603 | i3 = (i3 + i) + this.Q; 604 | i3 = (i3 >>> 29) | (i3 << i); 605 | this.Q = i3; 606 | i2 += i3 + i; 607 | i4 = (i3 + i) & 31; 608 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 609 | i3 = (i3 + i2) + this.R; 610 | i3 = (i3 >>> 29) | (i3 << i); 611 | this.R = i3; 612 | i += i3 + i2; 613 | i4 = (i3 + i2) & 31; 614 | i = (i >>> (32 - i4)) | (i << i4); 615 | i3 = (i3 + i) + this.S; 616 | i3 = (i3 >>> 29) | (i3 << i); 617 | this.S = i3; 618 | i2 += i3 + i; 619 | i4 = (i3 + i) & 31; 620 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 621 | i3 = (i3 + i2) + this.T; 622 | i3 = (i3 >>> 29) | (i3 << i); 623 | this.T = i3; 624 | i += i3 + i2; 625 | i4 = (i3 + i2) & 31; 626 | i = (i >>> (32 - i4)) | (i << i4); 627 | i3 = (i3 + i) + this.U; 628 | i3 = (i3 >>> 29) | (i3 << i); 629 | this.U = i3; 630 | i2 += i3 + i; 631 | i4 = (i3 + i) & 31; 632 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 633 | i3 = (i3 + i2) + this.V; 634 | i3 = (i3 >>> 29) | (i3 << i); 635 | this.V = i3; 636 | i += i3 + i2; 637 | i4 = (i3 + i2) & 31; 638 | i = (i >>> (32 - i4)) | (i << i4); 639 | i3 = (i3 + i) + this.W; 640 | i3 = (i3 >>> 29) | (i3 << i); 641 | this.W = i3; 642 | i2 += i3 + i; 643 | i4 = (i3 + i) & 31; 644 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 645 | i3 = (i3 + i2) + this.X; 646 | i3 = (i3 >>> 29) | (i3 << i); 647 | this.X = i3; 648 | i += i3 + i2; 649 | i4 = (i3 + i2) & 31; 650 | i = (i >>> (32 - i4)) | (i << i4); 651 | i3 = (i3 + i) + this.Y; 652 | i3 = (i3 >>> 29) | (i3 << i); 653 | this.Y = i3; 654 | i2 += i3 + i; 655 | i4 = (i3 + i) & 31; 656 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 657 | i3 = (i3 + i2) + this.Z; 658 | i3 = (i3 >>> 29) | (i3 << i); 659 | this.Z = i3; 660 | i += i3 + i2; 661 | i4 = (i3 + i2) & 31; 662 | i = (i >>> (32 - i4)) | (i << i4); 663 | i3 = (i3 + i) + this.aa; 664 | i3 = (i3 >>> 29) | (i3 << i); 665 | this.aa = i3; 666 | i2 += i3 + i; 667 | i4 = (i3 + i) & 31; 668 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 669 | i3 = (i3 + i2) + this.ab; 670 | i3 = (i3 >>> 29) | (i3 << i); 671 | this.ab = i3; 672 | i += i3 + i2; 673 | i4 = (i3 + i2) & 31; 674 | i = (i >>> (32 - i4)) | (i << i4); 675 | i3 = (i3 + i) + this.ac; 676 | i3 = (i3 >>> 29) | (i3 << i); 677 | this.ac = i3; 678 | i2 += i3 + i; 679 | i4 = (i3 + i) & 31; 680 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 681 | i3 = (i3 + i2) + this.ad; 682 | i3 = (i3 >>> 29) | (i3 << i); 683 | this.ad = i3; 684 | i += i3 + i2; 685 | i4 = (i3 + i2) & 31; 686 | i = (i >>> (32 - i4)) | (i << i4); 687 | i3 = (i3 + i) + this.ae; 688 | i3 = (i3 >>> 29) | (i3 << i); 689 | this.ae = i3; 690 | i2 += i3 + i; 691 | i4 = (i3 + i) & 31; 692 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 693 | i3 = (i3 + i2) + this.af; 694 | i3 = (i3 >>> 29) | (i3 << i); 695 | this.af = i3; 696 | i += i3 + i2; 697 | i4 = (i3 + i2) & 31; 698 | i = (i >>> (32 - i4)) | (i << i4); 699 | i3 = (i3 + i) + this.ag; 700 | i3 = (i3 >>> 29) | (i3 << i); 701 | this.ag = i3; 702 | i2 += i3 + i; 703 | i4 = (i3 + i) & 31; 704 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 705 | i3 = (i3 + i2) + this.ah; 706 | i3 = (i3 >>> 29) | (i3 << i); 707 | this.ah = i3; 708 | i += i3 + i2; 709 | i4 = (i3 + i2) & 31; 710 | i = (i >>> (32 - i4)) | (i << i4); 711 | i3 = (i3 + i) + this.ai; 712 | i3 = (i3 >>> 29) | (i3 << i); 713 | this.ai = i3; 714 | i2 += i3 + i; 715 | i4 = (i3 + i) & 31; 716 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 717 | i3 = (i3 + i2) + this.aj; 718 | i3 = (i3 >>> 29) | (i3 << i); 719 | this.aj = i3; 720 | i += i3 + i2; 721 | i4 = (i3 + i2) & 31; 722 | i = (i >>> (32 - i4)) | (i << i4); 723 | i3 = (i3 + i) + this.ak; 724 | i3 = (i3 >>> 29) | (i3 << i); 725 | this.ak = i3; 726 | i2 += i3 + i; 727 | i4 = (i3 + i) & 31; 728 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 729 | i3 = (i3 + i2) + this.al; 730 | i3 = (i3 >>> 29) | (i3 << i); 731 | this.al = i3; 732 | i += i3 + i2; 733 | i4 = (i3 + i2) & 31; 734 | i = (i >>> (32 - i4)) | (i << i4); 735 | i3 = (i3 + i) + this.am; 736 | i3 = (i3 >>> 29) | (i3 << i); 737 | this.am = i3; 738 | i2 += i3 + i; 739 | i4 = (i3 + i) & 31; 740 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 741 | i3 = (i3 + i2) + this.an; 742 | i3 = (i3 >>> 29) | (i3 << i); 743 | this.an = i3; 744 | i += i3 + i2; 745 | i4 = (i3 + i2) & 31; 746 | i = (i >>> (32 - i4)) | (i << i4); 747 | i3 = (i3 + i) + this.ao; 748 | i3 = (i3 >>> 29) | (i3 << i); 749 | this.ao = i3; 750 | i2 += i3 + i; 751 | i4 = (i3 + i) & 31; 752 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 753 | i3 = (i3 + i2) + this.P; 754 | i3 = (i3 >>> 29) | (i3 << i); 755 | this.P = i3; 756 | i += i3 + i2; 757 | i4 = (i3 + i2) & 31; 758 | i = (i >>> (32 - i4)) | (i << i4); 759 | i3 = (i3 + i) + this.Q; 760 | i3 = (i3 >>> 29) | (i3 << i); 761 | this.Q = i3; 762 | i2 += i3 + i; 763 | i4 = (i3 + i) & 31; 764 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 765 | i3 = (i3 + i2) + this.R; 766 | i3 = (i3 >>> 29) | (i3 << i); 767 | this.R = i3; 768 | i += i3 + i2; 769 | i4 = (i3 + i2) & 31; 770 | i = (i >>> (32 - i4)) | (i << i4); 771 | i3 = (i3 + i) + this.S; 772 | i3 = (i3 >>> 29) | (i3 << i); 773 | this.S = i3; 774 | i2 += i3 + i; 775 | i4 = (i3 + i) & 31; 776 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 777 | i3 = (i3 + i2) + this.T; 778 | i3 = (i3 >>> 29) | (i3 << i); 779 | this.T = i3; 780 | i += i3 + i2; 781 | i4 = (i3 + i2) & 31; 782 | i = (i >>> (32 - i4)) | (i << i4); 783 | i3 = (i3 + i) + this.U; 784 | i3 = (i3 >>> 29) | (i3 << i); 785 | this.U = i3; 786 | i2 += i3 + i; 787 | i4 = (i3 + i) & 31; 788 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 789 | i3 = (i3 + i2) + this.V; 790 | i3 = (i3 >>> 29) | (i3 << i); 791 | this.V = i3; 792 | i += i3 + i2; 793 | i4 = (i3 + i2) & 31; 794 | i = (i >>> (32 - i4)) | (i << i4); 795 | i3 = (i3 + i) + this.W; 796 | i3 = (i3 >>> 29) | (i3 << i); 797 | this.W = i3; 798 | i2 += i3 + i; 799 | i4 = (i3 + i) & 31; 800 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 801 | i3 = (i3 + i2) + this.X; 802 | i3 = (i3 >>> 29) | (i3 << i); 803 | this.X = i3; 804 | i += i3 + i2; 805 | i4 = (i3 + i2) & 31; 806 | i = (i >>> (32 - i4)) | (i << i4); 807 | i3 = (i3 + i) + this.Y; 808 | i3 = (i3 >>> 29) | (i3 << i); 809 | this.Y = i3; 810 | i2 += i3 + i; 811 | i4 = (i3 + i) & 31; 812 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 813 | i3 = (i3 + i2) + this.Z; 814 | i3 = (i3 >>> 29) | (i3 << i); 815 | this.Z = i3; 816 | i += i3 + i2; 817 | i4 = (i3 + i2) & 31; 818 | i = (i >>> (32 - i4)) | (i << i4); 819 | i3 = (i3 + i) + this.aa; 820 | i3 = (i3 >>> 29) | (i3 << i); 821 | this.aa = i3; 822 | i2 += i3 + i; 823 | i4 = (i3 + i) & 31; 824 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 825 | i3 = (i3 + i2) + this.ab; 826 | i3 = (i3 >>> 29) | (i3 << i); 827 | this.ab = i3; 828 | i += i3 + i2; 829 | i4 = (i3 + i2) & 31; 830 | i = (i >>> (32 - i4)) | (i << i4); 831 | i3 = (i3 + i) + this.ac; 832 | i3 = (i3 >>> 29) | (i3 << i); 833 | this.ac = i3; 834 | i2 += i3 + i; 835 | i4 = (i3 + i) & 31; 836 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 837 | i3 = (i3 + i2) + this.ad; 838 | i3 = (i3 >>> 29) | (i3 << i); 839 | this.ad = i3; 840 | i += i3 + i2; 841 | i4 = (i3 + i2) & 31; 842 | i = (i >>> (32 - i4)) | (i << i4); 843 | i3 = (i3 + i) + this.ae; 844 | i3 = (i3 >>> 29) | (i3 << i); 845 | this.ae = i3; 846 | i2 += i3 + i; 847 | i4 = (i3 + i) & 31; 848 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 849 | i3 = (i3 + i2) + this.af; 850 | i3 = (i3 >>> 29) | (i3 << i); 851 | this.af = i3; 852 | i += i3 + i2; 853 | i4 = (i3 + i2) & 31; 854 | i = (i >>> (32 - i4)) | (i << i4); 855 | i3 = (i3 + i) + this.ag; 856 | i3 = (i3 >>> 29) | (i3 << i); 857 | this.ag = i3; 858 | i2 += i3 + i; 859 | i4 = (i3 + i) & 31; 860 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 861 | i3 = (i3 + i2) + this.ah; 862 | i3 = (i3 >>> 29) | (i3 << i); 863 | this.ah = i3; 864 | i += i3 + i2; 865 | i4 = (i3 + i2) & 31; 866 | i = (i >>> (32 - i4)) | (i << i4); 867 | i3 = (i3 + i) + this.ai; 868 | i3 = (i3 >>> 29) | (i3 << i); 869 | this.ai = i3; 870 | i2 += i3 + i; 871 | i4 = (i3 + i) & 31; 872 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 873 | i3 = (i3 + i2) + this.aj; 874 | i3 = (i3 >>> 29) | (i3 << i); 875 | this.aj = i3; 876 | i += i3 + i2; 877 | i4 = (i3 + i2) & 31; 878 | i = (i >>> (32 - i4)) | (i << i4); 879 | i3 = (i3 + i) + this.ak; 880 | i3 = (i3 >>> 29) | (i3 << i); 881 | this.ak = i3; 882 | i2 += i3 + i; 883 | i4 = (i3 + i) & 31; 884 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 885 | i3 = (i3 + i2) + this.al; 886 | i3 = (i3 >>> 29) | (i3 << i); 887 | this.al = i3; 888 | i += i3 + i2; 889 | i4 = (i3 + i2) & 31; 890 | i = (i >>> (32 - i4)) | (i << i4); 891 | i3 = (i3 + i) + this.am; 892 | i3 = (i3 >>> 29) | (i3 << i); 893 | this.am = i3; 894 | i2 += i3 + i; 895 | i4 = (i3 + i) & 31; 896 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 897 | i3 = (i3 + i2) + this.an; 898 | i3 = (i3 >>> 29) | (i3 << i); 899 | this.an = i3; 900 | i += i3 + i2; 901 | i2 = (i2 + i3) & 31; 902 | i = (((i >>> (32 - i2)) | (i << i2)) + i3) + this.ao; 903 | this.ao = (i >>> 29) | (i << i); 904 | } 905 | } 906 | 907 | class LicenceException extends Exception { 908 | public LicenceException(String str) { 909 | super(str); 910 | } 911 | } -------------------------------------------------------------------------------- /Licence.java: -------------------------------------------------------------------------------- 1 | package com.xk72.charles.gui; 2 | 3 | import java.io.UnsupportedEncodingException; 4 | import java.nio.ByteBuffer; 5 | 6 | /** 7 | * @author loganliu 8 | * 9 | */ 10 | /** 11 | * @author loganliu 12 | * 13 | */ 14 | public final class Licence { 15 | private static int A = 0; 16 | private static int B = 0; 17 | private static int C = 0; 18 | private static int D = 0; 19 | private static int E = 0; 20 | private static int F = 0; 21 | private static int G = 0; 22 | private static int H = 0; 23 | private static int I = 0; 24 | private static int J = 0; 25 | private static int K = 0; 26 | private static int L = 0; 27 | private static int M = 0; 28 | private static int N = 0; 29 | private static int O = 0; 30 | private static String a = "Thanks for looking at the source. Please register Charles if you use it."; 31 | private static final int ap = -1209970333; 32 | private static final int aq = -1640531527; 33 | private static Licence b = null; 34 | private static final int g = 1; 35 | private static final int h = 2; 36 | private static final int i = 3; 37 | private static final long j = 8800536498351690864L; 38 | private static final long k = -5408575981733630035L; 39 | private static final long l = -6517524745266237632L; 40 | private static final long m = 5911726755176091652L; 41 | private static final String[] n; 42 | private static final int o = 32; 43 | private static int p; 44 | private static int q; 45 | private static int r; 46 | private static int s; 47 | private static int t; 48 | private static int u; 49 | private static int v; 50 | private static int w; 51 | private static int x; 52 | private static int y; 53 | private static int z; 54 | private int P; 55 | private int Q; 56 | private int R; 57 | private int S; 58 | private int T; 59 | private int U; 60 | private int V; 61 | private int W; 62 | private int X; 63 | private int Y; 64 | private int Z; 65 | private int aa; 66 | private int ab; 67 | private int ac; 68 | private int ad; 69 | private int ae; 70 | private int af; 71 | private int ag; 72 | private int ah; 73 | private int ai; 74 | private int aj; 75 | private int ak; 76 | private int al; 77 | private int am; 78 | private int an; 79 | private int ao; 80 | private boolean c; 81 | private String d; 82 | private int e; 83 | private int f; 84 | 85 | class SerialException extends Exception { 86 | public SerialException(String str) { 87 | super(str); 88 | printStackTrace(); 89 | } 90 | } 91 | 92 | static { 93 | b = new Licence(); 94 | String[] strArr = new String[i]; 95 | strArr[0] = "b241993e8a12c782348e4652cc22c2501d9d6f248e91a3d849275666a0ff7d954fdf638f0d03098c52c4710a5e619b9b09cd6cd027ea3bdb937172b3fdf0bded3d684333798880bb78780f6f6644580409ac882bc021732a"; 96 | strArr[g] = "b241993e8a12c782348e4652cc22c250c30afb881b44ba4dd936c44a573755b5276046dc3ae32e58d10f467421f51ca607b0e29f53cd8f38dd9eee548398b195348e4652cc22c2502feb5f8fd884cb3c9a330ee10954d071"; 97 | strArr[h] = "8a24264c4ae5e5371d663158ccbd75e5a5d70bef5d61291ba3af58b92fe98f7a5c8f83abe09b0c1b3f469d5ad85a3a01e81a2248a290b22d05f52db22eb8b10af10437ddcf2f437b1a519b09a9c4f2c374a882757515e2e2fde238a4eccc62d3fc36d9a77dcbd7cc05236b02716005836b21e58a07330bb18136139263e71a0f79382179978b680a"; 98 | n = strArr; 99 | p = ap; 100 | q = 1444465436; 101 | r = -196066091; 102 | s = -1836597618; 103 | t = 817838151; 104 | u = -822693376; 105 | v = 1831742393; 106 | w = 191210866; 107 | x = -1449320661; 108 | y = 1205115108; 109 | z = -435416419; 110 | A = -2075947946; 111 | B = 578487823; 112 | C = -1062043704; 113 | D = 1592392065; 114 | E = -48139462; 115 | F = -1688670989; 116 | G = 965764780; 117 | H = -674766747; 118 | I = 1979669022; 119 | J = 339137495; 120 | K = -1301394032; 121 | L = 1353041737; 122 | M = -287489790; 123 | N = -1928021317; 124 | O = 726414452; 125 | 126 | System.out.println("static loaded, start crack."); 127 | } 128 | 129 | public Licence() { 130 | this.c = false; 131 | this.d = "Unregistered"; 132 | } 133 | 134 | private Licence(String str, String str2) throws SerialException { 135 | System.out.println(" private Licence(String str, String str2)"); 136 | this.c = false; 137 | this.d = "Unregistered"; 138 | try { 139 | if (a(c(str, str2))) { 140 | this.d = str; 141 | this.c = true; 142 | return; 143 | } 144 | throw new SerialException(a((int) h)); 145 | } catch (NumberFormatException e) { 146 | throw new SerialException(a((int) g)); 147 | } 148 | } 149 | 150 | private static final int a(byte[] bArr) { 151 | int i = 0; 152 | int i2 = 0; 153 | while (i < bArr.length) { 154 | i2 ^= bArr[i]; 155 | i2 = (i2 >>> 29) | (i2 << i); 156 | i += g; 157 | } 158 | return i2; 159 | } 160 | 161 | private static final long a(String str) { 162 | return (Long.parseLong(str.substring(h, 10), 16) << o) 163 | | Long.parseLong(str.substring(10, 18), 16); 164 | } 165 | 166 | private String a(int i) { 167 | d(j); 168 | try { 169 | String str = n[i]; 170 | byte[] bArr = new byte[(str.length() / h)]; 171 | for (int i2 = 0; i2 < bArr.length; i2 += g) { 172 | bArr[i2] = (byte) Integer.parseInt( 173 | str.substring(i2 << g, (i2 << g) + h), 16); 174 | } 175 | bArr = c(bArr); 176 | int length = bArr.length; 177 | while (bArr[length - 1] == (byte) 0) { 178 | length--; 179 | } 180 | return new String(bArr, 0, length, "UTF-8"); 181 | } catch (UnsupportedEncodingException e) { 182 | return ""; 183 | } 184 | } 185 | 186 | /** 187 | * 1. 返回null的话,验证成功。 188 | * 189 | * @param str 190 | * @param str2 191 | * @return 192 | */ 193 | public static String a(String str, String str2) { 194 | // if(0<1) 195 | // return null; 196 | try { 197 | b = new Licence(str, str2); 198 | return null; 199 | } catch (SerialException e) { 200 | return e.getMessage(); 201 | } 202 | } 203 | 204 | private static void a(Licence licence) { 205 | System.out.println(" a(Licence licence)" + licence); 206 | b = licence; 207 | } 208 | 209 | /**disable licence check 210 | * @return 211 | */ 212 | public static boolean a() { 213 | // System.err.println(b.toString() + " boolean a() "); 214 | return true; 215 | // return b.c; 216 | } 217 | 218 | /* 219 | * (non-Javadoc) 220 | * 221 | * @see java.lang.Object#toString() 222 | */ 223 | @Override 224 | public String toString() { 225 | StringBuilder builder = new StringBuilder(); 226 | builder.append("Licence [P=").append(P).append(", Q=").append(Q) 227 | .append(", R=").append(R).append(", S=").append(S) 228 | .append(", T=").append(T).append(", U=").append(U) 229 | .append(", V=").append(V).append(", W=").append(W) 230 | .append(", X=").append(X).append(", Y=").append(Y) 231 | .append(", Z=").append(Z).append(", aa=").append(aa) 232 | .append(", ab=").append(ab).append(", ac=").append(ac) 233 | .append(", ad=").append(ad).append(", ae=").append(ae) 234 | .append(", af=").append(af).append(", ag=").append(ag) 235 | .append(", ah=").append(ah).append(", ai=").append(ai) 236 | .append(", aj=").append(aj).append(", ak=").append(ak) 237 | .append(", al=").append(al).append(", am=").append(am) 238 | .append(", an=").append(an).append(", ao=").append(ao) 239 | .append(", c=").append(c).append(", d=").append(d) 240 | .append(", e=").append(e).append(", f=").append(f).append("]"); 241 | return builder.toString(); 242 | } 243 | 244 | /** 245 | * 2. 核心验证开始。 246 | * 247 | * @param j 248 | * @return 249 | */ 250 | private boolean a(long j) { 251 | if(0<1)return true; 252 | int b = myb(j);//一个小于255的正数。 253 | d(j);// 设置其他参数。 254 | for (int i = 0; i < b + 35; i += g) { 255 | j = c(j); 256 | } 257 | return j == m; 258 | } 259 | 260 | /**同myb。把long的每个Byte取异或,然后取最后一Byte。&255的作用是取最后一个Byte 261 | * @param j 262 | * @return 263 | */ 264 | private static final int b(long j) { 265 | long j2 = 0; 266 | for (int i = 56; i >= 0; i -= 8) { 267 | j2 ^= (j >>> i) & 255; 268 | } 269 | return Math.abs((int) (j2 & 255)); 270 | } 271 | 272 | /**把long的每个Byte取异或,然后取最后一Byte。&255的作用是取最后一个Byte 273 | * @param j 274 | * @return 275 | */ 276 | private static final int myb(long j) { 277 | byte bytes[] = new byte[8]; 278 | ByteBuffer buf = ByteBuffer.wrap(bytes); 279 | buf.putLong(j); 280 | long temp = 0; 281 | for (byte b : bytes) { 282 | temp ^= b; 283 | } 284 | return Math.abs((int) temp & 255); 285 | } 286 | 287 | private static void bin(long i) { 288 | System.out.println(Long.toBinaryString(i)); 289 | } 290 | 291 | private static void bin(String s, long i) { 292 | System.out.println(s + ":\t" + Long.toBinaryString(i)); 293 | } 294 | 295 | private static void bbin(String s, byte i) { 296 | System.out.println(s 297 | + ":\t" 298 | + String.format("%8s", Integer.toBinaryString(i & 0xFF)) 299 | .replace(' ', '0')); 300 | } 301 | 302 | private static final int b(String str) { 303 | return Integer.parseInt(str.substring(0, h), 16); 304 | } 305 | 306 | public static String b() { 307 | Licence licence = b; 308 | switch (licence.f) { 309 | case g /* 1 */: 310 | return licence.d; 311 | case h /* 2 */: 312 | return licence.d + " - Site License"; 313 | case i /* 3 */: 314 | return licence.d + " - Multi-Site License"; 315 | default: 316 | return licence.d; 317 | } 318 | } 319 | 320 | private boolean b(String str, String str2) throws SerialException { 321 | long c = c(str, str2); 322 | int b = b(c); 323 | d(c); 324 | for (int i = 0; i < b + 35; i += g) { 325 | c = c(c); 326 | } 327 | return c == m; 328 | } 329 | 330 | private byte[] b(byte[] bArr) { 331 | int length = bArr.length; 332 | int i = length + 4; 333 | if (i % 8 != 0) { 334 | i += 8 - (i % 8); 335 | } 336 | byte[] bArr2 = new byte[i]; 337 | System.arraycopy(bArr, 0, bArr2, 4, length); 338 | bArr2[0] = (byte) (length >> 24); 339 | bArr2[g] = (byte) (length >> 16); 340 | bArr2[h] = (byte) (length >> 8); 341 | bArr2[i] = (byte) length; 342 | return c(bArr2); 343 | } 344 | 345 | private long c(long j) { 346 | System.out.println("c(long j): " + j); 347 | int i = ((int) (j >>> 32)) + this.Q; 348 | int i2 = (((int) j) + this.P) ^ i; 349 | int i3 = i & 31; 350 | i2 = ((i2 >>> (32 - i3)) | (i2 << i3)) + this.R; 351 | i ^= i2; 352 | i3 = i2 & 31; 353 | i = ((i >>> (32 - i3)) | (i << i3)) + this.S; 354 | i2 ^= i; 355 | i3 = i & 31; 356 | i2 = ((i2 >>> (32 - i3)) | (i2 << i3)) + this.T; 357 | i ^= i2; 358 | i3 = i2 & 31; 359 | i = ((i >>> (32 - i3)) | (i << i3)) + this.U; 360 | i2 ^= i; 361 | i3 = i & 31; 362 | i2 = ((i2 >>> (32 - i3)) | (i2 << i3)) + this.V; 363 | i ^= i2; 364 | i3 = i2 & 31; 365 | i = ((i >>> (32 - i3)) | (i << i3)) + this.W; 366 | i2 ^= i; 367 | i3 = i & 31; 368 | i2 = ((i2 >>> (32 - i3)) | (i2 << i3)) + this.X; 369 | i ^= i2; 370 | i3 = i2 & 31; 371 | i = ((i >>> (32 - i3)) | (i << i3)) + this.Y; 372 | i2 ^= i; 373 | i3 = i & 31; 374 | i2 = ((i2 >>> (32 - i3)) | (i2 << i3)) + this.Z; 375 | i ^= i2; 376 | i3 = i2 & 31; 377 | i = ((i >>> (32 - i3)) | (i << i3)) + this.aa; 378 | i2 ^= i; 379 | i3 = i & 31; 380 | i2 = ((i2 >>> (32 - i3)) | (i2 << i3)) + this.ab; 381 | i ^= i2; 382 | i3 = i2 & 31; 383 | i = ((i >>> (32 - i3)) | (i << i3)) + this.ac; 384 | i2 ^= i; 385 | i3 = i & 31; 386 | i2 = ((i2 >>> (32 - i3)) | (i2 << i3)) + this.ad; 387 | i ^= i2; 388 | i3 = i2 & 31; 389 | i = ((i >>> (32 - i3)) | (i << i3)) + this.ae; 390 | i2 ^= i; 391 | i3 = i & 31; 392 | i2 = ((i2 >>> (32 - i3)) | (i2 << i3)) + this.af; 393 | i ^= i2; 394 | i3 = i2 & 31; 395 | i = ((i >>> (32 - i3)) | (i << i3)) + this.ag; 396 | i2 ^= i; 397 | i3 = i & 31; 398 | i2 = ((i2 >>> (32 - i3)) | (i2 << i3)) + this.ah; 399 | i ^= i2; 400 | i3 = i2 & 31; 401 | i = ((i >>> (32 - i3)) | (i << i3)) + this.ai; 402 | i2 ^= i; 403 | i3 = i & 31; 404 | i2 = ((i2 >>> (32 - i3)) | (i2 << i3)) + this.aj; 405 | i ^= i2; 406 | i3 = i2 & 31; 407 | i = ((i >>> (32 - i3)) | (i << i3)) + this.ak; 408 | i2 ^= i; 409 | i3 = i & 31; 410 | i2 = ((i2 >>> (32 - i3)) | (i2 << i3)) + this.al; 411 | i ^= i2; 412 | i3 = i2 & 31; 413 | i = ((i >>> (32 - i3)) | (i << i3)) + this.am; 414 | i2 ^= i; 415 | i3 = i & 31; 416 | i2 = ((i2 >>> (32 - i3)) | (i2 << i3)) + this.an; 417 | i ^= i2; 418 | i3 = i2 & 31; 419 | return (((long) i2) & 4294967295L) 420 | + (((long) (((i >>> (32 - i3)) | (i << i3)) + this.ao)) << 32); 421 | } 422 | 423 | /** 424 | * 1. 核心验证,把username+key hash成一个long 425 | * 426 | * @param username 427 | * @param key 428 | * @return 429 | * @throws SerialException 430 | */ 431 | private long c(String username, String key) throws SerialException { 432 | System.out.println("开始hash\t" + username + "\t" + key); 433 | if(0<1)return 1; 434 | int i = 0; 435 | if (key.length() != 18) { 436 | throw new SerialException(a(0)); 437 | } else if (key.equalsIgnoreCase("7055ce2f8cb4f9405f") 438 | || key.equalsIgnoreCase("5bae9d8cdea32760ae") 439 | || key.equalsIgnoreCase("f3264994d9ea6bc595") 440 | || key.equalsIgnoreCase("b9930cef009d3a7865") 441 | || key.equalsIgnoreCase("62bd6a5f95aa67998e") 442 | || key.equalsIgnoreCase("a1c536c35904e64584") 443 | || key.equalsIgnoreCase("d6e5590ecc05edd9b3") 444 | || key.equalsIgnoreCase("8fbe36ce2726458b18") 445 | || key.equalsIgnoreCase("042a8352caf1188945") 446 | || key.equalsIgnoreCase("9d26d5088770221c3c") 447 | || key.equalsIgnoreCase("e19b2a01905e4129bf") 448 | || key.equalsIgnoreCase("68ebe4c9d792f31057") 449 | || key.equalsIgnoreCase("4e4beb8a43e9feb9c7") 450 | || key.equalsIgnoreCase("d04d85b44b306fc9ec") 451 | || key.equalsIgnoreCase("2b5d21a38c9452e342") 452 | || key.equalsIgnoreCase("88cb89c26a813bce44") 453 | || key.equalsIgnoreCase("76c9ee78c8ab124054") 454 | || key.equalsIgnoreCase("729db7c98163ac7d3d") 455 | || key.equalsIgnoreCase("7c1d4761993c412472") 456 | || key.equalsIgnoreCase("08bc0b7ec91cd0f4aa") 457 | || key.equalsIgnoreCase("25bafae175decaedcc") 458 | || key.equalsIgnoreCase("3181aae6822ef90ccd") 459 | || key.equalsIgnoreCase("d7a8fe9dc9dc919f87") 460 | || key.equalsIgnoreCase("728dae81d9d22aca03") 461 | || key.equalsIgnoreCase("119a9b593348fa3e74") 462 | || key.equalsIgnoreCase("04ab87c8d69667878e") 463 | || key.equalsIgnoreCase("4b282d851ebd87a7bb") 464 | || key.equalsIgnoreCase("ed526255313b756e42") 465 | || key.equalsIgnoreCase("ed5ab211362ab25ca7") 466 | || key.equalsIgnoreCase("18f4789a3df48f3b15") 467 | || key.equalsIgnoreCase("67549e44b1c8d8d857") 468 | || key.equalsIgnoreCase("4593c6c54227c4f17d") 469 | || key.equalsIgnoreCase("1c59db29042e7df8ef") 470 | || key.equalsIgnoreCase("a647e3dd42ce9b409b") 471 | || key.equalsIgnoreCase("7e06d6a70b82858113") 472 | || key.equalsIgnoreCase("ef4b5a48595197a373") 473 | || key.equalsIgnoreCase("0ac55f6bebd0330640") 474 | || key.equalsIgnoreCase("1beda9831c78994f43") 475 | || key.equalsIgnoreCase("8a2b9debb15766bff9") 476 | || key.equalsIgnoreCase("da0e7561b10d974216") 477 | || key.equalsIgnoreCase("86257b04b8c303fd9a") 478 | || key.equalsIgnoreCase("a4036b2761c9583fda") 479 | || key.equalsIgnoreCase("18e69f6d5bc820d4d3")) { 480 | throw new SerialException(a((int) g)); 481 | } else { 482 | long parseLong = (Long.parseLong(key.substring(h, 10), 16) << 32) 483 | | Long.parseLong(key.substring(10, 18), 16); 484 | int parseInt = Integer.parseInt(key.substring(0, h), 16); 485 | d(k); 486 | parseLong = c(parseLong); 487 | int tempParseLong = b(parseLong); 488 | if (tempParseLong != parseInt) { 489 | throw new SerialException(a((int) g)); 490 | } 491 | this.e = (int) (((parseLong << 32) >>> 32) >>> 24); 492 | if (this.e == g) { 493 | this.f = g; 494 | } else if (this.e == i) { 495 | this.f = (int) ((((parseLong << 32) >>> 32) >>> 16) & 255); 496 | if (!(this.f == g || this.f == h || this.f == i)) { 497 | throw new SerialException(a((int) g)); 498 | } 499 | } else if (this.e > i) { 500 | this.f = (int) ((((parseLong << 32) >>> 32) >>> 16) & 255); 501 | } else { 502 | throw new SerialException(a((int) g)); 503 | } 504 | d(j); 505 | try { 506 | byte[] bytes = username.getBytes("UTF-8"); 507 | int length = bytes.length; 508 | parseInt = length + 4; 509 | if (parseInt % 8 != 0) { 510 | parseInt += 8 - (parseInt % 8); 511 | } 512 | byte[] bArr = new byte[parseInt]; 513 | System.arraycopy(bytes, 0, bArr, 4, length); 514 | bArr[0] = (byte) (length >> 24); 515 | bArr[g] = (byte) (length >> 16); 516 | bArr[h] = (byte) (length >> 8); 517 | bArr[i] = (byte) length; 518 | byte[] c = c(bArr); 519 | parseInt = 0; 520 | while (i < c.length) { 521 | parseInt ^= c[i]; 522 | parseInt = (parseInt >>> 29) | (parseInt << i); 523 | i += g; 524 | } 525 | long ret = ((((long) (((int) (parseLong >> 32)) ^ parseInt)) << 32) >>> 32) 526 | | -6517524747541020672L; 527 | 528 | System.out.println("hash " + username + "|" + key + "\t-->" + ret); 529 | return ret; 530 | } catch (UnsupportedEncodingException e) { 531 | return -1; 532 | } 533 | } 534 | } 535 | 536 | private boolean c() { 537 | System.out.println("boolean c()"); 538 | return true; 539 | // return this.c; 540 | } 541 | 542 | private byte[] c(byte[] bArr) { 543 | System.out.println("byte[] c(byte[] bArr) "); 544 | byte[] bArr2 = new byte[bArr.length]; 545 | int length = bArr.length; 546 | long j = 0; 547 | int i = 0; 548 | for (int i2 = 0; i2 < length; i2 += g) { 549 | j = (j << 8) | ((long) (bArr[i2] & 255)); 550 | i += g; 551 | if (i == 8) { 552 | j = c(j); 553 | bArr2[i2 - 7] = (byte) ((int) (j >>> 56)); 554 | bArr2[i2 - 6] = (byte) ((int) (j >>> 48)); 555 | bArr2[i2 - 5] = (byte) ((int) (j >>> 40)); 556 | bArr2[i2 - 4] = (byte) ((int) (j >>> o)); 557 | bArr2[i2 - 3] = (byte) ((int) (j >>> 24)); 558 | bArr2[i2 - 2] = (byte) ((int) (j >>> 16)); 559 | bArr2[i2 - 1] = (byte) ((int) (j >>> 8)); 560 | bArr2[i2] = (byte) ((int) j); 561 | j = 0; 562 | i = 0; 563 | } 564 | } 565 | return bArr2; 566 | } 567 | 568 | private String d() { 569 | switch (this.f) { 570 | case g /* 1 */: 571 | return this.d; 572 | case h /* 2 */: 573 | return this.d + " - Site License"; 574 | case i /* 3 */: 575 | return this.d + " - Multi-Site License"; 576 | default: 577 | return this.d; 578 | } 579 | } 580 | 581 | private void d(long input) { 582 | int i = (int) input;//j的前4Byte 583 | int i2 = (int) (input >>> o);//j的后4Byte 584 | int i3 = p;//固定的ap 585 | i3 = (i3 >>> 29) | (i3 << i); 586 | this.P = i3; 587 | 588 | i += i3; 589 | int i4 = i3 & 31; 590 | i = (i >>> (32 - i4)) | (i << i4); 591 | i3 = (i3 + i) + q; 592 | i3 = (i3 >>> 29) | (i3 << i); 593 | this.Q = i3; 594 | 595 | 596 | i2 += i3 + i; 597 | i4 = (i3 + i) & 31; 598 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 599 | i3 = (i3 + i2) + r; 600 | i3 = (i3 >>> 29) | (i3 << i); 601 | this.R = i3; 602 | 603 | i += i3 + i2; 604 | i4 = (i3 + i2) & 31; 605 | i = (i >>> (32 - i4)) | (i << i4); 606 | i3 = (i3 + i) + s; 607 | i3 = (i3 >>> 29) | (i3 << i); 608 | this.S = i3; 609 | i2 += i3 + i; 610 | i4 = (i3 + i) & 31; 611 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 612 | i3 = (i3 + i2) + t; 613 | i3 = (i3 >>> 29) | (i3 << i); 614 | this.T = i3; 615 | i += i3 + i2; 616 | i4 = (i3 + i2) & 31; 617 | i = (i >>> (32 - i4)) | (i << i4); 618 | i3 = (i3 + i) + u; 619 | i3 = (i3 >>> 29) | (i3 << i); 620 | this.U = i3; 621 | i2 += i3 + i; 622 | i4 = (i3 + i) & 31; 623 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 624 | i3 = (i3 + i2) + v; 625 | i3 = (i3 >>> 29) | (i3 << i); 626 | this.V = i3; 627 | i += i3 + i2; 628 | i4 = (i3 + i2) & 31; 629 | i = (i >>> (32 - i4)) | (i << i4); 630 | i3 = (i3 + i) + w; 631 | i3 = (i3 >>> 29) | (i3 << i); 632 | this.W = i3; 633 | i2 += i3 + i; 634 | i4 = (i3 + i) & 31; 635 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 636 | i3 = (i3 + i2) + x; 637 | i3 = (i3 >>> 29) | (i3 << i); 638 | this.X = i3; 639 | i += i3 + i2; 640 | i4 = (i3 + i2) & 31; 641 | i = (i >>> (32 - i4)) | (i << i4); 642 | i3 = (i3 + i) + y; 643 | i3 = (i3 >>> 29) | (i3 << i); 644 | this.Y = i3; 645 | i2 += i3 + i; 646 | i4 = (i3 + i) & 31; 647 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 648 | i3 = (i3 + i2) + z; 649 | i3 = (i3 >>> 29) | (i3 << i); 650 | this.Z = i3; 651 | i += i3 + i2; 652 | i4 = (i3 + i2) & 31; 653 | i = (i >>> (32 - i4)) | (i << i4); 654 | i3 = (i3 + i) + A; 655 | i3 = (i3 >>> 29) | (i3 << i); 656 | this.aa = i3; 657 | i2 += i3 + i; 658 | i4 = (i3 + i) & 31; 659 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 660 | i3 = (i3 + i2) + B; 661 | i3 = (i3 >>> 29) | (i3 << i); 662 | this.ab = i3; 663 | i += i3 + i2; 664 | i4 = (i3 + i2) & 31; 665 | i = (i >>> (32 - i4)) | (i << i4); 666 | i3 = (i3 + i) + C; 667 | i3 = (i3 >>> 29) | (i3 << i); 668 | this.ac = i3; 669 | i2 += i3 + i; 670 | i4 = (i3 + i) & 31; 671 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 672 | i3 = (i3 + i2) + D; 673 | i3 = (i3 >>> 29) | (i3 << i); 674 | this.ad = i3; 675 | i += i3 + i2; 676 | i4 = (i3 + i2) & 31; 677 | i = (i >>> (32 - i4)) | (i << i4); 678 | i3 = (i3 + i) + E; 679 | i3 = (i3 >>> 29) | (i3 << i); 680 | this.ae = i3; 681 | i2 += i3 + i; 682 | i4 = (i3 + i) & 31; 683 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 684 | i3 = (i3 + i2) + F; 685 | i3 = (i3 >>> 29) | (i3 << i); 686 | this.af = i3; 687 | i += i3 + i2; 688 | i4 = (i3 + i2) & 31; 689 | i = (i >>> (32 - i4)) | (i << i4); 690 | i3 = (i3 + i) + G; 691 | i3 = (i3 >>> 29) | (i3 << i); 692 | this.ag = i3; 693 | i2 += i3 + i; 694 | i4 = (i3 + i) & 31; 695 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 696 | i3 = (i3 + i2) + H; 697 | i3 = (i3 >>> 29) | (i3 << i); 698 | this.ah = i3; 699 | i += i3 + i2; 700 | i4 = (i3 + i2) & 31; 701 | i = (i >>> (32 - i4)) | (i << i4); 702 | i3 = (i3 + i) + I; 703 | i3 = (i3 >>> 29) | (i3 << i); 704 | this.ai = i3; 705 | i2 += i3 + i; 706 | i4 = (i3 + i) & 31; 707 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 708 | i3 = (i3 + i2) + J; 709 | i3 = (i3 >>> 29) | (i3 << i); 710 | this.aj = i3; 711 | i += i3 + i2; 712 | i4 = (i3 + i2) & 31; 713 | i = (i >>> (32 - i4)) | (i << i4); 714 | i3 = (i3 + i) + K; 715 | i3 = (i3 >>> 29) | (i3 << i); 716 | this.ak = i3; 717 | i2 += i3 + i; 718 | i4 = (i3 + i) & 31; 719 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 720 | i3 = (i3 + i2) + L; 721 | i3 = (i3 >>> 29) | (i3 << i); 722 | this.al = i3; 723 | i += i3 + i2; 724 | i4 = (i3 + i2) & 31; 725 | i = (i >>> (32 - i4)) | (i << i4); 726 | i3 = (i3 + i) + M; 727 | i3 = (i3 >>> 29) | (i3 << i); 728 | this.am = i3; 729 | i2 += i3 + i; 730 | i4 = (i3 + i) & 31; 731 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 732 | i3 = (i3 + i2) + N; 733 | i3 = (i3 >>> 29) | (i3 << i); 734 | this.an = i3; 735 | i += i3 + i2; 736 | i4 = (i3 + i2) & 31; 737 | i = (i >>> (32 - i4)) | (i << i4); 738 | i3 = (i3 + i) + O; 739 | i3 = (i3 >>> 29) | (i3 << i); 740 | this.ao = i3; 741 | i2 += i3 + i; 742 | i4 = (i3 + i) & 31; 743 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 744 | i3 = (i3 + i2) + this.P; 745 | i3 = (i3 >>> 29) | (i3 << i); 746 | this.P = i3; 747 | i += i3 + i2; 748 | i4 = (i3 + i2) & 31; 749 | i = (i >>> (32 - i4)) | (i << i4); 750 | i3 = (i3 + i) + this.Q; 751 | i3 = (i3 >>> 29) | (i3 << i); 752 | this.Q = i3; 753 | i2 += i3 + i; 754 | i4 = (i3 + i) & 31; 755 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 756 | i3 = (i3 + i2) + this.R; 757 | i3 = (i3 >>> 29) | (i3 << i); 758 | this.R = i3; 759 | i += i3 + i2; 760 | i4 = (i3 + i2) & 31; 761 | i = (i >>> (32 - i4)) | (i << i4); 762 | i3 = (i3 + i) + this.S; 763 | i3 = (i3 >>> 29) | (i3 << i); 764 | this.S = i3; 765 | i2 += i3 + i; 766 | i4 = (i3 + i) & 31; 767 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 768 | i3 = (i3 + i2) + this.T; 769 | i3 = (i3 >>> 29) | (i3 << i); 770 | this.T = i3; 771 | i += i3 + i2; 772 | i4 = (i3 + i2) & 31; 773 | i = (i >>> (32 - i4)) | (i << i4); 774 | i3 = (i3 + i) + this.U; 775 | i3 = (i3 >>> 29) | (i3 << i); 776 | this.U = i3; 777 | i2 += i3 + i; 778 | i4 = (i3 + i) & 31; 779 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 780 | i3 = (i3 + i2) + this.V; 781 | i3 = (i3 >>> 29) | (i3 << i); 782 | this.V = i3; 783 | i += i3 + i2; 784 | i4 = (i3 + i2) & 31; 785 | i = (i >>> (32 - i4)) | (i << i4); 786 | i3 = (i3 + i) + this.W; 787 | i3 = (i3 >>> 29) | (i3 << i); 788 | this.W = i3; 789 | i2 += i3 + i; 790 | i4 = (i3 + i) & 31; 791 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 792 | i3 = (i3 + i2) + this.X; 793 | i3 = (i3 >>> 29) | (i3 << i); 794 | this.X = i3; 795 | i += i3 + i2; 796 | i4 = (i3 + i2) & 31; 797 | i = (i >>> (32 - i4)) | (i << i4); 798 | i3 = (i3 + i) + this.Y; 799 | i3 = (i3 >>> 29) | (i3 << i); 800 | this.Y = i3; 801 | i2 += i3 + i; 802 | i4 = (i3 + i) & 31; 803 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 804 | i3 = (i3 + i2) + this.Z; 805 | i3 = (i3 >>> 29) | (i3 << i); 806 | this.Z = i3; 807 | i += i3 + i2; 808 | i4 = (i3 + i2) & 31; 809 | i = (i >>> (32 - i4)) | (i << i4); 810 | i3 = (i3 + i) + this.aa; 811 | i3 = (i3 >>> 29) | (i3 << i); 812 | this.aa = i3; 813 | i2 += i3 + i; 814 | i4 = (i3 + i) & 31; 815 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 816 | i3 = (i3 + i2) + this.ab; 817 | i3 = (i3 >>> 29) | (i3 << i); 818 | this.ab = i3; 819 | i += i3 + i2; 820 | i4 = (i3 + i2) & 31; 821 | i = (i >>> (32 - i4)) | (i << i4); 822 | i3 = (i3 + i) + this.ac; 823 | i3 = (i3 >>> 29) | (i3 << i); 824 | this.ac = i3; 825 | i2 += i3 + i; 826 | i4 = (i3 + i) & 31; 827 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 828 | i3 = (i3 + i2) + this.ad; 829 | i3 = (i3 >>> 29) | (i3 << i); 830 | this.ad = i3; 831 | i += i3 + i2; 832 | i4 = (i3 + i2) & 31; 833 | i = (i >>> (32 - i4)) | (i << i4); 834 | i3 = (i3 + i) + this.ae; 835 | i3 = (i3 >>> 29) | (i3 << i); 836 | this.ae = i3; 837 | i2 += i3 + i; 838 | i4 = (i3 + i) & 31; 839 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 840 | i3 = (i3 + i2) + this.af; 841 | i3 = (i3 >>> 29) | (i3 << i); 842 | this.af = i3; 843 | i += i3 + i2; 844 | i4 = (i3 + i2) & 31; 845 | i = (i >>> (32 - i4)) | (i << i4); 846 | i3 = (i3 + i) + this.ag; 847 | i3 = (i3 >>> 29) | (i3 << i); 848 | this.ag = i3; 849 | i2 += i3 + i; 850 | i4 = (i3 + i) & 31; 851 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 852 | i3 = (i3 + i2) + this.ah; 853 | i3 = (i3 >>> 29) | (i3 << i); 854 | this.ah = i3; 855 | i += i3 + i2; 856 | i4 = (i3 + i2) & 31; 857 | i = (i >>> (32 - i4)) | (i << i4); 858 | i3 = (i3 + i) + this.ai; 859 | i3 = (i3 >>> 29) | (i3 << i); 860 | this.ai = i3; 861 | i2 += i3 + i; 862 | i4 = (i3 + i) & 31; 863 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 864 | i3 = (i3 + i2) + this.aj; 865 | i3 = (i3 >>> 29) | (i3 << i); 866 | this.aj = i3; 867 | i += i3 + i2; 868 | i4 = (i3 + i2) & 31; 869 | i = (i >>> (32 - i4)) | (i << i4); 870 | i3 = (i3 + i) + this.ak; 871 | i3 = (i3 >>> 29) | (i3 << i); 872 | this.ak = i3; 873 | i2 += i3 + i; 874 | i4 = (i3 + i) & 31; 875 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 876 | i3 = (i3 + i2) + this.al; 877 | i3 = (i3 >>> 29) | (i3 << i); 878 | this.al = i3; 879 | i += i3 + i2; 880 | i4 = (i3 + i2) & 31; 881 | i = (i >>> (32 - i4)) | (i << i4); 882 | i3 = (i3 + i) + this.am; 883 | i3 = (i3 >>> 29) | (i3 << i); 884 | this.am = i3; 885 | i2 += i3 + i; 886 | i4 = (i3 + i) & 31; 887 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 888 | i3 = (i3 + i2) + this.an; 889 | i3 = (i3 >>> 29) | (i3 << i); 890 | this.an = i3; 891 | i += i3 + i2; 892 | i4 = (i3 + i2) & 31; 893 | i = (i >>> (32 - i4)) | (i << i4); 894 | i3 = (i3 + i) + this.ao; 895 | i3 = (i3 >>> 29) | (i3 << i); 896 | this.ao = i3; 897 | i2 += i3 + i; 898 | i4 = (i3 + i) & 31; 899 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 900 | i3 = (i3 + i2) + this.P; 901 | i3 = (i3 >>> 29) | (i3 << i); 902 | this.P = i3; 903 | i += i3 + i2; 904 | i4 = (i3 + i2) & 31; 905 | i = (i >>> (32 - i4)) | (i << i4); 906 | i3 = (i3 + i) + this.Q; 907 | i3 = (i3 >>> 29) | (i3 << i); 908 | this.Q = i3; 909 | i2 += i3 + i; 910 | i4 = (i3 + i) & 31; 911 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 912 | i3 = (i3 + i2) + this.R; 913 | i3 = (i3 >>> 29) | (i3 << i); 914 | this.R = i3; 915 | i += i3 + i2; 916 | i4 = (i3 + i2) & 31; 917 | i = (i >>> (32 - i4)) | (i << i4); 918 | i3 = (i3 + i) + this.S; 919 | i3 = (i3 >>> 29) | (i3 << i); 920 | this.S = i3; 921 | i2 += i3 + i; 922 | i4 = (i3 + i) & 31; 923 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 924 | i3 = (i3 + i2) + this.T; 925 | i3 = (i3 >>> 29) | (i3 << i); 926 | this.T = i3; 927 | i += i3 + i2; 928 | i4 = (i3 + i2) & 31; 929 | i = (i >>> (32 - i4)) | (i << i4); 930 | i3 = (i3 + i) + this.U; 931 | i3 = (i3 >>> 29) | (i3 << i); 932 | this.U = i3; 933 | i2 += i3 + i; 934 | i4 = (i3 + i) & 31; 935 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 936 | i3 = (i3 + i2) + this.V; 937 | i3 = (i3 >>> 29) | (i3 << i); 938 | this.V = i3; 939 | i += i3 + i2; 940 | i4 = (i3 + i2) & 31; 941 | i = (i >>> (32 - i4)) | (i << i4); 942 | i3 = (i3 + i) + this.W; 943 | i3 = (i3 >>> 29) | (i3 << i); 944 | this.W = i3; 945 | i2 += i3 + i; 946 | i4 = (i3 + i) & 31; 947 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 948 | i3 = (i3 + i2) + this.X; 949 | i3 = (i3 >>> 29) | (i3 << i); 950 | this.X = i3; 951 | i += i3 + i2; 952 | i4 = (i3 + i2) & 31; 953 | i = (i >>> (32 - i4)) | (i << i4); 954 | i3 = (i3 + i) + this.Y; 955 | i3 = (i3 >>> 29) | (i3 << i); 956 | this.Y = i3; 957 | i2 += i3 + i; 958 | i4 = (i3 + i) & 31; 959 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 960 | i3 = (i3 + i2) + this.Z; 961 | i3 = (i3 >>> 29) | (i3 << i); 962 | this.Z = i3; 963 | i += i3 + i2; 964 | i4 = (i3 + i2) & 31; 965 | i = (i >>> (32 - i4)) | (i << i4); 966 | i3 = (i3 + i) + this.aa; 967 | i3 = (i3 >>> 29) | (i3 << i); 968 | this.aa = i3; 969 | i2 += i3 + i; 970 | i4 = (i3 + i) & 31; 971 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 972 | i3 = (i3 + i2) + this.ab; 973 | i3 = (i3 >>> 29) | (i3 << i); 974 | this.ab = i3; 975 | i += i3 + i2; 976 | i4 = (i3 + i2) & 31; 977 | i = (i >>> (32 - i4)) | (i << i4); 978 | i3 = (i3 + i) + this.ac; 979 | i3 = (i3 >>> 29) | (i3 << i); 980 | this.ac = i3; 981 | i2 += i3 + i; 982 | i4 = (i3 + i) & 31; 983 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 984 | i3 = (i3 + i2) + this.ad; 985 | i3 = (i3 >>> 29) | (i3 << i); 986 | this.ad = i3; 987 | i += i3 + i2; 988 | i4 = (i3 + i2) & 31; 989 | i = (i >>> (32 - i4)) | (i << i4); 990 | i3 = (i3 + i) + this.ae; 991 | i3 = (i3 >>> 29) | (i3 << i); 992 | this.ae = i3; 993 | i2 += i3 + i; 994 | i4 = (i3 + i) & 31; 995 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 996 | i3 = (i3 + i2) + this.af; 997 | i3 = (i3 >>> 29) | (i3 << i); 998 | this.af = i3; 999 | i += i3 + i2; 1000 | i4 = (i3 + i2) & 31; 1001 | i = (i >>> (32 - i4)) | (i << i4); 1002 | i3 = (i3 + i) + this.ag; 1003 | i3 = (i3 >>> 29) | (i3 << i); 1004 | this.ag = i3; 1005 | i2 += i3 + i; 1006 | i4 = (i3 + i) & 31; 1007 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 1008 | i3 = (i3 + i2) + this.ah; 1009 | i3 = (i3 >>> 29) | (i3 << i); 1010 | this.ah = i3; 1011 | i += i3 + i2; 1012 | i4 = (i3 + i2) & 31; 1013 | i = (i >>> (32 - i4)) | (i << i4); 1014 | i3 = (i3 + i) + this.ai; 1015 | i3 = (i3 >>> 29) | (i3 << i); 1016 | this.ai = i3; 1017 | i2 += i3 + i; 1018 | i4 = (i3 + i) & 31; 1019 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 1020 | i3 = (i3 + i2) + this.aj; 1021 | i3 = (i3 >>> 29) | (i3 << i); 1022 | this.aj = i3; 1023 | i += i3 + i2; 1024 | i4 = (i3 + i2) & 31; 1025 | i = (i >>> (32 - i4)) | (i << i4); 1026 | i3 = (i3 + i) + this.ak; 1027 | i3 = (i3 >>> 29) | (i3 << i); 1028 | this.ak = i3; 1029 | i2 += i3 + i; 1030 | i4 = (i3 + i) & 31; 1031 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 1032 | i3 = (i3 + i2) + this.al; 1033 | i3 = (i3 >>> 29) | (i3 << i); 1034 | this.al = i3; 1035 | i += i3 + i2; 1036 | i4 = (i3 + i2) & 31; 1037 | i = (i >>> (32 - i4)) | (i << i4); 1038 | i3 = (i3 + i) + this.am; 1039 | i3 = (i3 >>> 29) | (i3 << i); 1040 | this.am = i3; 1041 | i2 += i3 + i; 1042 | i4 = (i3 + i) & 31; 1043 | i2 = (i2 >>> (32 - i4)) | (i2 << i4); 1044 | i3 = (i3 + i2) + this.an; 1045 | i3 = (i3 >>> 29) | (i3 << i); 1046 | this.an = i3; 1047 | i += i3 + i2; 1048 | i2 = (i2 + i3) & 31; 1049 | i = (((i >>> (32 - i2)) | (i << i2)) + i3) + this.ao; 1050 | this.ao = (i >>> 29) | (i << i); 1051 | } 1052 | 1053 | public static void main(String[] args) { 1054 | try { 1055 | System.out.println(new Licence("hello", "e5036b2761c9583fd1")); 1056 | } catch (SerialException e) { 1057 | e.printStackTrace(); 1058 | } 1059 | } 1060 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | {one line to give the program's name and a brief idea of what it does.} 635 | Copyright (C) {year} {name of author} 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | {project} Copyright (C) {year} {fullname} 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | 676 | --------------------------------------------------------------------------------