zoukankan      html  css  js  c++  java
  • 4pda.ru注冊验证的解码算法

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


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


    註册方式請参看:


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


    打开上面这个网址后,我们能够看到右上角有一个Create Accountbutton,我们点击它:





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


    这个仅仅是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 
    ----------------------");
    		  
    		  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?



  • 相关阅读:
    dedecms 5.7 站点文件从本地子目录上传到远程根目录后找不到模板的解决方案
    Dedecms实现"文章标题2级栏目1级栏目网站名"
    织梦安装在子目录会出现问题的解决技巧集合
    ASP.NET三层架构中数据层数据访问类部分代码
    织梦DEDECMS缩短URL路径长度的方法
    CSS各种属性全集
    css和js引用图片路径
    ASP.Net中FileUpLoad控件内容清空
    WampServer的配置
    asp.net 中的 callback
  • 原文地址:https://www.cnblogs.com/mthoutai/p/6813173.html
Copyright © 2011-2022 走看看