JAVA 利用ASCII码偏移(来自IDEA免费激活码游戏)

前言

最近idea风风光光激活码失效,于是官方推出了一系列游戏,DD大哥也给我们解析了很多

解决方案

其中第一个任务,你需要到MPS-31816去获取一个线索。注意,这个线索的字眼会变得,就是为了防止大家只会索取不会变通。

“The key is to think back to the beginning.” – The JetBrains Quest team.

Qlfh$#Li#|rx#duh#uhdglqj#wklv#|rx#pxvw#kdyh#zrunhg#rxw#krz#wr#ghfu|sw#lw1#Wklv#lv#rxu#lvvxh#wudfnhu#ghvljqhg#iru#djloh#whdpv1#Lw#lv#iuhh#iru#xs#wr#6#xvhuv#lq#Forxg#dqg#iru#43#xvhuv#lq#Vwdqgdorqh/#vr#li#|rx#zdqw#wr#jlyh#lw#d#jr#lq#|rxu#whdp#wkhq#zh#wrwdoo|#uhfrpphqg#lw1#|rx#kdyh#ilqlvkhg#wkh#iluvw#Txhvw/#qrz#lw“v#wlph#wr#uhghhp#|rxu#iluvw#sul}h1#Wkh#frgh#iru#wkh#iluvw#txhvw#lv#‟EhfdxvhFrgh†1#Jr#wr#wkh#Txhvw#Sdjh#dqg#xvh#wkh#frgh#wr#fodlp#|rxu#sul}h1#kwwsv=22zzz1mhweudlqv1frp2surpr2txhvw2

这个时候需要用到java ASCII码偏移的知识点,怎么实现呢,其实很简单,只需要把String装维Char,然后+=偏移量或者-=偏移量进行偏移即可

package com.softdev.cms.util;

import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * StringUtils 
 * JAVA 利用ASCII码偏移(IDEA免费激活码游戏)
 * @author zhengkai.blog.csdn.net
 */
public class StringUtils {

    public static void main(String[] args) {
		System.out.println(asciiMove("Qlfh$#Li#|rx#duh#uhdglqj#wklv#|rx#pxvw#kdyh#zrunhg#rxw#krz#wr#ghfu|sw#lw1#Wklv#lv#rxu#lvvxh#wudfnhu#ghvljqhg#iru#djloh#whdpv1#Lw#lv#iuhh#iru#xs#wr#6#xvhuv#lq#Forxg#dqg#iru#43#xvhuv#lq#Vwdqgdorqh/#vr#li#|rx#zdqw#wr#jlyh#lw#d#jr#lq#|rxu#whdp#wkhq#zh#wrwdoo|#uhfrpphqg#lw1#|rx#kdyh#ilqlvkhg#wkh#iluvw#Txhvw/#qrz#lw“v#wlph#wr#uhghhp#|rxu#iluvw#sul}h1#Wkh#frgh#iru#wkh#iluvw#txhvw#lv#‟EhfdxvhFrgh†1#Jr#wr#wkh#Txhvw#Sdjh#dqg#xvh#wkh#frgh#wr#fodlp#|rxu#sul}h1#kwwsv=22zzz1mhweudlqv1frp2surpr2txhvw2"));
    }
	/**
	 * ASCII码偏移
	 * @author zhengkai.blog.csdn.net
	 */
    public static String asciiMove(String str) {
        char[] c = str.toCharArray();
        String newStr="";
        for (int i = 0; i < c.length; i++) {
            c[i]-=3;
            newStr+=String.valueOf(c[i]);
        }
        return newStr;
    }

}

控制台输出如下

Nice! If you are reading this you must have worked out how to decrypt it. This is our issue tracker designed for agile teams. It is free for up to 3 users in Cloud and for 10 users in Standalone, so if you want to give it a go in your team then we totally recommend it. you have finished the first Quest, now it’s time to redeem your first prize. The code for the first quest is “BecauseCode”. Go to the Quest Page and use the code to claim your prize. https://www.jetbrains.com/promo/quest/

答案就是(无需多言了吧)

The code for the first quest is “******

GOTO 兑换地址

在这里插入图片描述
在这里插入图片描述

3+3 = 6个月授权,香不香!月度订阅100RMB左右,ALL products是200左右,赚了1200RMB了(^_^纯粹心理作用)。

另外,我也通过我的开源项目SpringBootCodeGenerator发起了OpenSource FreeLicense申请,应该是可以终生免费用吧,希望可以通过!

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章