星辰奇缘苹果端绑定域名解密方法

  1. public void Connect(string address, int port)
  2.         {
  3.                 if (this.socket.Connected)
  4.                 {
  5.                         Debug.Log(string.Format(“错误:重复建立Socke连接,重新连接时请先断开之前的连接”, new object[0]));
  6.                         return;
  7.                 }
  8.                 this.address = address;
  9.                 this.port = port;
  10.                 MD5 md = MD5.Create();
  11.                 string a = “12546f1c61454538c45490”;
  12.                 string a2 = “1252051ca54456902c7054bc”;
  13.                 string a3 = “66610b45455576”;
  14.                 string a4 = “4582fdgs4545wr42saf1”;
  15.                 byte[] bytes = Encoding.Default.GetBytes(address);
  16.                 byte[] array = md.ComputeHash(bytes);
  17.                 string text = string.Empty;
  18.                 for (int i = 0; i < array.Length; i++)
  19.                 {
  20.                         text += array[i].ToString(“x6”);
  21.                 }
  22.                 byte[] bytes2 = Encoding.Default.GetBytes(text);
  23.                 byte[] array2 = md.ComputeHash(bytes2);
  24.                 string text2 = string.Empty;
  25.                 for (int j = 0; j < array2.Length; j++)
  26.                 {
  27.                         text2 += array2[j].ToString(“x2”);
  28.                 }
  29.                 if (!(a == text2) && !(a2 == text2) && !(a3 == text2))
  30.                 {
  31.                         if (!(a4 == text2))
  32.                         {
  33.                                 this.Disconnect();
  34.                                 return;
  35.                         }
  36.                 }
  37.                 try
  38.                 {
  39.                         Log.Debug(“Socket尝试建立连接”);
  40.                         this.ConnectStatus = ConnectStatusEnum.HasConnect;
  41.                         this.connetTime = Time.time;
  42.                         this.result = this.socket.BeginConnect(address, port, null, null);
  43.                         TimerManager.GetInstance().AddTimerTask(new TimerTask(500f, new Action(this.checkConnect)));
  44.                 }
  45.                 catch (SocketException ex)
  46.                 {
  47.                         this.result = null;
  48.                         this.socket.Close();
  49.                         Debug.Log(string.Format(“连接服务器{0}:{1}失败:{2}”, address, port, ex.Message));
  50.                         this.Disconnect();
  51.                 }
  52.         }

复制代码

address=ip地址

byte[] bytes = Encoding.Default.GetBytes(address);

                byte[] array = md.ComputeHash(bytes);

                string text = string.Empty;

                for (int i = 0; i < array.Length; i++)

                {

                        text += array.ToString(“x6”);

                }

                byte[] bytes2 = Encoding.Default.GetBytes(text);

                byte[] array2 = md.ComputeHash(bytes2);

                string text2 = string.Empty;

                for (int j = 0; j < array2.Length; j++)

                {

                        text2 += array2[j].ToString(“x2”);

                }

text2就是最终密文

© 版权声明
THE END
文章不错?点个赞呗
点赞0分享
评论 抢沙发

请登录后发表评论

    暂无评论内容