Writeup - Rex的狗(zhe)年(xue)寻宝!

善良单纯的小阿板
创建时间: 2018年2月16日 庆丰五年
最后编辑: 2018年2月16日 6 年前
## 第一题

https://red-packet.rexskz.info/2018/?s=the_first_level

年初一刚醒,躺着腻歪了一会就看到了 Rex 开张了今年的红包寻宝,一个激灵趴下来开日。

第一题的话

const encrypted = 'gard dna kcilc';
const decrypted = reverse(encrypted);
const { id } = new ComicCollection('xkcd').findComicByName(decrypted);
const delta = 0x3E7986;
const t = '0' + (delta + id * id);
if (/^\d{8}$/.test(t)) {
    // 答案就是 ans 的值
    const ans = t + '_reversed';
} else {
    console.log('error!');
}

emmmmm 据说 ComicCollection 是ES9当中的标准,现在还在草案阶段,这可怎么办呢,一直在思考,xkcd 是个什么哲学的玩意呢?输入法也拼不出来,拖拽搜索,wikipedia 得到结果 https://zh.wikipedia.org/zh-cn/Xkcd

果真还是哲学啊。看到密文gard dna kcilc,我的第一反应是做了所有的凯撒位移,但是没有结果,然后 wikipedia 有这么一句

第1110幅漫画颠覆了我们平常对漫画的理解——这个世界很大(165,888 x 79,872 像素),创造出了人类历史上尺寸最大的漫画。

https://xkcd.com/1110/ 跟进去一看,漫画标题是 Click and Drag,OK应该就是他了。则 id = 1110,console中可以直接解得

t = 05326442

但是我输进支付宝的时候,竟然显示失败?去年我就是这个样子....今年以为是大师傅都是光速日题的,已经被抢光了.....

05326442_reversed 替换 url 当中的 S,进入下一题。

第二题

https://red-packet.rexskz.info/2018/?s=05326442_reversed

const encrypted = `
54 68 65 20 61 6E 73 77 65 72 20 74 6F 20 6C 69
66 65 2C 20 74 68 65 20 75 6E 69 76 65 72 73 65
20 61 6E 64 20 65 76 65 72 79 74 68 69 6E 67 0A
`;
const decrypted = decrypt(encrypted);
if (/^\d+$/.test(decrypted)) {
    // 答案就是 ans 的值
    const ans = '' + (155902 + Math.exp(decrypted) % 1e6) + decrypted + '_bins';
} else {
    console.log('error!');
}

一堆十六进制数据的话,让人有很强的转换成可见字符的欲望

于是写js

const encrypted = `54 68 65 20 61 6E 73 77 65 72 20 74 6F 20 6C 69 66 65 2C 20 74 68 65 20 75 6E 69 76 65 72 73 65 20 61 6E 64 20 65 76 65 72 79 74 68 69 6E 67 0A`;
const split = encrypted.split(' ');
re = ''
for(key in split){
    re += String.fromCharCode(parseInt(split[key],16))
}
console.log(re)

得到

The answer to life, the universe and everything

哈,我们得到了一个哲学的42,得到

ans = 65689442_bins

第三题

https://red-packet.rexskz.info/2018/?s=65689442_bins

