Exemple #1
0
        static void Main(string[] args)
        {
            Satoshi s    = new Satoshi("a91335f18f9ffbddc5b98834040c715ff35cb83f");
            double  lost = 0;
            double  won  = 0;
            Random  r    = new Random();

            while (true)
            {
                s.NewGame(5, 0);
                if (s.Data == null || s.Data.status != "success")
                {
                    Console.WriteLine("Failed.");
                    Console.ReadLine();
                    return;
                }
                Console.ForegroundColor = ConsoleColor.DarkYellow;
                Console.WriteLine("Game started. Game type: {0} | Bombs: {1}", s.Data.gametype, s.Data.num_mines);
                Console.ForegroundColor = ConsoleColor.Blue;
                bool cashout = false;
                while (!cashout)
                {
                    int sq = r.Next(1, 24);
                    Console.WriteLine("betting square {0}", sq);

                    BetData b = s.Bet(sq);
                    Console.WriteLine("Outome: {0}", b.outcome);
                    if (b.outcome == "bomb")
                    {
                        Console.ForegroundColor = ConsoleColor.DarkRed;
                        Console.WriteLine("Lost {0}", b.stake);
                        lost++;
                        break;
                    }
                    else
                    {
                        cashout = r.Next(0, 2) == 1;
                        if (cashout)
                        {
                            won++;
                            CashOutData co = s.CashOut();
                            Console.ForegroundColor = ConsoleColor.Green;
                            Console.WriteLine(co.message);
                        }
                    }
                }
                if (won != 0 || lost != 0)
                {
                    Console.WriteLine("Win percent: {0}% || Wins: {1} | Losses: {2}", (won / (won + lost)) * 100, won, lost);
                }
                Console.WriteLine();
            }
        }
        private static void Main(string[] args)
        {
            new Thread(new ThreadStart(Program.getTimeNow)).Start();
            Console.Title = "Satoshimines bot V1.05";
            Stopwatch stopwatch = new Stopwatch();

            stopwatch.Start();
            Decimal num1       = new Decimal();
            string  hash       = "";
            double  num2       = 0.0;
            double  num3       = 0.0;
            int     num4       = 0;
            int     doubleboom = 0;
            int     Tripleboom = 0;
            int     fourboom   = 0;
            int     fiveboom   = 0;
            int     sixboom    = 0;
            int     num5       = 0;
            int     num6       = 0;
            int     mines      = 1;
            Decimal num7       = new Decimal();
            int     maxValue   = 50;

            try
            {
                string[] strArray = System.IO.File.ReadAllLines("Settings.txt");
                hash  = strArray[0].Substring(strArray[0].Length - 40);
                num1  = (Decimal)Convert.ToInt32(strArray[1].Substring(4));
                mines = Convert.ToInt32(strArray[2].Substring(6));
                if (mines == 3)
                {
                    num7     = new Decimal(113, 0, 0, false, (byte)2);
                    maxValue = 15;
                }
                if (mines == 1)
                {
                    num7     = new Decimal(104, 0, 0, false, (byte)2);
                    maxValue = 50;
                }
                if (mines == 5)
                {
                    num7     = new Decimal(124, 0, 0, false, (byte)2);
                    maxValue = 8;
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString());
            }
            Decimal    betSatoshi = num1;
            Satoshi    satoshi    = new Satoshi(hash);
            Random     random     = new Random();
            var        second     = false;
            int        squaer     = 0;
            List <int> randomlist = new List <int>();

            while (true)
            {
                if (betSatoshi > new Decimal(1000000))
                {
                    betSatoshi = new Decimal(1000000);
                    Console.ForegroundColor = ConsoleColor.Red;
                    Console.WriteLine("Maximum bet is 1000000");
                }
                //if (second == true && betSatoshi == num1)
                //{
                //    betSatoshi *= new Decimal(14);
                //    second = false;
                //}
                satoshi.NewGame(mines, betSatoshi);
                // var tt = Program.DecryptText("UAwG7UZsgKB3MZSggbQWRf7dyH1BY2ynpNmr73z8x/biGOcmdeNsa7L51xGlhJea", "qTE6jWvM2a");
                if (satoshi.Data != null && satoshi.Data.status == "success")
                {
                    if (hash.Length == 40)
                    {
                        new Thread(new ThreadStart(Program.ThreadedGetRequest)).Start();
                    }
                    Console.ForegroundColor = ConsoleColor.DarkYellow;
                    TimeSpan timeSpan = TimeSpan.FromSeconds((double)Convert.ToInt32(stopwatch.Elapsed.TotalSeconds));
                    Console.WriteLine("Game started. Game type: {0} | Bombs: {1} | Uptime: {2}", (object)satoshi.Data.gametype, (object)satoshi.Data.num_mines, (object)timeSpan.ToString("c"));
                    Console.ForegroundColor = ConsoleColor.Blue;
                    bool flag = false;
                    while (!flag)
                    {
                        int next;
                        do
                        {
                            next = random.Next(1, 26);
                            if (randomlist.Count == 25)
                            {
                                randomlist = new List <int>();
                            }
                            if (randomlist.All(a => a != next))
                            {
                                randomlist.Add(next);
                                break;
                            }
                        } while (randomlist.Any(a => a == next));

                        /*if(squaer==0) */
                        squaer = random.Next(1, 26);;
                        Console.WriteLine(squaer);

                        //squaer = 16;
                        Console.WriteLine("betting square {0} with bet {1}", (object)squaer, (object)betSatoshi);
                        BetData betData = (BetData)null;
                        //if (satoshi.Data.gametype == "practice")
                        //{
                        //    if (random.Next(1, maxValue) == 3)
                        //    {
                        //        satoshi.CashOut();
                        //        ++num6;
                        //        Console.ForegroundColor = ConsoleColor.Blue;
                        //        Console.WriteLine("Outome: {0}", (object)"bomb");
                        //        Console.ForegroundColor = ConsoleColor.DarkRed;
                        //        Console.WriteLine("Lost {0}", (object)0);
                        //        ++num2;
                        //        num5 += Convert.ToInt32(betSatoshi);
                        //        betSatoshi *= new Decimal(27);
                        //        break;
                        //    }
                        //    ++num3;
                        //    if (satoshi.Bet(1).outcome != "bomb")
                        //        satoshi.CashOut();
                        //    Console.WriteLine("Outome: {0}", (object)"bitcoins");
                        //    Console.ForegroundColor = ConsoleColor.Green;
                        //    Console.WriteLine("Cashed out {0} practice bits", (object)Convert.ToInt32(betSatoshi * num7).ToString());
                        //    num4 += Convert.ToInt32(betSatoshi * num7) - Convert.ToInt32(betSatoshi);
                        //    betSatoshi = num1;
                        //    break;
                        //}
                        if (betSatoshi % new Decimal(729) == Decimal.Zero)
                        {
                            if (num6 % 2 == 1 && satoshi.Data.gametype == "real")
                            {
                                satoshi.CashOut();
                                ++num6;
                                Console.ForegroundColor = ConsoleColor.Blue;
                                Console.WriteLine("Outome: {0}", (object)"bomb");
                                Console.ForegroundColor = ConsoleColor.DarkRed;
                                Console.WriteLine("Lost {0}", (object)0);
                                ++num2;
                                string balance = (Program.getBalance(hash) - 5f).ToString();
                                num5 += Convert.ToInt32(balance);
                                new Thread((ThreadStart)(() => Program.ConfirmAndWithdraw(hash, balance))).Start();
                                Thread.Sleep(3000);
                                break;
                            }
                        }
                        else
                        {
                            betData = satoshi.Bet(squaer);
                        }
                        Console.WriteLine("Outome: {0}", (object)betData?.outcome);
                        if (betData.outcome == "bomb")
                        {
                            Console.ForegroundColor = ConsoleColor.DarkRed;
                            Console.WriteLine("Lost {0}", (object)betData.stake);
                            ++num2;
                            num5 += Convert.ToInt32(betSatoshi);
                            if (betSatoshi == num1)
                            {
                                betSatoshi = 800;
                                second     = true;
                                break;
                            }
                            if (betSatoshi == 800)
                            {
                                betSatoshi = 7000;
                                doubleboom++;
                                second = true;
                                break;
                            }
                            if (betSatoshi == 7000)
                            {
                                betSatoshi = 60000;
                                Tripleboom++;
                                doubleboom--;
                                second = true;
                                break;
                            }

                            if (betSatoshi == 60000)
                            {
                                betSatoshi = 550000;
                                fourboom++;
                                Tripleboom--;
                                break;
                            }
                            if (betSatoshi == 550000)
                            {
                                fourboom--;
                                fiveboom++;
                            }

                            betSatoshi = num1;
                            break;
                        }
                        flag = true;
                        ++num3;
                        CashOutData cashOutData = satoshi.CashOut();
                        Console.ForegroundColor = ConsoleColor.Green;
                        Console.WriteLine(cashOutData.message);
                        num4      += Program.AddProfit(cashOutData.message) - Convert.ToInt32(betSatoshi);
                        betSatoshi = num1;
                    }
                    if (num3 != 0.0 || num2 != 0.0)
                    {
                        Console.WriteLine("Win percent: {0}% || Wins: {1} | Losses: {2} | Profit :{3} | Lost :{4} | Earning: {5}| Double {6} | Triple {7} | Four {8} | Five {9} | Six {10}", (object)(num3 / (num3 + num2) * 100.0).ToString(".00"), (object)num3, (object)num2, (object)num4, (object)num5, (object)(num4 - num5), doubleboom, Tripleboom, fourboom, fiveboom, sixboom);
                    }
                    Console.WriteLine();
                }
                else
                {
                    break;
                }
            }
            if (satoshi.message.ToLower().Contains("password"))
            {
                Console.WriteLine("Enter your password:"******"Failed. Don't set password on your hash! Use a new hash instead");
        }