Example #1
0
        private static ToExit LoadBotDisguisedAsUserBotConfig()
        {
            _botDisguisedAsUserBotInfos =
                FileSerialization.ReadFromBinaryFile <List <BotDisguisedAsUserBotInfo> >(Paths.Bin
                                                                                         .ConfigBotDisguisedAsUserbot);
            if (_botDisguisedAsUserBotInfos != null && _botDisguisedAsUserBotInfos.Count != 0)
            {
                return(ToExit.STAY);
            }

            Console.WriteLine(
                "It seems that the bot disguised as userbot configuration isn't available. Do you want to reset it? (Y/N)");
            var readChoice2 = Console.ReadLine();

            if (!string.IsNullOrEmpty(readChoice2) && readChoice2.ToLower().StartsWith("y"))
            {
                NewConfig.NewConfigMethod(false, false, true, false, false);

                Console.WriteLine("Reset done! Do you wish to continue with the execution? (Y/N)");
                var readChoice3 = Console.ReadLine();
                if (!string.IsNullOrEmpty(readChoice3) && readChoice3.ToLower().StartsWith("y"))
                {
                    //ok, keep going
                    _botDisguisedAsUserBotInfos =
                        FileSerialization.ReadFromBinaryFile <List <BotDisguisedAsUserBotInfo> >(Paths.Bin
                                                                                                 .ConfigBotDisguisedAsUserbot);
                }
                else
                {
                    Console.WriteLine("Ok, bye!");
                    return(ToExit.SKIP);
                }
            }
            else
            {
                return(ToExit.SKIP);
            }

            return(ToExit.STAY);
        }
Example #2
0
        private static async Task Main(string[] args)
        {
            FirstThingsToDo();

            while (true)
            {
                var readChoice = MainGetMenuChoice();

                switch (readChoice)
                {
                case '1':     //reset everything
                {
                    ResetEverything(true);

                    return;
                }

                case '2':     //normal mode
                case '3':     //disguised bot test
                case '8':
                case '9':
                {
                    var toExit = LoadBotConfig();
                    if (toExit == ToExit.EXIT)
                    {
                        return;
                    }

                    var toExit2 = LoadUserBotConfig();
                    if (toExit2 == ToExit.EXIT)
                    {
                        return;
                    }

                    var toExit3 = LoadBotDisguisedAsUserBotConfig();
                    if (toExit3 == ToExit.EXIT)
                    {
                        return;
                    }

                    GlobalVariables.LoadToRam();

                    Console.WriteLine("\nTo kill this process, you have to check the process list");

                    _ = StartBotsAsync(readChoice == '3', readChoice == '8', readChoice == '9');

                    while (true)
                    {
                        Console.ReadKey();
                    }
                    return;
                }

                case '4':
                {
                    ResetEverything(false);
                    return;
                }

                case '5':
                {
                    _ = await Test_IG.MainIGAsync();

                    return;
                }

                case '6':
                {
                    NewConfig.NewConfigMethod(true, false, false, false, false);
                    return;
                }

                case '7':
                {
                    NewConfig.NewConfigMethod(false, false, true, false, false);
                    return;
                }

                case 't':
                {
                    SpamTest.Main2();
                    return;
                }
                }
            }
        }
Example #3
0
 private static void ResetEverything(bool alsoFillTablesFromJson)
 {
     NewConfig.NewConfigMethod(true, true, true, true, alsoFillTablesFromJson);
     Console.WriteLine("Reset done!");
 }
Example #4
0
 private static void ResetEverything()
 {
     NewConfig.NewConfigMethod(true, true, true);
     Console.WriteLine("Reset done!");
 }