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

  • 相关阅读:
    列出九宫格输入组合
    判断是否平衡二叉树
    Jetson tx2的tensorflow keras环境搭建
    TypeError: Only valid with DatetimeIndex, TimedeltaIndex or PeriodIndex, but got an instance of 'Index'
    python时间序列画图plot总结
    pandas 读csv文件 TypeError: Empty 'DataFrame': no numeric data to plot
    yolov3实践(二)
    yolov3实践(一)
    USB摄像头无法正常读取问题
    tensorflow神经网络拟合非线性函数与操作指南
  • 原文地址:https://www.cnblogs.com/yesun/p/1375995.html
Copyright © 2020-2023  润新知