• 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;
            }
        }

  • 相关阅读:
    Caused by: java.lang.IllegalStateException: Immutable bitmap passed to Canvas constructor
    Android 数据库 OrmLite Failed to open database
    【译】Android 数据库 ORMLite
    SIP
    Android LRUCache
    Enumeration与Iterator的对比
    URI, URL, and URN
    adb device offline 解决办法
    AudioFormat
    AudioTrack
  • 原文地址:https://www.cnblogs.com/yesun/p/1375995.html
Copyright © 2020-2023  润新知