const t1 = '5L2b5puw77ya572w6IiN5YOn5oGQ5ZOG6ICo6Kuz5rOi5omA6YGT572w6Kum576v5qWe6YO96Yav5L+x5Yip5ZOG6LGG5ryr5Yud6Kuz5b6X5LuW572w5a+r5L6E44CC6Ky555yf5a6k5L2b5b6X5aWi5rOi5ZKS5oCb6ICF6Jed5LuW57y95b2M5L6d5a+m5bqm55qk5YiH5Yal5LiJ5ZOG6JiH5aSa5LiW5ZCJ57y96Jap5amG5amG572w6YO96Ium5rOi5oCv5Yip';
const decrypted1 = decode1(t1);
const t2 = '70352f41061eda4ff3c322094af068ba70c3b38b';
const decrypted2 = decode2(t2);
const t3 = '圆周率小数点后第一次出现 12345678 的位置';
const decrypted3 = decode3(t3);
const t4 = ' ゚ω゚ノ= /`m´)ノ ~┻━┻   //*´∇`*/ ['_']; o=(゚ー゚)  =_=3; c=(゚Θ゚) =(゚ー゚)-(゚ー゚); (゚Д゚) =(゚Θ゚)= (o^_^o)/ (o^_^o);(゚Д゚)={゚Θ゚: '_' ,゚ω゚ノ : ((゚ω゚ノ==3) +'_') [゚Θ゚] ,゚ー゚ノ :(゚ω゚ノ+ '_')[o^_^o -(゚Θ゚)] ,゚Д゚ノ:((゚ー゚==3) +'_')[゚ー゚] }; (゚Д゚) [゚Θ゚] =((゚ω゚ノ==3) +'_') [c^_^o];(゚Д゚) ['c'] = ((゚Д゚)+'_') [ (゚ー゚)+(゚ー゚)-(゚Θ゚) ];(゚Д゚) ['o'] = ((゚Д゚)+'_') [゚Θ゚];(゚o゚)=(゚Д゚) ['c']+(゚Д゚) ['o']+(゚ω゚ノ +'_')[゚Θ゚]+ ((゚ω゚ノ==3) +'_') [゚ー゚] + ((゚Д゚) +'_') [(゚ー゚)+(゚ー゚)]+ ((゚ー゚==3) +'_') [゚Θ゚]+((゚ー゚==3) +'_') [(゚ー゚) - (゚Θ゚)]+(゚Д゚) ['c']+((゚Д゚)+'_') [(゚ー゚)+(゚ー゚)]+ (゚Д゚) ['o']+((゚ー゚==3) +'_') [゚Θ゚];(゚Д゚) ['_'] =(o^_^o) [゚o゚] [゚o゚];(゚ε゚)=((゚ー゚==3) +'_') [゚Θ゚]+ (゚Д゚) .゚Д゚ノ+((゚Д゚)+'_') [(゚ー゚) + (゚ー゚)]+((゚ー゚==3) +'_') [o^_^o -゚Θ゚]+((゚ー゚==3) +'_') [゚Θ゚]+ (゚ω゚ノ +'_') [゚Θ゚]; (゚ー゚)+=(゚Θ゚); (゚Д゚)[゚ε゚]='\\'; (゚Д゚).゚Θ゚ノ=(゚Д゚+ ゚ー゚)[o^_^o -(゚Θ゚)];(o゚ー゚o)=(゚ω゚ノ +'_')[c^_^o];(゚Д゚) [゚o゚]='\"';(゚Д゚) ['_'] ( (゚Д゚) ['_'] (゚ε゚+(゚Д゚)[゚o゚]+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) +(o^_^o))+ ((o^_^o) - (゚Θ゚))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ (゚ー゚)+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) +(o^_^o))+ (゚ー゚)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) +(o^_^o))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) +(o^_^o))+ ((o^_^o) - (゚Θ゚))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((゚ー゚) + (゚Θ゚))+ ((o^_^o) +(o^_^o))+ (゚Д゚)[゚ε゚]+(゚ー゚)+ (c^_^o)+ (゚Д゚)[゚ε゚]+((o^_^o) +(o^_^o))+ (゚Θ゚)+ (゚Д゚)[゚ε゚]+((o^_^o) +(o^_^o))+ (c^_^o)+ (゚Д゚)[゚ε゚]+((o^_^o) +(o^_^o))+ (c^_^o)+ (゚Д゚)[゚ε゚]+((゚ー゚) + (o^_^o))+ (o^_^o)+ (゚Д゚)[゚o゚]) (゚Θ゚)) ('_');';
const decrypted4 = decode4(t4);
// 答案就是 ans 的值
const ans = (+decrypted1) + (+decrypted2) + (+decrypted3) * Math.floor(1 / decrypted4) + '_wtf';

我不确定这些超长字符....会不会撑破我的页面....

看到这么可见字符和加好,确定t1是 base64 解得,decrypted1 = '佛曰:罰舍僧恐哆耨諳波所道罰諦羯楞都醯俱利哆豆漫勝諳得他罰寫侄。謹真室佛得奢波咒怛者藝他缽彌依實度皤切冥三哆蘇多世吉缽薩婆婆罰都苦波怯利'

t2的话,长度为40,拖拽 Google 之,发现是一个 SHA-1 ,值为00000000,有decrypted2 = 00000000

pi的第一次 12345678 的话,本来我是要在本机跑pi的,但是想到去年的套路,我果断的到 wikipedia 下边 外部链接 里看,发现 http://www.subidiom.com/pi/pi.asp

