Ejemplo n.º 1
0
        public override void ResetSeed()
        {
            try
            {
                /*HttpWebRequest loginrequest = (HttpWebRequest)HttpWebRequest.Create("https://safedice.com/api/accounts/randomizeseed");
                 * if (Prox != null)
                 *  loginrequest.Proxy = Prox;
                 * loginrequest.Method = "GET";
                 *
                 * loginrequest.Accept = "application/json, text/plain, /*";
                 *
                 * loginrequest.ContentType = " application/json;charset=utf-8";
                 * loginrequest.Headers.Add("authorization", "Bearer " + accesstoken);
                 * loginrequest.CookieContainer = new CookieContainer();
                 * loginrequest.CookieContainer.Add(new Cookie("token", accesstoken, "/", "safedice.com"));
                 * HttpWebResponse EmitResponse = (HttpWebResponse)loginrequest.GetResponse();*/
                string sEmitResponse = Client.GetStringAsync("accounts/randomizeseed").Result;//new StreamReader(EmitResponse.GetResponseStream()).ReadToEnd();

                SDRandomize tmp = json.JsonDeserialize <SDRandomize>(sEmitResponse);
                serverhash = tmp.serverSeedHash;
                nonce      = 1;
            }
            catch (AggregateException e)
            {
                Parent.DumpLog(e.InnerException.Message, 3);
                Parent.DumpLog(e.InnerException.StackTrace, 4);
            }
        }
Ejemplo n.º 2
0
        public override void ResetSeed()
        {
            try
            {
                HttpWebRequest loginrequest = (HttpWebRequest)HttpWebRequest.Create("https://safedice.com/api/accounts/randomizeseed");
                if (Prox != null)
                {
                    loginrequest.Proxy = Prox;
                }
                loginrequest.Method = "GET";

                loginrequest.Accept = "application/json, text/plain, */*";

                loginrequest.ContentType = " application/json;charset=utf-8";
                loginrequest.Headers.Add("authorization", "Bearer " + accesstoken);
                loginrequest.CookieContainer = new CookieContainer();
                loginrequest.CookieContainer.Add(new Cookie("token", accesstoken, "/", "safedice.com"));
                HttpWebResponse EmitResponse  = (HttpWebResponse)loginrequest.GetResponse();
                string          sEmitResponse = new StreamReader(EmitResponse.GetResponseStream()).ReadToEnd();

                SDRandomize tmp = json.JsonDeserialize <SDRandomize>(sEmitResponse);
                serverhash = tmp.serverSeedHash;
                nonce      = 1;
            }
            catch
            {
            }
        }