Ejemplo n.º 1
0
 void GetBalanceThread()
 {
     while (ismp)
     {
         if (token != "" && token != null && (DateTime.Now - lastupdate).TotalSeconds > 30)
         {
             lastupdate = DateTime.Now;
             try
             {
                 string s    = Client.GetStringAsync("auth?access_token=" + token).Result;
                 MPAuth tmp2 = json.JsonDeserialize <MPAuth>(s);
                 this.balance = tmp2.user.balance / 100000000.0;
                 wagered      = tmp2.user.betted_wager / 100000000.0;
                 profit       = tmp2.user.betted_profit / 100000000.0;
                 bets         = (int)tmp2.user.betted_count;
                 Parent.updateBalance(balance);
                 Parent.updateBets(bets);
                 Parent.updateProfit(profit);
                 Parent.updateWagered(wagered);
             }
             catch (AggregateException e)
             {
             }
             catch (Exception e)
             {
             }
         }
         Thread.Sleep(100);
     }
 }
Ejemplo n.º 2
0
 void GetBalanceThread()
 {
     while (ismp)
     {
         if (token != "" && token != null && (DateTime.Now - lastupdate).TotalSeconds > 30)
         {
             lastupdate = DateTime.Now;
             HttpWebRequest betrequest = (HttpWebRequest)HttpWebRequest.Create("https://api.moneypot.com/v1/auth?access_token=" + token);
             if (Prox != null)
             {
                 betrequest.Proxy = Prox;
             }
             betrequest.ContentType = "application/x-www-form-urlencoded; charset=UTF-8";
             HttpWebResponse EmitResponse2  = (HttpWebResponse)betrequest.GetResponse();
             string          sEmitResponse2 = new StreamReader(EmitResponse2.GetResponseStream()).ReadToEnd();
             MPAuth          tmp2           = json.JsonDeserialize <MPAuth>(sEmitResponse2);
             this.balance = tmp2.user.balance / 100000000.0;
             wagered      = tmp2.user.betted_wager / 100000000.0;
             profit       = tmp2.user.betted_profit / 100000000.0;
             bets         = (int)tmp2.user.betted_count;
             Parent.updateBalance(balance);
             Parent.updateBets(bets);
             Parent.updateProfit(profit);
             Parent.updateWagered(wagered);
         }
         Thread.Sleep(100);
     }
 }
Ejemplo n.º 3
0
        public override void Login(string Username, string Password, string twofa)
        {
            ClientHandlr = new HttpClientHandler {
                UseCookies = true, AutomaticDecompression = DecompressionMethods.Deflate | DecompressionMethods.GZip, Proxy = this.Prox, UseProxy = Prox != null
            };
            Client = new HttpClient(ClientHandlr)
            {
                BaseAddress = new Uri("https://api.moneypot.com/v1/")
            };
            Client.DefaultRequestHeaders.AcceptEncoding.Add(new System.Net.Http.Headers.StringWithQualityHeaderValue("gzip"));
            Client.DefaultRequestHeaders.AcceptEncoding.Add(new System.Net.Http.Headers.StringWithQualityHeaderValue("deflate"));
            if (Password == "")
            {
                System.Diagnostics.Process.Start(SiteURL);
                finishedlogin(false);
            }
            else
            {
                try
                {
                    token      = Password;
                    lastupdate = DateTime.Now;
                    lastupdate = DateTime.Now;
                    string s = Client.GetStringAsync("auth?access_token=" + token).Result;

                    MPAuth tmp2 = json.JsonDeserialize <MPAuth>(s);

                    this.balance = tmp2.user.balance / 100000000.0m;
                    wagered      = tmp2.user.betted_wager / 100000000.0m;
                    profit       = tmp2.user.betted_profit / 100000000.0m;
                    bets         = (int)tmp2.user.betted_count;
                    Parent.updateBalance(balance);
                    Parent.updateBets(bets);
                    Parent.updateProfit(profit);
                    Parent.updateWagered(wagered);
                    ResetSeed();
                    ismp = true;
                    Thread t = new Thread(new ThreadStart(GetBalanceThread));
                    t.Start();
                    finishedlogin(true);
                }
                catch (Exception e)
                {
                    finishedlogin(false);
                }
            }
        }
Ejemplo n.º 4
0
 public override bool Register(string username, string password)
 {
     if (password == "")
     {
         System.Diagnostics.Process.Start(SiteURL);
         finishedlogin(false);
         return(false);
     }
     else
     {
         try
         {
             token      = password;
             lastupdate = DateTime.Now;
             HttpWebRequest betrequest = (HttpWebRequest)HttpWebRequest.Create("https://api.moneypot.com/v1/auth?access_token=" + token);
             if (Prox != null)
             {
                 betrequest.Proxy = Prox;
             }
             betrequest.ContentType = "application/x-www-form-urlencoded; charset=UTF-8";
             HttpWebResponse EmitResponse2  = (HttpWebResponse)betrequest.GetResponse();
             string          sEmitResponse2 = new StreamReader(EmitResponse2.GetResponseStream()).ReadToEnd();
             MPAuth          tmp2           = json.JsonDeserialize <MPAuth>(sEmitResponse2);
             this.balance = tmp2.user.balance / 100000000.0;
             wagered      = tmp2.user.betted_wager / 100000000.0;
             profit       = tmp2.user.betted_profit / 100000000.0;
             bets         = (int)tmp2.user.betted_count;
             Parent.updateBalance(balance);
             Parent.updateBets(bets);
             Parent.updateProfit(profit);
             Parent.updateWagered(wagered);
             ResetSeed();
             finishedlogin(true);
             return(true);
         }
         catch
         {
             finishedlogin(true);
             return(false);
         }
     }
 }
Ejemplo n.º 5
0
        public override bool Register(string username, string Password)
        {
            if (Password == "")
            {
                System.Diagnostics.Process.Start(SiteURL);
                finishedlogin(false);
            }
            else
            {
                try
                {
                    token      = Password;
                    lastupdate = DateTime.Now;
                    lastupdate = DateTime.Now;
                    string s = Client.GetStringAsync("auth?access_token=" + token).Result;

                    MPAuth tmp2 = json.JsonDeserialize <MPAuth>(s);

                    this.balance = tmp2.user.balance / 100000000.0;
                    wagered      = tmp2.user.betted_wager / 100000000.0;
                    profit       = tmp2.user.betted_profit / 100000000.0;
                    bets         = (int)tmp2.user.betted_count;
                    Parent.updateBalance(balance);
                    Parent.updateBets(bets);
                    Parent.updateProfit(profit);
                    Parent.updateWagered(wagered);
                    ResetSeed();
                    finishedlogin(true);
                    return(true);
                }
                catch
                {
                    finishedlogin(false);
                    return(false);
                }
            }
            return(true);
        }