得到decrypted3 = 186557266,其实有真实值去自己搜索反而不好用,因为你怎么定义第几位呢?对吧

t4一看就知道是混效过的js,曲调分号和引号,console 就可以得到 decrypted4 = 100,不过强迫症拖到 VSCode 格式化看看还是很有美感的。

问题又来了,(+decrypted1)的结果是NaN,这就很难受了,于是又 Google 这段文字,发现http://blog.renren.com/share/234967251/14405030900 (该网页应该是已经被xss了,有弹出广告),给出解码器http://keyfc.laputachen.com/bbs/tools/tudoucode.aspx

但是无奈这个网站已经挂了,通过 url 我们发现这似乎是一种叫做tudoucode的加密方法,Google 之得到http://www.keyfc.net/bbs/tools/tudoucode.aspx

解密文字得到

佛祖保佑,永无 BUG!36464142

原来是菩萨的旨意,有decrypted1 = 36464142,得到

ans = 36464142_wtf

第四题

https://red-packet.rexskz.info/2018/?s=36464142_wtf

0 209 509 191 753 915 380 513 96 661 576 386 616 782 54 667 283 453 928 792 503 45 377 707 954 882 963 652 93 11 363 853 126 684 734 408 558 600 618 668 849 567 728 423 202 821 545 623 214 712
209 0 91 731 300 460 457 608 950 602 840 278 120 919 32 575 947 47 642 541 888 29 607 447 22 147 226 406 609 974 4 852 900 436 433 36 118 775 78 439 284 611 441 824 107 397 124 756 980 97
509 91 0 621 769 289 918 580 948 843 334 959 540 979 309 435 916 785 711 832 740 595 992 663 944 699 222 659 873 669 585 60 417 878 414 577 42 134 159 944 752 179 679 322 980 957 447 894 14 403
191 731 621 0 216 415 72 256 658 430 494 118 460 195 128 30 668 836 973 454 315 212 442 791 736 965 969 233 26 457 689 790 916 829 417 376 799 816 435 726 255 205 318 462 204 816 190 842 458 215
753 300 769 216 0 982 78 257 459 170 264 726 902 234 491 357 256 757 802 622 154 933 606 60 617 924 191 166 613 936 25 541 793 291 927 168 273 224 760 211 718 95 737 508 107 517 899 920 453 383
915 460 289 415 982 0 116 64 40 110 412 262 710 109 894 354 44 140 566 853 381 659 281 834 74 526 332 622 631 542 42 85 503 331 918 663 689 525 783 268 378 396 132 994 974 764 37 68 31 486
380 457 918 72 78 116 0 380 849 242 962 67 570 568 744 362 159 198 114 940 303 373 129 996 657 116 851 460 685 483 625 184 453 142 615 866 202 730 539 431 735 352 163 622 753 500 23 235 793 684
513 608 580 256 257 64 380 0 191 460 129 384 144 129 611 904 502 661 925 772 770 253 458 204 413 231 338 740 199 549 568 519 312 152 780 889 172 258 954 185 231 178 413 890 898 397 45 383 274 425
96 950 948 658 459 40 849 191 0 525 21 73 170 495 434 588 141 728 855 192 180 697 862 343 781 900 383 943 149 174 877 5 860 198 86 154 215 501 337 16 465 529 91 909 243 171 305 18 107 312
661 602 843 430 170 110 242 460 525 0 895 107 448 198 204 471 123 669 811 448 338 337 940 373 456 60 168 651 659 168 527 61 514 852 490 647 97 464 312 828 935 975 746 825 994 38 313 551 534 903
576 840 334 494 264 412 962 129 21 895 0 585 73 440 513 472 289 134 913 784 171 786 503 811 77 967 615 72 11 100 94 46 358 816 720 402 38 682 706 634 190 898 924 888 161 896 667 314 166 262
386 278 959 118 726 262 67 384 73 107 585 0 363 965 145 69 345 150 641 167 814 200 891 687 924 518 910 794 889 675 397 451 312 875 139 547 914 271 419 406 903 940 25 676 160 229 502 782 392 531
616 120 540 460 902 710 570 144 170 448 73 363 0 924 127 318 988 339 636 904 483 577 887 815 868 134 285 342 602 179 627 810 325 588 429 526 682 104 972 434 285 529 266 252 312 348 655 686 335 636
782 919 979 195 234 109 568 129 495 198 440 965 924 0 10 670 786 156 264 712 65 527 67 417 911 976 846 808 14 111 769 25 384 53 161 543 976 193 705 626 484 589 203 357 379 258 406 296 832 848
54 32 309 128 491 894 744 611 434 204 513 145 127 10 0 510 472 12 446 809 647 867 177 320 921 283 162 314 314 565 576 573 885 938 392 866 382 554 974 480 217 296 39 744 185 495 789 62 674 964
667 575 435 30 357 354 362 904 588 471 472 69 318 670 510 0 998 622 35 967 289 731 546 296 73 268 345 309 748 781 739 386 63 441 878 346 72 421 395 160 795 453 684 650 824 609 562 251 111 350
283 947 916 668 256 44 159 502 141 123 289 345 988 786 472 998 0 103 49 37 687 260 441 876 606 433 165 70 356 126 686 764 500 901 140 585 418 400 45 734 731 493 672 999 995 18 630 822 606 97
453 47 785 836 757 140 198 661 728 669 134 150 339 156 12 622 103 0 282 963 500 170 782 182 294 360 32 599 122 879 357 259 496 97 319 586 640 730 96 848 781 324 159 642 768 645 897 817 554 207
928 642 711 973 802 566 114 925 855 811 913 641 636 264 446 35 49 282 0 533 229 853 243 588 884 192 832 155 62 529 217 95 159 627 820 468 511 307 390 607 623 958 381 549 454 775 867 616 729 517
792 541 832 454 622 853 940 772 192 448 784 167 904 712 809 967 37 963 533 0 459 792 130 731 293 653 142 232 17 834 565 333 834 927 690 37 283 646 606 438 719 582 562 791 683 589 812 891 653 81
503 888 740 315 154 381 303 770 180 338 171 814 483 65 647 289 687 500 229 459 0 509 568 425 462 623 316 297 192 1 238 177 673 942 719 441 316 555 640 350 58 159 203 268 527 480 821 120 151 243
45 29 595 212 933 659 373 253 697 337 786 200 577 527 867 731 260 170 853 792 509 0 796 475 654 113 100 672 662 591 51 333 492 198 122 905 207 423 722 942 202 934 646 889 407 794 393 17 934 310
377 607 992 442 606 281 129 458 862 940 503 891 887 67 177 546 441 782 243 130 568 796 0 151 965 726 927 265 172 852 918 385 571 48 452 87 823 340 726 962 339 520 767 262 186 268 110 983 82 820
707 447 663 791 60 834 996 204 343 373 811 687 815 417 320 296 876 182 588 731 425 475 151 0 110 581 28 129 776 545 181 95 121 949 503 513 886 770 108 157 356 279 426 565 147 938 598 821 117 462
954 22 944 736 617 74 657 413 781 456 77 924 868 911 921 73 606 294 884 293 462 654 965 110 0 408 292 814 959 605 903 515 7 761 85 676 894 642 368 247 572 662 468 318 706 269 316 724 690 270
882 147 699 965 924 526 116 231 900 60 967 518 134 976 283 268 433 360 192 653 623 113 726 581 408 0 580 581 845 376 463 640 211 784 697 344 825 209 446 563 904 65 67 866 310 845 931 740 826 952
963 226 222 969 191 332 851 338 383 168 615 910 285 846 162 345 165 32 832 142 316 100 927 28 292 580 0 229 41 321 787 911 384 963 71 540 764 543 352 476 28 469 46 25 9 342 764 540 218 719
652 406 659 233 166 622 460 740 943 651 72 794 342 808 314 309 70 599 155 232 297 672 265 129 814 581 229 0 88 916 280 302 661 245 419 218 693 332 149 988 505 120 290 512 914 739 135 284 836 62
93 609 873 26 613 631 685 199 149 659 11 889 602 14 314 748 356 122 62 17 192 662 172 776 959 845 41 88 0 221 137 920 484 568 905 687 863 768 983 925 737 345 546 264 260 935 981 801 866 461
11 974 669 457 936 542 483 549 174 168 100 675 179 111 565 781 126 879 529 834 1 591 852 545 605 376 321 916 221 0 703 48 784 334 675 649 219 116 171 578 483 890 547 583 760 555 279 666 381 736
363 4 585 689 25 42 625 568 877 527 94 397 627 769 576 739 686 357 217 565 238 51 918 181 903 463 787 280 137 703 0 357 19 855 541 877 517 294 807 268 623 44 440 278 150 872 213 282 234 164
853 852 60 790 541 85 184 519 5 61 46 451 810 25 573 386 764 259 95 333 177 333 385 95 515 640 911 302 920 48 357 0 610 604 991 447 773 720 953 945 938 265 626 688 814 108 526 776 433 173
126 900 417 916 793 503 453 312 860 514 358 312 325 384 885 63 500 496 159 834 673 492 571 121 7 211 384 661 484 784 19 610 0 770 109 38 337 243 601 370 767 853 340 759 219 304 403 774 362 185
684 436 878 829 291 331 142 152 198 852 816 875 588 53 938 441 901 97 627 927 942 198 48 949 761 784 963 245 568 334 855 604 770 0 307 455 559 781 967 564 728 223 471 952 483 182 12 528 248 568
734 433 414 417 927 918 615 780 86 490 720 139 429 161 392 878 140 319 820 690 719 122 452 503 85 697 71 419 905 675 541 991 109 307 0 823 573 536 388 672 193 470 944 150 18 924 69 618 891 740
408 36 577 376 168 663 866 889 154 647 402 547 526 543 866 346 585 586 468 37 441 905 87 513 676 344 540 218 687 649 877 447 38 455 823 0 962 467 362 581 838 300 77 268 326 174 303 694 815 921
558 118 42 799 273 689 202 172 215 97 38 914 682 976 382 72 418 640 511 283 316 207 823 886 894 825 764 693 863 219 517 773 337 559 573 962 0 306 750 833 106 619 603 947 457 946 49 596 632 54
600 775 134 816 224 525 730 258 501 464 682 271 104 193 554 421 400 730 307 646 555 423 340 770 642 209 543 332 768 116 294 720 243 781 536 467 306 0 280 103 280 822 460 772 123 776 92 853 684 425
618 78 159 435 760 783 539 954 337 312 706 419 972 705 974 395 45 96 390 606 640 722 726 108 368 446 352 149 983 171 807 953 601 967 388 362 750 280 0 118 421 478 842 510 577 571 700 77 441 698
668 439 944 726 211 268 431 185 16 828 634 406 434 626 480 160 734 848 607 438 350 942 962 157 247 563 476 988 925 578 268 945 370 564 672 581 833 103 118 0 923 149 46 208 52 469 706 614 739 718
849 284 752 255 718 378 735 231 465 935 190 903 285 484 217 795 731 781 623 719 58 202 339 356 572 904 28 505 737 483 623 938 767 728 193 838 106 280 421 923 0 149 206 950 469 814 405 756 218 680
567 611 179 205 95 396 352 178 529 975 898 940 529 589 296 453 493 324 958 582 159 934 520 279 662 65 469 120 345 890 44 265 853 223 470 300 619 822 478 149 149 0 766 750 90 819 367 744 959 960
728 441 679 318 737 132 163 413 91 746 924 25 266 203 39 684 672 159 381 562 203 646 767 426 468 67 46 290 546 547 440 626 340 471 944 77 603 460 842 46 206 766 0 884 212 698 208 749 131 601
423 824 322 462 508 994 622 890 909 825 888 676 252 357 744 650 999 642 549 791 268 889 262 565 318 866 25 512 264 583 278 688 759 952 150 268 947 772 510 208 950 750 884 0 781 163 60 794 905 316
202 107 980 204 107 974 753 898 243 994 161 160 312 379 185 824 995 768 454 683 527 407 186 147 706 310 9 914 260 760 150 814 219 483 18 326 457 123 577 52 469 90 212 781 0 77 125 40 792 161
821 397 957 816 517 764 500 397 171 38 896 229 348 258 495 609 18 645 775 589 480 794 268 938 269 845 342 739 935 555 872 108 304 182 924 174 946 776 571 469 814 819 698 163 77 0 997 163 157 917
545 124 447 190 899 37 23 45 305 313 667 502 655 406 789 562 630 897 867 812 821 393 110 598 316 931 764 135 981 279 213 526 403 12 69 303 49 92 700 706 405 367 208 60 125 997 0 398 16 667
623 756 894 842 920 68 235 383 18 551 314 782 686 296 62 251 822 817 616 891 120 17 983 821 724 740 540 284 801 666 282 776 774 528 618 694 596 853 77 614 756 744 749 794 40 163 398 0 750 258
214 980 14 458 453 31 793 274 107 534 166 392 335 832 674 111 606 554 729 653 151 934 82 117 690 826 218 836 866 381 234 433 362 248 891 815 632 684 441 739 218 959 131 905 792 157 16 750 0 124
712 97 403 215 383 486 684 425 312 903 262 531 636 848 964 350 97 207 517 81 243 310 820 462 270 952 719 62 461 736 164 173 185 568 740 921 54 425 698 718 680 960 601 316 161 917 667 258 124 0
宁肯听任自己失望,也绝不乱存奢望。
'(30 -> 21)' + '(5 -> 25)' + '(44 -> 26)' + '(36 -> 2)'

