示例#1
0
        public async Task bili_api()
        {
            Hashtable hs = new Hashtable()
            {
                { "username", CryptData.Encode(UserName) },
                { "password", CryptData.Encode(Password) },
                { "sign", CryptData.Encode(String.Concat(UserName, Password, Constant.AppKey)) }
            };
            var response = await Network.HttpPostAsync("https://api.fate-flag.cn/login/login.php?outinggua=1", hs);

            if (response == "false")
            {
                throw new Exception("server_error");
            }

            var json = JObject.Parse(CryptData.Decode(response));

            if (json["code"].ToString() != "0")
            {
                throw new Exception(json["message"].ToString());
            }

            uid        = json["uid"].ToString();
            uname      = json["uname"].ToString();
            access_key = json["access_key"].ToString();
            PlayerFace = json["face"].ToString();
        }
示例#2
0
        public async Task <string> EncryptMD5Usk(string usk)
        {
            var str = await Network.GetWebAsync("https://xnxezy9qaazkicgjwwex2qonmgdptl1r.fate-flag.cn/shsfoiafanvlauibxzuvbmaiuanocmz.php", "Post", $"ios={(IsiOS ? 1 : 0)}&usk={usk}");

            return(CryptData.Decode(str));
        }