mthoutai

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

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


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



posted on 2017-05-05 15:19  mthoutai  阅读(2344)  评论(0编辑  收藏  举报