Hint:Starts with 0, not 1.

这个.......emmm......em........至少我们知道这句话是弗洛伊德说的对不对,于是我们开始了对 Rex 的解梦.....PM学叔甚至去查了书....后来我突然想到 Rex 给我讲过弗洛伊德算法。哦,我的老伙计,亲爱的上帝,如果这是我的错,您就用那个无比鲜艳的西红柿砸死我吧,我发誓,我真的没有学过算法。

于是复习 Floyd-Warshall 算法http://www.cnblogs.com/ECJTUACM-873284962/p/6995648.html

然后我们书写js...

data = `这堆矩阵数据`
const rows = data.split("\n")
let e = new Array()
//数据填充
for (row in rows){
    e[row] = rows[row].split(' ')
    for(i in e[row]){
        e[row][i] = parseInt(e[row][i])//这一句十分的关键,第一次就是忘了把数据格式化成数字.....
    }
}

//Floyd-Warshall算法核心语句
n = 49
for(k=0;k<=n;k++)
    for(i=0;i<=n;i++)
        for(j=0;j<=n;j++)
            if(e[i][j]>e[i][k]+e[k][j] )
                e[i][j]=e[i][k]+e[k][j]


//输出最终的结果
//'(30 -> 21)' + '(5 -> 25)' + '(44 -> 26)' + '(36 -> 2)'
console.log(e[30][21])
console.log(e[5][25])
console.log(e[44][26])
console.log(e[36][2]) 
//33151942

