zoukankan      html  css  js  c++  java
  • baidu mp3竟然还加密,太扯了

     public class BaiduHelper
        {

            static int F = 0;
            static string I = "", J = "";
            static string O = "";
            static string E = "";
            static int[] K = new int[1000];
            static int[] H = new int[1000];
            static int M = 0;

            /// <summary>
            /// GetBaiduMp3Url
            /// </summary>
            /// <param name="str"></param>
            /// <param name="key"></param>
            /// <returns></returns>
            public static string GetBaiduMp3Url(String str, int key)
            {
                F = key;
                I = str;
                J = str;
                N(0, 9, 48);
                N(10, 35, 55);
                N(36, 61, 61);

                M = F % 26;
                M = (M > -1) ? M : 1;

                O = A(I);
                E = (I == J) ? O : A(J);
                return E;
            }

            public static void N(int S, int P, int Q)
            {
                for (int R = S; R <= P; R++)
                {
                    K[R] = R + Q;
                    H[R + Q] = R;
                }
            }

            public static string A(string Q)
            {
                int P = Q.Length;
                string S = "";
                char[] chars = Q.ToCharArray();
                for (int R = 0; R < P; R++) {
                    char T = chars[R];
                    if (Regex.IsMatch(T.ToString(),"[a-zA-Z0-9]")) {
                        int U = H[chars[R]] - M;
                        if (U < 0) {
                         U += 62 ;
                         }
                        T = (char)(K[U]);//String.fromCharCode
                    }
                    S += T;
                }
                return S;
            }
        }

  • 相关阅读:
    MSIL指令速查表
    .NET中的内存管理,GC机制,内存释放过程,各种内存释放方法
    程序员学专业英语
    C#入门不简单(上网找beginning c# objects时看到的一些话,很有同感)
    关掉在打开的做法很有必要
    视图刷新
    创建 平面求交点
    3dmas 的硬显示 这个就是其中既各个 最后两个是 对应显示操作的
    这句话是我在渲染 程序贴图用到的代码
    设置到基础层
  • 原文地址:https://www.cnblogs.com/yesun/p/1375995.html
Copyright © 2011-2022 走看看