4pda.ru注册验证的解码算法

来源:互联网 发布:mac anaconda怎么用 编辑:程序博客网 时间:2024/05/02 05:56

代码源于看雪林版在我群里介绍注册一个俄文安卓论坛,发出来了链接大家在测试注册。


http://4pda.ru/forum/index.php?


註冊方式請參看:


_https://forum.tuts4you.com/topic/36183-downloading-from-4pda/


打开上面这个网址后,我们可以看到右上角有一个Create Account按钮,我们点击它:





如上题,那个验证注册的问题一些朋友没弄明白如何搞出来,于是简单编写了下代码。


这个只是ascii的8进制编码而已,我们可以先转换10进制,然后会很明白看出来是ascii编码,这里用代码直接来进行操作。


仓促之间编写测试代码,格式太乱,下面的核心解码算法还是比较清楚的,大家看一下就明白了。


public class Chhh { public static void main(String[] args) throws Exception {   t1();   } public static void t1() throws Exception{  String s="127 150 141 164 040 143 145 156 164 165 162 171 040 144 151 144 040 155 141 164 150 145 155 141 164 151 143 151 141 156 163 040 146 151 162 163 164 040 165 163 145 040 160 154 165 163 040 141 156 144 040 155 151 156 165 163 040 163 151 147 156 163 077";//ASCII��  String[] chars=s.split(" ");  System.out.println("ASCII is \n----------------------");    String sa="";          for(int i=0;i<chars.length;i++){         //            System.out.println(ascii8ToString(chars[i]));                        sa+=ascii8ToString(chars[i]);                    }                 System.out.println(sa); }    public static String asciiToString(String value)    {        StringBuffer sbu = new StringBuffer();        String[] chars = value.split(",");        for (int i = 0; i < chars.length; i++) {            sbu.append((char) Integer.parseInt(chars[i]));        }        return sbu.toString();    }    public static String ascii8ToString(String value)    {        StringBuffer sbu = new StringBuffer();        String[] chars = value.split(",");        for (int i = 0; i < chars.length; i++) {            sbu.append((char)  (int)Integer.valueOf(chars[i],8));        }        return sbu.toString();    } }


解密后为:


What century did mathematicians first use plus and minus signs?



1 0
原创粉丝点击