em....是不是有点简单了,对于一个不通算法的人来说,理解起来还是需要一点时间的,得到

33151942

第五题,最后一题了!

https://red-packet.rexskz.info/2018/?s=33151942

const url = 'https://red-packet.rexskz.info/2018/_.7z';
// 答案就是 ans 的值
const ans = decode(url);

第四题浪费的时间还是很多的,我以为大师傅早就答完了,这一题就比较放松了

压缩包打开之后,有两个文件,信息2.png解压密码.txt,考虑伪加密,不是,然后拖进 010editor,发现010竟然没有7z的模板....没有发现异常,strings竟然没有得到答案!怎么肥四!对于国赛最基本的尊重呢?对于领航杯最基本的尊重呢?

考虑明文碰撞进行解密。明文碰撞详询其它博客,很简单。于是看了下两个文件的 crc,起初是想找到这张图片,推测这是 Rex 博客的 logo 或者是小平姐的头像什么的,结果在搜索文本的 crc 的时候直接发现 http://md5decoder.org/5ca49fbfb5ba90d2927d7f85f07ad74d

那个男人!那个代表自由的男人!他终于lei了!场上的选手一度十分的躁动,只因为看到了这个结果

Billy

我的老天爷,一下子豁然♂开朗了呢。

信息2.png

strings吼fa现下♂部有异常

const clearText = '????????';
export default function encrypt(clearText) {
    if (!/^\d+$/.test(clearText)) {
        return false;
    }
    const cipher = ((+clearText) * 99990001);
    return `${cipher}`.substr(-12);
console.log(encrypt(clearText)); // => 207079295042
 ans
const ans = clearText.substr(-8);

strings的代码稍有错误,但是不影响我们的逻辑,写jo本

function encrypt(clearText) {
    if (!/^\d+$/.test(clearText)) {
        return false;
    }
    const cipher = ((+clearText) * 99990001);
    return `${cipher}`.substr(-12)
}
//207079295042
for( clearText = 10000000 ; clearText < 100000000;clearText++){
    if(encrypt(clearText) == 207079295042){
        console.log(clearText)
    }
}

一会就可以得到

29715042

于是,快乐而充满哲学气息的比赛,就这样愉快的结束了~