/client/src/Censor.java

https://github.com/gamerx/tgxn317 · Java · 978 lines · 917 code · 61 blank · 0 comment · 622 complexity · 479b0784abe3cbabc57ab62289610903 MD5 · raw file

  1. public final class Censor {
  2. private static int anInt606 = 9;
  3. private static boolean aBoolean607;
  4. private static int anInt608 = 748;
  5. private static int anInt609 = 201;
  6. private static boolean aBoolean610 = true;
  7. private static int anInt611;
  8. private static byte aByte612 = -117;
  9. private static int anInt613 = -575;
  10. private static boolean aBoolean614 = true;
  11. private static int anInt615 = -720;
  12. private static int anInt616 = -511;
  13. private static byte aByte617 = 4;
  14. private static int anInt618 = 8801;
  15. private static boolean aBoolean619 = true;
  16. private static int anIntArray620[];
  17. private static char aCharArrayArray621[][];
  18. private static byte aByteArrayArrayArray622[][][];
  19. private static char aCharArrayArray623[][];
  20. private static char aCharArrayArray624[][];
  21. private static int anIntArray625[];
  22. private static final String exceptions[] = {
  23. "cook", "cook's", "cooks", "seeks", "sheet", "woop", "woops", "faq", "noob", "noobs"
  24. };
  25. public static boolean aBoolean627;
  26. public static void loadConfig(Class44 class44) {
  27. Stream class30_sub2_sub2 = new Stream(class44.method571("fragmentsenc.txt", null));
  28. Stream class30_sub2_sub2_1 = new Stream(class44.method571("badenc.txt", null));
  29. Stream class30_sub2_sub2_2 = new Stream(class44.method571("domainenc.txt", null));
  30. Stream class30_sub2_sub2_3 = new Stream(class44.method571("tldlist.txt", null));
  31. readValues(class30_sub2_sub2, class30_sub2_sub2_1, class30_sub2_sub2_2, class30_sub2_sub2_3);
  32. }
  33. private static void readValues(Stream class30_sub2_sub2, Stream class30_sub2_sub2_1, Stream class30_sub2_sub2_2, Stream class30_sub2_sub2_3) {
  34. readBadEnc(class30_sub2_sub2_1);
  35. readDomainEnc(class30_sub2_sub2_2);
  36. readFragmentsEnc(class30_sub2_sub2);
  37. readTldList(class30_sub2_sub2_3);
  38. }
  39. private static void readTldList(Stream stream) {
  40. int i = stream.readDWord();
  41. aCharArrayArray624 = new char[i][];
  42. anIntArray625 = new int[i];
  43. for (int j = 0; j < i; j++) {
  44. anIntArray625[j] = stream.readUnsignedByte();
  45. char ac[] = new char[stream.readUnsignedByte()];
  46. for (int k = 0; k < ac.length; k++) {
  47. ac[k] = (char) stream.readUnsignedByte();
  48. }
  49. aCharArrayArray624[j] = ac;
  50. }
  51. }
  52. private static void readBadEnc(Stream stream) {
  53. int j = stream.readDWord();
  54. aCharArrayArray621 = new char[j][];
  55. aByteArrayArrayArray622 = new byte[j][][];
  56. method493(stream, aCharArrayArray621, aByteArrayArrayArray622);
  57. }
  58. private static void readDomainEnc(Stream stream) {
  59. int i = stream.readDWord();
  60. aCharArrayArray623 = new char[i][];
  61. method494(aCharArrayArray623, stream);
  62. return;
  63. }
  64. private static void readFragmentsEnc(Stream stream) {
  65. anIntArray620 = new int[stream.readDWord()];
  66. for (int i = 0; i < anIntArray620.length; i++) {
  67. anIntArray620[i] = stream.readUnsignedWord();
  68. }
  69. }
  70. private static void method493(Stream stream, char ac[][], byte abyte0[][][]) {
  71. for (int j = 0; j < ac.length; j++) {
  72. char ac1[] = new char[stream.readUnsignedByte()];
  73. for (int k = 0; k < ac1.length; k++) {
  74. ac1[k] = (char) stream.readUnsignedByte();
  75. }
  76. ac[j] = ac1;
  77. byte abyte1[][] = new byte[stream.readUnsignedByte()][2];
  78. for (int l = 0; l < abyte1.length; l++) {
  79. abyte1[l][0] = (byte) stream.readUnsignedByte();
  80. abyte1[l][1] = (byte) stream.readUnsignedByte();
  81. }
  82. if (abyte1.length > 0) {
  83. abyte0[j] = abyte1;
  84. }
  85. }
  86. }
  87. private static void method494(char ac[][], Stream stream) {
  88. for (int j = 0; j < ac.length; j++) {
  89. char ac1[] = new char[stream.readUnsignedByte()];
  90. for (int k = 0; k < ac1.length; k++) {
  91. ac1[k] = (char) stream.readUnsignedByte();
  92. }
  93. ac[j] = ac1;
  94. }
  95. }
  96. private static void method495(char ac[]) {
  97. int i = 0;
  98. for (int j = 0; j < ac.length; j++) {
  99. if (method496(ac[j])) {
  100. ac[i] = ac[j];
  101. } else {
  102. ac[i] = ' ';
  103. }
  104. if (i == 0 || ac[i] != ' ' || ac[i - 1] != ' ') {
  105. i++;
  106. }
  107. }
  108. for (int k = i; k < ac.length; k++) {
  109. ac[k] = ' ';
  110. }
  111. }
  112. private static boolean method496(char c) {
  113. return c >= ' ' && c <= '\177' || c == ' ' || c == '\n' || c == '\t' || c == '\243' || c == '\u20AC';
  114. }
  115. public static String doCensor(String s) {
  116. char ac[] = s.toCharArray();
  117. method495(ac);
  118. String s1 = (new String(ac)).trim();
  119. ac = s1.toLowerCase().toCharArray();
  120. String s2 = s1.toLowerCase();
  121. method505(ac);
  122. method500(ac);
  123. method501(ac);
  124. method514(ac);
  125. for (int j = 0; j < exceptions.length; j++) {
  126. for (int k = -1; (k = s2.indexOf(exceptions[j], k + 1)) != -1;) {
  127. char ac1[] = exceptions[j].toCharArray();
  128. System.arraycopy(ac1, 0, ac, k, ac1.length);
  129. }
  130. }
  131. method498(s1.toCharArray(), ac);
  132. method499(ac);
  133. return s;
  134. }
  135. private static void method498(char ac[], char ac1[]) {
  136. for (int j = 0; j < ac.length; j++) {
  137. if (ac1[j] != '*' && isUpperCaseLetter(ac[j])) {
  138. ac1[j] = ac[j];
  139. }
  140. }
  141. }
  142. private static void method499(char ac[]) {
  143. boolean flag = true;
  144. for (int j = 0; j < ac.length; j++) {
  145. char c = ac[j];
  146. if (isLetter(c)) {
  147. if (flag) {
  148. if (isLowerCaseLetter(c)) {
  149. flag = false;
  150. }
  151. } else if (isUpperCaseLetter(c)) {
  152. ac[j] = (char) ((c + 97) - 65);
  153. }
  154. } else {
  155. flag = true;
  156. }
  157. }
  158. }
  159. private static void method500(char ac[]) {
  160. for (int i = 0; i < 2; i++) {
  161. for (int j = aCharArrayArray621.length - 1; j >= 0; j--) {
  162. method509(aByteArrayArrayArray622[j], ac, aCharArrayArray621[j]);
  163. }
  164. }
  165. }
  166. private static void method501(char ac[]) {
  167. char ac1[] = (char[]) ac.clone();
  168. char ac2[] = {
  169. '(', 'a', ')'
  170. };
  171. method509(null, ac1, ac2);
  172. char ac3[] = (char[]) ac.clone();
  173. char ac4[] = {
  174. 'd', 'o', 't'
  175. };
  176. method509(null, ac3, ac4);
  177. for (int i = aCharArrayArray623.length - 1; i >= 0; i--) {
  178. method502(ac, aCharArrayArray623[i], ac3, ac1);
  179. }
  180. }
  181. private static void method502(char ac[], char ac1[], char ac2[], char ac3[]) {
  182. if (ac1.length > ac.length) {
  183. return;
  184. }
  185. boolean flag = true;
  186. int j;
  187. for (int k = 0; k <= ac.length - ac1.length; k += j) {
  188. int l = k;
  189. int i1 = 0;
  190. j = 1;
  191. while (l < ac.length) {
  192. int j1 = 0;
  193. char c = ac[l];
  194. char c1 = '\0';
  195. if (l + 1 < ac.length) {
  196. c1 = ac[l + 1];
  197. }
  198. if (i1 < ac1.length && (j1 = method511(c, ac1[i1], c1)) > 0) {
  199. l += j1;
  200. i1++;
  201. continue;
  202. }
  203. if (i1 == 0) {
  204. break;
  205. }
  206. if ((j1 = method511(c, ac1[i1 - 1], c1)) > 0) {
  207. l += j1;
  208. if (i1 == 1) {
  209. j++;
  210. }
  211. continue;
  212. }
  213. if (i1 >= ac1.length || !method517(c)) {
  214. break;
  215. }
  216. l++;
  217. }
  218. if (i1 >= ac1.length) {
  219. boolean flag1 = false;
  220. int k1 = method503(ac, ac3, k);
  221. int l1 = method504(ac2, l - 1, ac);
  222. if (k1 > 2 || l1 > 2) {
  223. flag1 = true;
  224. }
  225. if (flag1) {
  226. for (int i2 = k; i2 < l; i2++) {
  227. ac[i2] = '*';
  228. }
  229. }
  230. }
  231. }
  232. }
  233. private static int method503(char ac[], char ac1[], int j) {
  234. if (j == 0) {
  235. return 2;
  236. }
  237. for (int k = j - 1; k >= 0; k--) {
  238. if (!method517(ac[k])) {
  239. break;
  240. }
  241. if (ac[k] == '@') {
  242. return 3;
  243. }
  244. }
  245. int l = 0;
  246. for (int i1 = j - 1; i1 >= 0; i1--) {
  247. if (!method517(ac1[i1])) {
  248. break;
  249. }
  250. if (ac1[i1] == '*') {
  251. l++;
  252. }
  253. }
  254. if (l >= 3) {
  255. return 4;
  256. }
  257. return !method517(ac[j - 1]) ? 0 : 1;
  258. }
  259. private static int method504(char ac[], int i, char ac1[]) {
  260. if (i + 1 == ac1.length) {
  261. return 2;
  262. }
  263. for (int j = i + 1; j < ac1.length; j++) {
  264. if (!method517(ac1[j])) {
  265. break;
  266. }
  267. if (ac1[j] == '.' || ac1[j] == ',') {
  268. return 3;
  269. }
  270. }
  271. int k = 0;
  272. for (int l = i + 1; l < ac1.length; l++) {
  273. if (!method517(ac[l])) {
  274. break;
  275. }
  276. if (ac[l] == '*') {
  277. k++;
  278. }
  279. }
  280. if (k >= 3) {
  281. return 4;
  282. }
  283. return !method517(ac1[i + 1]) ? 0 : 1;
  284. }
  285. private static void method505(char ac[]) {
  286. char ac1[] = (char[]) ac.clone();
  287. char ac2[] = {
  288. 'd', 'o', 't'
  289. };
  290. method509(null, ac1, ac2);
  291. char ac3[] = (char[]) ac.clone();
  292. char ac4[] = {
  293. 's', 'l', 'a', 's', 'h'
  294. };
  295. method509(null, ac3, ac4);
  296. for (int i = 0; i < aCharArrayArray624.length; i++) {
  297. method506(ac3, aCharArrayArray624[i], anIntArray625[i], ac1, ac);
  298. }
  299. }
  300. private static void method506(char ac[], char ac1[], int i, char ac2[], char ac3[]) {
  301. if (ac1.length > ac3.length) {
  302. return;
  303. }
  304. boolean flag = true;
  305. int j;
  306. for (int k = 0; k <= ac3.length - ac1.length; k += j) {
  307. int l = k;
  308. int i1 = 0;
  309. j = 1;
  310. while (l < ac3.length) {
  311. int j1 = 0;
  312. char c = ac3[l];
  313. char c1 = '\0';
  314. if (l + 1 < ac3.length) {
  315. c1 = ac3[l + 1];
  316. }
  317. if (i1 < ac1.length && (j1 = method511(c, ac1[i1], c1)) > 0) {
  318. l += j1;
  319. i1++;
  320. continue;
  321. }
  322. if (i1 == 0) {
  323. break;
  324. }
  325. if ((j1 = method511(c, ac1[i1 - 1], c1)) > 0) {
  326. l += j1;
  327. if (i1 == 1) {
  328. j++;
  329. }
  330. continue;
  331. }
  332. if (i1 >= ac1.length || !method517(c)) {
  333. break;
  334. }
  335. l++;
  336. }
  337. if (i1 >= ac1.length) {
  338. boolean flag1 = false;
  339. int k1 = method507(ac3, k, ac2);
  340. int l1 = method508(ac3, ac, l - 1);
  341. if (i == 1 && k1 > 0 && l1 > 0) {
  342. flag1 = true;
  343. }
  344. if (i == 2 && (k1 > 2 && l1 > 0 || k1 > 0 && l1 > 2)) {
  345. flag1 = true;
  346. }
  347. if (i == 3 && k1 > 0 && l1 > 2) {
  348. flag1 = true;
  349. }
  350. boolean _tmp = i == 3 && k1 > 2 && l1 > 0;
  351. if (flag1) {
  352. int i2 = k;
  353. int j2 = l - 1;
  354. if (k1 > 2) {
  355. if (k1 == 4) {
  356. boolean flag2 = false;
  357. for (int l2 = i2 - 1; l2 >= 0; l2--) {
  358. if (flag2) {
  359. if (ac2[l2] != '*') {
  360. break;
  361. }
  362. i2 = l2;
  363. } else if (ac2[l2] == '*') {
  364. i2 = l2;
  365. flag2 = true;
  366. }
  367. }
  368. }
  369. boolean flag3 = false;
  370. for (int i3 = i2 - 1; i3 >= 0; i3--) {
  371. if (flag3) {
  372. if (method517(ac3[i3])) {
  373. break;
  374. }
  375. i2 = i3;
  376. } else if (!method517(ac3[i3])) {
  377. flag3 = true;
  378. i2 = i3;
  379. }
  380. }
  381. }
  382. if (l1 > 2) {
  383. if (l1 == 4) {
  384. boolean flag4 = false;
  385. for (int j3 = j2 + 1; j3 < ac3.length; j3++) {
  386. if (flag4) {
  387. if (ac[j3] != '*') {
  388. break;
  389. }
  390. j2 = j3;
  391. } else if (ac[j3] == '*') {
  392. j2 = j3;
  393. flag4 = true;
  394. }
  395. }
  396. }
  397. boolean flag5 = false;
  398. for (int k3 = j2 + 1; k3 < ac3.length; k3++) {
  399. if (flag5) {
  400. if (method517(ac3[k3])) {
  401. break;
  402. }
  403. j2 = k3;
  404. } else if (!method517(ac3[k3])) {
  405. flag5 = true;
  406. j2 = k3;
  407. }
  408. }
  409. }
  410. for (int k2 = i2; k2 <= j2; k2++) {
  411. ac3[k2] = '*';
  412. }
  413. }
  414. }
  415. }
  416. }
  417. private static int method507(char ac[], int j, char ac1[]) {
  418. if (j == 0) {
  419. return 2;
  420. }
  421. for (int k = j - 1; k >= 0; k--) {
  422. if (!method517(ac[k])) {
  423. break;
  424. }
  425. if (ac[k] == ',' || ac[k] == '.') {
  426. return 3;
  427. }
  428. }
  429. int l = 0;
  430. for (int i1 = j - 1; i1 >= 0; i1--) {
  431. if (!method517(ac1[i1])) {
  432. break;
  433. }
  434. if (ac1[i1] == '*') {
  435. l++;
  436. }
  437. }
  438. if (l >= 3) {
  439. return 4;
  440. }
  441. return !method517(ac[j - 1]) ? 0 : 1;
  442. }
  443. private static int method508(char ac[], char ac1[], int i) {
  444. if (i + 1 == ac.length) {
  445. return 2;
  446. }
  447. for (int j = i + 1; j < ac.length; j++) {
  448. if (!method517(ac[j])) {
  449. break;
  450. }
  451. if (ac[j] == '\\' || ac[j] == '/') {
  452. return 3;
  453. }
  454. }
  455. int k = 0;
  456. for (int l = i + 1; l < ac.length; l++) {
  457. if (!method517(ac1[l])) {
  458. break;
  459. }
  460. if (ac1[l] == '*') {
  461. k++;
  462. }
  463. }
  464. if (k >= 5) {
  465. return 4;
  466. }
  467. return !method517(ac[i + 1]) ? 0 : 1;
  468. }
  469. public static void method509(byte abyte0[][], char ac[], char ac1[]) {
  470. if (ac1.length > ac.length) {
  471. return;
  472. }
  473. boolean flag = true;
  474. int j;
  475. for (int k = 0; k <= ac.length - ac1.length; k += j) {
  476. int l = k;
  477. int i1 = 0;
  478. int j1 = 0;
  479. j = 1;
  480. boolean flag1 = false;
  481. boolean flag2 = false;
  482. boolean flag3 = false;
  483. while (l < ac.length && (!flag2 || !flag3)) {
  484. int k1 = 0;
  485. char c = ac[l];
  486. char c2 = '\0';
  487. if (l + 1 < ac.length) {
  488. c2 = ac[l + 1];
  489. }
  490. if (i1 < ac1.length && (k1 = method512(c2, c, ac1[i1])) > 0) {
  491. if (k1 == 1 && isDigit(c)) {
  492. flag2 = true;
  493. }
  494. if (k1 == 2 && (isDigit(c) || isDigit(c2))) {
  495. flag2 = true;
  496. }
  497. l += k1;
  498. i1++;
  499. continue;
  500. }
  501. if (i1 == 0) {
  502. break;
  503. }
  504. if ((k1 = method512(c2, c, ac1[i1 - 1])) > 0) {
  505. l += k1;
  506. if (i1 == 1) {
  507. j++;
  508. }
  509. continue;
  510. }
  511. if (i1 >= ac1.length || !method518(c)) {
  512. break;
  513. }
  514. if (method517(c) && c != '\'') {
  515. flag1 = true;
  516. }
  517. if (isDigit(c)) {
  518. flag3 = true;
  519. }
  520. l++;
  521. if ((++j1 * 100) / (l - k) > 90) {
  522. break;
  523. }
  524. }
  525. if (i1 >= ac1.length && (!flag2 || !flag3)) {
  526. boolean flag4 = true;
  527. if (!flag1) {
  528. char c1 = ' ';
  529. if (k - 1 >= 0) {
  530. c1 = ac[k - 1];
  531. }
  532. char c3 = ' ';
  533. if (l < ac.length) {
  534. c3 = ac[l];
  535. }
  536. byte byte0 = method513(c1);
  537. byte byte1 = method513(c3);
  538. if (abyte0 != null && method510(byte0, abyte0, byte1)) {
  539. flag4 = false;
  540. }
  541. } else {
  542. boolean flag5 = false;
  543. boolean flag6 = false;
  544. if (k - 1 < 0 || method517(ac[k - 1]) && ac[k - 1] != '\'') {
  545. flag5 = true;
  546. }
  547. if (l >= ac.length || method517(ac[l]) && ac[l] != '\'') {
  548. flag6 = true;
  549. }
  550. if (!flag5 || !flag6) {
  551. boolean flag7 = false;
  552. int k2 = k - 2;
  553. if (flag5) {
  554. k2 = k;
  555. }
  556. for (; !flag7 && k2 < l; k2++) {
  557. if (k2 >= 0 && (!method517(ac[k2]) || ac[k2] == '\'')) {
  558. char ac2[] = new char[3];
  559. int j3;
  560. for (j3 = 0; j3 < 3; j3++) {
  561. if (k2 + j3 >= ac.length || method517(ac[k2 + j3]) && ac[k2 + j3] != '\'') {
  562. break;
  563. }
  564. ac2[j3] = ac[k2 + j3];
  565. }
  566. boolean flag8 = true;
  567. if (j3 == 0) {
  568. flag8 = false;
  569. }
  570. if (j3 < 3 && k2 - 1 >= 0 && (!method517(ac[k2 - 1]) || ac[k2 - 1] == '\'')) {
  571. flag8 = false;
  572. }
  573. if (flag8 && !method523(ac2, (byte) 4)) {
  574. flag7 = true;
  575. }
  576. }
  577. }
  578. if (!flag7) {
  579. flag4 = false;
  580. }
  581. }
  582. }
  583. if (flag4) {
  584. int l1 = 0;
  585. int i2 = 0;
  586. int j2 = -1;
  587. for (int l2 = k; l2 < l; l2++) {
  588. if (isDigit(ac[l2])) {
  589. l1++;
  590. } else if (isLetter(ac[l2])) {
  591. i2++;
  592. j2 = l2;
  593. }
  594. }
  595. if (j2 > -1) {
  596. l1 -= l - 1 - j2;
  597. }
  598. if (l1 <= i2) {
  599. for (int i3 = k; i3 < l; i3++) {
  600. ac[i3] = '*';
  601. }
  602. } else {
  603. j = 1;
  604. }
  605. }
  606. }
  607. }
  608. }
  609. private static boolean method510(byte byte0, byte abyte0[][], byte byte2) {
  610. int i = 0;
  611. if (abyte0[i][0] == byte0 && abyte0[i][1] == byte2) {
  612. return true;
  613. }
  614. int j = abyte0.length - 1;
  615. if (abyte0[j][0] == byte0 && abyte0[j][1] == byte2) {
  616. return true;
  617. }
  618. do {
  619. int k = (i + j) / 2;
  620. if (abyte0[k][0] == byte0 && abyte0[k][1] == byte2) {
  621. return true;
  622. }
  623. if (byte0 < abyte0[k][0] || byte0 == abyte0[k][0] && byte2 < abyte0[k][1]) {
  624. j = k;
  625. } else {
  626. i = k;
  627. }
  628. } while (i != j && i + 1 != j);
  629. return false;
  630. }
  631. private static int method511(char c, char c1, char c2) {
  632. if (c1 == c) {
  633. return 1;
  634. }
  635. if (c1 == 'o' && c == '0') {
  636. return 1;
  637. }
  638. if (c1 == 'o' && c == '(' && c2 == ')') {
  639. return 2;
  640. }
  641. if (c1 == 'c' && (c == '(' || c == '<' || c == '[')) {
  642. return 1;
  643. }
  644. if (c1 == 'e' && c == '\u20AC') {
  645. return 1;
  646. }
  647. if (c1 == 's' && c == '$') {
  648. return 1;
  649. }
  650. return c1 != 'l' || c != 'i' ? 0 : 1;
  651. }
  652. private static int method512(char c, char c1, char c2) {
  653. if (c2 == c1) {
  654. return 1;
  655. }
  656. if (c2 >= 'a' && c2 <= 'm') {
  657. if (c2 == 'a') {
  658. if (c1 == '4' || c1 == '@' || c1 == '^') {
  659. return 1;
  660. }
  661. return c1 != '/' || c != '\\' ? 0 : 2;
  662. }
  663. if (c2 == 'b') {
  664. if (c1 == '6' || c1 == '8') {
  665. return 1;
  666. }
  667. return (c1 != '1' || c != '3') && (c1 != 'i' || c != '3') ? 0 : 2;
  668. }
  669. if (c2 == 'c') {
  670. return c1 != '(' && c1 != '<' && c1 != '{' && c1 != '[' ? 0 : 1;
  671. }
  672. if (c2 == 'd') {
  673. return (c1 != '[' || c != ')') && (c1 != 'i' || c != ')') ? 0 : 2;
  674. }
  675. if (c2 == 'e') {
  676. return c1 != '3' && c1 != '\u20AC' ? 0 : 1;
  677. }
  678. if (c2 == 'f') {
  679. if (c1 == 'p' && c == 'h') {
  680. return 2;
  681. }
  682. return c1 != '\243' ? 0 : 1;
  683. }
  684. if (c2 == 'g') {
  685. return c1 != '9' && c1 != '6' && c1 != 'q' ? 0 : 1;
  686. }
  687. if (c2 == 'h') {
  688. return c1 != '#' ? 0 : 1;
  689. }
  690. if (c2 == 'i') {
  691. return c1 != 'y' && c1 != 'l' && c1 != 'j' && c1 != '1' && c1 != '!' && c1 != ':' && c1 != ';' && c1 != '|' ? 0 : 1;
  692. }
  693. if (c2 == 'j') {
  694. return 0;
  695. }
  696. if (c2 == 'k') {
  697. return 0;
  698. }
  699. if (c2 == 'l') {
  700. return c1 != '1' && c1 != '|' && c1 != 'i' ? 0 : 1;
  701. }
  702. if (c2 == 'm') {
  703. return 0;
  704. }
  705. }
  706. if (c2 >= 'n' && c2 <= 'z') {
  707. if (c2 == 'n') {
  708. return 0;
  709. }
  710. if (c2 == 'o') {
  711. if (c1 == '0' || c1 == '*') {
  712. return 1;
  713. }
  714. return (c1 != '(' || c != ')') && (c1 != '[' || c != ']') && (c1 != '{' || c != '}') && (c1 != '<' || c != '>') ? 0 : 2;
  715. }
  716. if (c2 == 'p') {
  717. return 0;
  718. }
  719. if (c2 == 'q') {
  720. return 0;
  721. }
  722. if (c2 == 'r') {
  723. return 0;
  724. }
  725. if (c2 == 's') {
  726. return c1 != '5' && c1 != 'z' && c1 != '$' && c1 != '2' ? 0 : 1;
  727. }
  728. if (c2 == 't') {
  729. return c1 != '7' && c1 != '+' ? 0 : 1;
  730. }
  731. if (c2 == 'u') {
  732. if (c1 == 'v') {
  733. return 1;
  734. }
  735. return (c1 != '\\' || c != '/') && (c1 != '\\' || c != '|') && (c1 != '|' || c != '/') ? 0 : 2;
  736. }
  737. if (c2 == 'v') {
  738. return (c1 != '\\' || c != '/') && (c1 != '\\' || c != '|') && (c1 != '|' || c != '/') ? 0 : 2;
  739. }
  740. if (c2 == 'w') {
  741. return c1 != 'v' || c != 'v' ? 0 : 2;
  742. }
  743. if (c2 == 'x') {
  744. return (c1 != ')' || c != '(') && (c1 != '}' || c != '{') && (c1 != ']' || c != '[') && (c1 != '>' || c != '<') ? 0 : 2;
  745. }
  746. if (c2 == 'y') {
  747. return 0;
  748. }
  749. if (c2 == 'z') {
  750. return 0;
  751. }
  752. }
  753. if (c2 >= '0' && c2 <= '9') {
  754. if (c2 == '0') {
  755. if (c1 == 'o' || c1 == 'O') {
  756. return 1;
  757. }
  758. return (c1 != '(' || c != ')') && (c1 != '{' || c != '}') && (c1 != '[' || c != ']') ? 0 : 2;
  759. }
  760. if (c2 == '1') {
  761. return c1 != 'l' ? 0 : 1;
  762. } else {
  763. return 0;
  764. }
  765. }
  766. if (c2 == ',') {
  767. return c1 != '.' ? 0 : 1;
  768. }
  769. if (c2 == '.') {
  770. return c1 != ',' ? 0 : 1;
  771. }
  772. if (c2 == '!') {
  773. return c1 != 'i' ? 0 : 1;
  774. } else {
  775. return 0;
  776. }
  777. }
  778. private static byte method513(char c) {
  779. if (c >= 'a' && c <= 'z') {
  780. return (byte) ((c - 97) + 1);
  781. }
  782. if (c == '\'') {
  783. return 28;
  784. }
  785. if (c >= '0' && c <= '9') {
  786. return (byte) ((c - 48) + 29);
  787. } else {
  788. return 27;
  789. }
  790. }
  791. private static void method514(char ac[]) {
  792. int j = 0;
  793. int k = 0;
  794. int l = 0;
  795. int i1 = 0;
  796. while ((j = method515(ac, k)) != -1) {
  797. boolean flag = false;
  798. for (int j1 = k; j1 >= 0 && j1 < j && !flag; j1++) {
  799. if (!method517(ac[j1]) && !method518(ac[j1])) {
  800. flag = true;
  801. }
  802. }
  803. if (flag) {
  804. l = 0;
  805. }
  806. if (l == 0) {
  807. i1 = j;
  808. }
  809. k = method516(ac, j);
  810. int k1 = 0;
  811. for (int l1 = j; l1 < k; l1++) {
  812. k1 = (k1 * 10 + ac[l1]) - 48;
  813. }
  814. if (k1 > 255 || k - j > 8) {
  815. l = 0;
  816. } else {
  817. l++;
  818. }
  819. if (l == 4) {
  820. for (int i2 = i1; i2 < k; i2++) {
  821. ac[i2] = '*';
  822. }
  823. l = 0;
  824. }
  825. }
  826. }
  827. private static int method515(char ac[], int i) {
  828. for (int k = i; k < ac.length && k >= 0; k++) {
  829. if (ac[k] >= '0' && ac[k] <= '9') {
  830. return k;
  831. }
  832. }
  833. return -1;
  834. }
  835. private static int method516(char ac[], int j) {
  836. for (int k = j; k < ac.length && k >= 0; k++) {
  837. if (ac[k] < '0' || ac[k] > '9') {
  838. return k;
  839. }
  840. }
  841. return ac.length;
  842. }
  843. private static boolean method517(char c) {
  844. return !isLetter(c) && !isDigit(c);
  845. }
  846. private static boolean method518(char c) {
  847. if (c < 'a' || c > 'z') {
  848. return true;
  849. }
  850. return c == 'v' || c == 'x' || c == 'j' || c == 'q' || c == 'z';
  851. }
  852. private static boolean isLetter(char c) {
  853. return c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z';
  854. }
  855. private static boolean isDigit(char c) {
  856. return c >= '0' && c <= '9';
  857. }
  858. private static boolean isLowerCaseLetter(char c) {
  859. return c >= 'a' && c <= 'z';
  860. }
  861. private static boolean isUpperCaseLetter(char c) {
  862. return c >= 'A' && c <= 'Z';
  863. }
  864. private static boolean method523(char ac[], byte byte0) {
  865. if (byte0 == aByte617) {
  866. byte0 = 0;
  867. } else {
  868. throw new NullPointerException();
  869. }
  870. boolean flag = true;
  871. for (int i = 0; i < ac.length; i++) {
  872. if (!isDigit(ac[i]) && ac[i] != 0) {
  873. flag = false;
  874. }
  875. }
  876. if (flag) {
  877. return true;
  878. }
  879. int j = method524(ac);
  880. int k = 0;
  881. int l = anIntArray620.length - 1;
  882. if (j == anIntArray620[k] || j == anIntArray620[l]) {
  883. return true;
  884. }
  885. do {
  886. int i1 = (k + l) / 2;
  887. if (j == anIntArray620[i1]) {
  888. return true;
  889. }
  890. if (j < anIntArray620[i1]) {
  891. l = i1;
  892. } else {
  893. k = i1;
  894. }
  895. } while (k != l && k + 1 != l);
  896. return false;
  897. }
  898. public static int method524(char ac[]) {
  899. if (ac.length > 6) {
  900. return 0;
  901. }
  902. int k = 0;
  903. for (int l = 0; l < ac.length; l++) {
  904. char c = ac[ac.length - l - 1];
  905. if (c >= 'a' && c <= 'z') {
  906. k = k * 38 + ((c - 97) + 1);
  907. } else if (c == '\'') {
  908. k = k * 38 + 27;
  909. } else if (c >= '0' && c <= '9') {
  910. k = k * 38 + ((c - 48) + 28);
  911. } else if (c != 0) {
  912. return 0;
  913. }
  914. }
  915. return k;
  916. }
  917. }