• 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?



  • 相关阅读:
    复制文字时自动加版权
    Linux安装Docker
    ThreadLocal 理解
    Spring多数据源动态切换
    [LOJ#500]「LibreOJ β Round」ZQC的拼图
    [JLOI2015]装备购买
    「雅礼集训 2017 Day4」洗衣服
    [BJWC2011]元素
    [51nod1577]异或凑数
    [ARC101B]Median of Medians
  • 原文地址:https://www.cnblogs.com/mthoutai/p/6813173.html
Copyright © 2020-2023  润新知