From 64e8a6c6aca28eb03b636ed9b228910851e7d8b4 Mon Sep 17 00:00:00 2001 From: Andrii Lavrenko Date: Sat, 13 Jul 2024 22:45:53 +0300 Subject: [PATCH] Rework --- BlumAutoBot/BlumBot.csproj | 19 +++- BlumAutoBot/BlumClient.cs | 183 +++++++++++++++++++++++++++++++++++++ BlumAutoBot/Helper.cs | 99 -------------------- BlumAutoBot/Program.cs | 57 ++++-------- BlumAutoBot/Requests.cs | 181 ------------------------------------ BlumAutoBot/Settings.cs | 61 +++++++++++++ LICENSE | 21 +++++ README.md | 29 ++---- 8 files changed, 304 insertions(+), 346 deletions(-) create mode 100644 BlumAutoBot/BlumClient.cs delete mode 100644 BlumAutoBot/Helper.cs delete mode 100644 BlumAutoBot/Requests.cs create mode 100644 BlumAutoBot/Settings.cs create mode 100644 LICENSE diff --git a/BlumAutoBot/BlumBot.csproj b/BlumAutoBot/BlumBot.csproj index 5d92cb6..be4d8b6 100644 --- a/BlumAutoBot/BlumBot.csproj +++ b/BlumAutoBot/BlumBot.csproj @@ -2,13 +2,28 @@ Exe - net8.0 + net8.0-windows10.0.22000.0 enable enable + BlumAutoBot + False + BlumAutoBot + Andrii Lavrenko + Copyright (c) 2024 Andrii Lavrenko + README.md + https://github.com/SeRi0uS007/BlumAutoBot + LICENSE - + + True + \ + + + True + \ + diff --git a/BlumAutoBot/BlumClient.cs b/BlumAutoBot/BlumClient.cs new file mode 100644 index 0000000..4c01321 --- /dev/null +++ b/BlumAutoBot/BlumClient.cs @@ -0,0 +1,183 @@ +using System.Text; +using System.Text.Json; +using System.Net; +using System.Text.Json.Nodes; + +namespace BlumBot +{ + public class BlumClient: IDisposable + { + Settings _settings; + HttpClient _httpClient; + private static string GetUserAgent(BlumPlatform platform) => + platform switch + { + BlumPlatform.iOS15 => "Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.0 Mobile/15E148 Safari/604.1", + BlumPlatform.iOS16 => "Mozilla/5.0 (iPhone; CPU iPhone OS 16_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.4 Mobile/15E148 Safari/604.1", + BlumPlatform.Android => "Mozilla/5.0 (Linux; Android 13; SM-G998B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Mobile Safari/537.36", + BlumPlatform.Windows => "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0", + BlumPlatform.MacOS => "Mozilla/5.0 (Macintosh; Intel Mac OS X 13_4) AppleWebKit/537.36 (KHTML, like Gecko) Version/16.0 Safari/537.36", + _ => throw new ArgumentException($"Invalid platform {platform.ToString()}") + }; + + public BlumClient(Settings settings) + { + _settings = settings; + _httpClient = new HttpClient(); + + _httpClient.DefaultRequestHeaders.Clear(); + _httpClient.DefaultRequestHeaders.UserAgent.TryParseAdd(GetUserAgent(_settings.Platform)); + _httpClient.DefaultRequestHeaders.Accept.TryParseAdd("application/json, text/plain, */*"); + _httpClient.DefaultRequestHeaders.AcceptLanguage.TryParseAdd("en-US,en;q=0.9"); + _httpClient.DefaultRequestHeaders.Add("origin", "https://telegram.blum.codes"); + _httpClient.DefaultRequestHeaders.Add("priority", "u=1, i"); + _httpClient.DefaultRequestHeaders.Add("sec-fetch-dest", "empty"); + _httpClient.DefaultRequestHeaders.Add("sec-fetch-mode", "cors"); + _httpClient.DefaultRequestHeaders.Add("sec-fetch-site", "same-site"); + + _httpClient.DefaultRequestHeaders.Authorization = new("Bearer", _settings.AuthorizationToken); + + if (_settings.Platform == BlumPlatform.Windows) + { + _httpClient.DefaultRequestHeaders.Add("sec-ch-ua", "\"Microsoft Edge\";v=\"126\", \"Chromium\";v=\"126\", \"Not.A/Brand\";v=\"8\", \"Microsoft Edge WebView2\";v=\"126\""); + _httpClient.DefaultRequestHeaders.Add("sec-ch-ua-mobile", "?0"); + _httpClient.DefaultRequestHeaders.Add("sec-ch-ua-platform", "\"Windows\""); + } + } + + private async Task<(bool, string?)> MakeRequestAsync(HttpMethod method, Uri uri, StringContent? payload = null) + { + HttpRequestMessage request = new() + { + Method = method, + RequestUri = uri + }; + + if (payload != null) + request.Content = payload; + + var response = await _httpClient.SendAsync(request); + + if (response.StatusCode == HttpStatusCode.Unauthorized) + { + Console.WriteLine("Invalid token. Please recheck"); + return (false, null); + } + + if (response.StatusCode != HttpStatusCode.OK) + { + Console.WriteLine($"Invalid HTTP Status Code: {response.StatusCode}"); + return (false, null); + } + + var content = await response.Content.ReadAsStringAsync(); + return (true, content); + } + + private async Task<(bool, uint)> GetBalanceAsync() + { + Uri uri = new("https://game-domain.blum.codes/api/v1/user/balance"); + var (success, response) = await MakeRequestAsync(HttpMethod.Get, uri); + + if (!success) + return (false, 0); + + if (response == null) + { + Console.WriteLine("Balance content is null"); + return (false, 0); + } + + using (JsonDocument document = JsonDocument.Parse(response)) + { + var playPasses = document.RootElement.GetProperty("playPasses").GetUInt32(); + return (true, playPasses); + } + } + + private async Task<(bool, string?)> GetGameIdAsync() + { + Uri uri = new("https://game-domain.blum.codes/api/v1/game/play"); + var (success, response) = await MakeRequestAsync(HttpMethod.Post, uri); + + if (!success) + return (false, null); + + if (response == null) + { + Console.WriteLine("GameId content is null"); + return (false, null); + } + + using (JsonDocument document = JsonDocument.Parse(response)) + { + var gameId = document.RootElement.GetProperty("gameId").GetString(); + return (true, gameId); + } + } + + private async Task ClaimPointsAsync(string gameId, int points) + { + Uri uri = new("https://game-domain.blum.codes/api/v1/game/claim"); + var payloadJson = new JsonObject + { + ["gameId"] = gameId, + ["points"] = points + }; + StringContent payload = new(payloadJson.ToJsonString(), Encoding.UTF8, "application/json"); + + var (success, _) = await MakeRequestAsync(HttpMethod.Post, uri, payload); + + return success; + } + + private async Task PlayGameAsync() + { + Console.WriteLine("Starting game"); + var (success, gameId) = await GetGameIdAsync(); + if (!success || string.IsNullOrEmpty(gameId)) + { + Console.WriteLine("Unable to start game"); + return false; + } + + Console.WriteLine("Waiting 32 seconds"); + await Task.Delay(TimeSpan.FromSeconds(32)); + + Random pointsRnd = new(); + var points = pointsRnd.Next((int)_settings.MinScore, (int)_settings.MaxScore + 1); + + Console.WriteLine($"Claiming {points} points"); + success = await ClaimPointsAsync(gameId, points); + if (!success) + Console.WriteLine("Unable to claim points"); + return success; + } + + public async Task StartBotAsync() + { + var (success, passes) = await GetBalanceAsync(); + if (!success) + return false; + + if (passes == 0) + { + Console.WriteLine("There are no passes"); + return true; + } + + Console.WriteLine($"Found {passes} passes"); + for (int i = 0; i < passes; i++) + { + success = await PlayGameAsync(); + if (!success) + return false; + await Task.Delay(TimeSpan.FromSeconds(1)); + } + + return true; + } + + public void Dispose() => _httpClient.Dispose(); + } +} \ No newline at end of file diff --git a/BlumAutoBot/Helper.cs b/BlumAutoBot/Helper.cs deleted file mode 100644 index 1c14903..0000000 --- a/BlumAutoBot/Helper.cs +++ /dev/null @@ -1,99 +0,0 @@ -namespace BlumBot -{ - public class Helper - { - public int platform() - { - Console.WriteLine("Выберите платформу"); - Console.WriteLine("1 - iPhone (15.0)"); - Console.WriteLine("2 - iPhone (16.4)"); - Console.WriteLine("3 - Android (13)"); - Console.WriteLine("4 - Windows (10)"); - Console.WriteLine("5 - MacOS (13.4)"); - int choice = Int32.Parse(Console.ReadLine()); - - return choice; - } - - public int replay() - { - while (true) - { - Console.Write("Введите количество повторений: "); - int repetitions = Int32.Parse(Console.ReadLine()); - - if (repetitions < 1 || repetitions > 100) - { - Console.WriteLine("Недопустимое количество повторений."); - } - else if (repetitions > 5) - { - Console.WriteLine("Ты уверен? (y/n)"); - string choice = Console.ReadLine().ToLower(); - if (choice == "yes" || choice == "y") - { - return repetitions; - } - else - { - continue; - } - } - else - { - return repetitions; - } - } - } - - public int scores() - { - while (true) - { - Console.Write("Введите баллы (рекомендуется от 200 до 280): "); - string pointsInput = Console.ReadLine(); - int points; - - if (string.IsNullOrEmpty(pointsInput)) - { - Random random = new Random(); - points = random.Next(260, 280); - Console.WriteLine($"Никакие баллы не введены. Использование случайных точек: {points}"); - return points; - } - else if (!int.TryParse(pointsInput, out points) || points < 200 || points > 280) - { - Console.WriteLine("Неверное значение баллов. Пожалуйста, введите число от 200 до 280."); - continue; - } - else - { - return points; - } - } - } - - public string GetAuthorizationToken() - { - Console.WriteLine("\r\n██████╗░██╗░░░░░██╗░░░██╗███╗░░░███╗  ░█████╗░██╗░░░██╗████████╗░█████╗░  ██████╗░░█████╗░████████╗\r\n██╔══██╗██║░░░░░██║░░░██║████╗░████║  ██╔══██╗██║░░░██║╚══██╔══╝██╔══██╗  ██╔══██╗██╔══██╗╚══██╔══╝\r\n██████╦╝██║░░░░░██║░░░██║██╔████╔██║  ███████║██║░░░██║░░░██║░░░██║░░██║  ██████╦╝██║░░██║░░░██║░░░\r\n██╔══██╗██║░░░░░██║░░░██║██║╚██╔╝██║  ██╔══██║██║░░░██║░░░██║░░░██║░░██║  ██╔══██╗██║░░██║░░░██║░░░\r\n██████╦╝███████╗╚██████╔╝██║░╚═╝░██║  ██║░░██║╚██████╔╝░░░██║░░░╚█████╔╝  ██████╦╝╚█████╔╝░░░██║░░░\r\n╚═════╝░╚══════╝░╚═════╝░╚═╝░░░░░╚═╝  ╚═╝░░╚═╝░╚═════╝░░░░╚═╝░░░░╚════╝░  ╚═════╝░░╚════╝░░░░╚═╝░░░" + "\r\n\n"); - while (true) - { - Console.Write("Введите токен авторизации: "); - string token = Console.ReadLine().Trim(); - - if (string.IsNullOrEmpty(token)) - { - Console.WriteLine("Токен не может быть пустым. Пожалуйста, введите действительный токен авторизации."); - continue; - } - - if (!token.StartsWith("Bearer ")) - { - token = "Bearer " + token; - } - - return token; - } - } - } -} \ No newline at end of file diff --git a/BlumAutoBot/Program.cs b/BlumAutoBot/Program.cs index bd5d111..4e4fddc 100644 --- a/BlumAutoBot/Program.cs +++ b/BlumAutoBot/Program.cs @@ -1,48 +1,23 @@ -namespace BlumBot +namespace BlumBot; + +public static class Program { - class Program + static async Task Main() { - static async Task Main(string[] args) - { - Helper help = new Helper(); - Requests requests = new Requests(); - - string authorizationToken = help.GetAuthorizationToken(); - - while (true) - { - try - { - int choice = help.platform(); - int repetitions = help.replay(); - int points = help.scores(); - - List> tasks = new List>(); + var settings = Settings.ReadSettings(); - for (int i = 0; i < repetitions; i++) - { - tasks.Add(requests.MakeRequestsAsync(authorizationToken, points, i + 1, choice)); - } - - string[] results = await Task.WhenAll(tasks); - - for (int i = 0; i < results.Length; i++) - { - Console.WriteLine($"Результат итерации {i + 1}:\n{results[i]}\n"); - } - } - catch (Exception ex) - { - Console.WriteLine($"Ошибка: {ex.Message}"); - } + if (settings.Length == 0) + { + Console.WriteLine("Rechek accounts folder"); + return; + } - Console.WriteLine("Еще разок? (yes/no): "); - string runAgain = Console.ReadLine().ToLower(); - if (runAgain != "yes" && runAgain != "y") - { - break; - } - } + for (int i = 0; i < settings.Length; i++) + { + Console.WriteLine($"Working with account {i + 1}"); + var client = new BlumClient(settings[i]); + var success = await client.StartBotAsync(); + Console.WriteLine($"Account {i + 1} sucess: {success}"); } } } \ No newline at end of file diff --git a/BlumAutoBot/Requests.cs b/BlumAutoBot/Requests.cs deleted file mode 100644 index 37c4c8b..0000000 --- a/BlumAutoBot/Requests.cs +++ /dev/null @@ -1,181 +0,0 @@ -using Newtonsoft.Json.Linq; -using System.Text; - -namespace BlumBot -{ - public class Requests - { - private static HttpClient choiceplatform(string authorizationToken, int choice) - { - HttpClient result = new HttpClient(); - - switch(choice) - { - case 1: - result = iphone_old(authorizationToken); - break; - case 2: - result = iphone_new(authorizationToken); - break; - case 3: - result = android(authorizationToken); - break; - case 4: - result = windows(authorizationToken); - break; - case 5: - result = macos(authorizationToken); - break; - } - - return result; - } - - public static HttpClient iphone_old(string authorizationToken) - { - var client = new HttpClient(); - - client.DefaultRequestHeaders.Add("User-Agent", "Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.0 Mobile/15E148 Safari/604.1"); - client.DefaultRequestHeaders.Add("Accept", "application/json, text/plain, */*"); - client.DefaultRequestHeaders.Add("accept-language", "en-US,en;q=0.9"); - client.DefaultRequestHeaders.Add("authorization", authorizationToken); - client.DefaultRequestHeaders.Add("origin", "https://telegram.blum.codes"); - client.DefaultRequestHeaders.Add("priority", "u=1, i"); - client.DefaultRequestHeaders.Add("sec-fetch-dest", "empty"); - client.DefaultRequestHeaders.Add("sec-fetch-mode", "cors"); - client.DefaultRequestHeaders.Add("sec-fetch-site", "same-site"); - - return client; - } - - public static HttpClient iphone_new(string authorizationToken) - { - var client = new HttpClient(); - - client.DefaultRequestHeaders.Add("User-Agent", "Mozilla/5.0 (iPhone; CPU iPhone OS 16_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.4 Mobile/15E148 Safari/604.1"); - client.DefaultRequestHeaders.Add("Accept", "application/json, text/plain, */*"); - client.DefaultRequestHeaders.Add("accept-language", "en-US,en;q=0.9"); - client.DefaultRequestHeaders.Add("authorization", authorizationToken); - client.DefaultRequestHeaders.Add("origin", "https://telegram.blum.codes"); - client.DefaultRequestHeaders.Add("priority", "u=1, i"); - client.DefaultRequestHeaders.Add("sec-fetch-dest", "empty"); - client.DefaultRequestHeaders.Add("sec-fetch-mode", "cors"); - client.DefaultRequestHeaders.Add("sec-fetch-site", "same-site"); - - return client; - } - - public static HttpClient android(string authorizationToken) - { - var client = new HttpClient(); - - client.DefaultRequestHeaders.Add("User-Agent", "Mozilla/5.0 (Linux; Android 13; SM-G998B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Mobile Safari/537.36"); - client.DefaultRequestHeaders.Add("Accept", "application/json, text/plain, */*"); - client.DefaultRequestHeaders.Add("accept-language", "en-US,en;q=0.9"); - client.DefaultRequestHeaders.Add("authorization", authorizationToken); - client.DefaultRequestHeaders.Add("origin", "https://telegram.blum.codes"); - client.DefaultRequestHeaders.Add("priority", "u=1, i"); - client.DefaultRequestHeaders.Add("sec-fetch-dest", "empty"); - client.DefaultRequestHeaders.Add("sec-fetch-mode", "cors"); - client.DefaultRequestHeaders.Add("sec-fetch-site", "same-site"); - - return client; - } - - public static HttpClient windows(string authorizationToken) - { - var client = new HttpClient(); - - client.DefaultRequestHeaders.Add("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0"); - client.DefaultRequestHeaders.Add("Accept", "application/json, text/plain, */*"); - client.DefaultRequestHeaders.Add("accept-language", "en-US,en;q=0.9"); - client.DefaultRequestHeaders.Add("authorization", authorizationToken); - client.DefaultRequestHeaders.Add("origin", "https://telegram.blum.codes"); - client.DefaultRequestHeaders.Add("priority", "u=1, i"); - client.DefaultRequestHeaders.Add("sec-ch-ua", "\"Microsoft Edge\";v=\"126\", \"Chromium\";v=\"126\", \"Not.A/Brand\";v=\"8\", \"Microsoft Edge WebView2\";v=\"126\""); - client.DefaultRequestHeaders.Add("sec-ch-ua-mobile", "?0"); - client.DefaultRequestHeaders.Add("sec-ch-ua-platform", "\"Windows\""); - client.DefaultRequestHeaders.Add("sec-fetch-dest", "empty"); - client.DefaultRequestHeaders.Add("sec-fetch-mode", "cors"); - client.DefaultRequestHeaders.Add("sec-fetch-site", "same-site"); - - return client; - } - - public static HttpClient macos(string authorizationToken) - { - var client = new HttpClient(); - - client.DefaultRequestHeaders.Add("User-Agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 13_4) AppleWebKit/537.36 (KHTML, like Gecko) Version/16.0 Safari/537.36"); - client.DefaultRequestHeaders.Add("Accept", "application/json, text/plain, */*"); - client.DefaultRequestHeaders.Add("accept-language", "en-US,en;q=0.9"); - client.DefaultRequestHeaders.Add("authorization", authorizationToken); - client.DefaultRequestHeaders.Add("origin", "https://telegram.blum.codes"); - client.DefaultRequestHeaders.Add("priority", "u=1, i"); - client.DefaultRequestHeaders.Add("sec-fetch-dest", "empty"); - client.DefaultRequestHeaders.Add("sec-fetch-mode", "cors"); - client.DefaultRequestHeaders.Add("sec-fetch-site", "same-site"); - - return client; - } - - public async Task MakeRequestsAsync(string authorizationToken, int points, int iteration, int choice) - { - HttpClient client = new HttpClient(); - - client = choiceplatform(authorizationToken, choice); - - HttpResponseMessage response = await client.PostAsync("https://game-domain.blum.codes/api/v1/game/play", null); - - if (!response.IsSuccessStatusCode) - { - if (response.StatusCode == System.Net.HttpStatusCode.Unauthorized) - { - Console.WriteLine("Срок действия токенов истек. Пожалуйста, введите действительный токен авторизации."); - } - else - { - string errorMessage = await response.Content.ReadAsStringAsync(); - Console.WriteLine($"Ошибка: {errorMessage}"); - } - return $"Итерация {iteration} не удалась."; - } - - string responseContent = await response.Content.ReadAsStringAsync(); - Console.WriteLine($"Ответ от /game/play (итерация {iteration}):"); - Console.WriteLine(responseContent); - - var json = JObject.Parse(responseContent); - string gameId = json["gameId"].ToString(); - - Console.WriteLine($"Итерация {iteration}: Ждите 32 секунды..."); - await Task.Delay(32000); - - client.DefaultRequestHeaders.Clear(); - client = choiceplatform(authorizationToken, choice); - - var payload = new - { - gameId = gameId, - points = points - }; - - StringContent content = new StringContent(JObject.FromObject(payload).ToString(), Encoding.UTF8, "application/json"); - - response = await client.PostAsync("https://game-domain.blum.codes/api/v1/game/claim", content); - responseContent = await response.Content.ReadAsStringAsync(); - - if (!response.IsSuccessStatusCode) - { - string errorMessage = await response.Content.ReadAsStringAsync(); - Console.WriteLine($"Ошибка от /game/claim (Итерация {iteration}): {errorMessage}"); - return $"Итерация {iteration} не удалась."; - } - - Console.WriteLine($"Ответ от /game/claim (Итерация {iteration}):"); - Console.WriteLine(responseContent); - - return $"Итерация {iteration} завершена успешно."; - } - } -} \ No newline at end of file diff --git a/BlumAutoBot/Settings.cs b/BlumAutoBot/Settings.cs new file mode 100644 index 0000000..3d680a4 --- /dev/null +++ b/BlumAutoBot/Settings.cs @@ -0,0 +1,61 @@ +using System.Text.Json; + +namespace BlumBot; + +public enum BlumPlatform +{ + iOS15, + iOS16, + Android, + Windows, + MacOS +} + +public class Settings +{ + public uint MinScore { get; set; } = 170; + public uint MaxScore { get; set; } = 250; + public string AuthorizationToken { get; set; } = string.Empty; + public BlumPlatform Platform { get; set; } = BlumPlatform.Windows; + + public static Settings? ReadSettings(string path) + { + if (string.IsNullOrWhiteSpace(path)) + return null; + + if (!Path.Exists(path)) + return null; + + using (FileStream file = new(path, FileMode.Open, FileAccess.Read)) + { + Settings? settings; + try + { + settings = JsonSerializer.Deserialize(file); + } + catch (JsonException) + { + return null; + } + + if (string.IsNullOrWhiteSpace(settings?.AuthorizationToken)) + return null; + + return settings; + } + } + + public static Settings[] ReadSettings() + { + var processPath = Environment.ProcessPath; + var processFolder = Path.GetDirectoryName(processPath); + if (string.IsNullOrEmpty(processFolder)) + return Array.Empty(); + + var settingsPath = Path.Combine(processFolder, "accounts"); + if (!Directory.Exists(settingsPath)) + return Array.Empty(); + + return Directory.GetFiles(settingsPath).Select(x => ReadSettings(x)).Where(x => x != null).ToArray()!; + } +} diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..e36421c --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 Andrii Lavrenko + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md index 4a0b8f7..14b576e 100644 --- a/README.md +++ b/README.md @@ -1,26 +1,9 @@ # BlumAutoBot -Эта программа помогает автоматизировать процесс игры и получить больше монет. При этом не нужно заходить в свой телеграмм аккаунт или в веб версию. +Play Blum games automatically -Ссылка на бота: [Blum](https://t.me/BlumCryptoBot/app?startapp=ref_D3LL3IumB9) - -1. Необходимо включить опцию проверки webview (в `Telegram settings => Advanced => Experimental settings => Enable webview inspecting`) -2. Нажмите **F12**, затем перейдите на вкладке консоль -3. Скопируйте **Authorization** и введите ее в программу - -**Я не несу ответственности за блокировку вашей учетной записи** - -### Как это работает? - -* При выборе платформы стоит обратить внимание на то с какого устройства вы обычно играете -* Количество повторений это колличество игр которые сделает программа (билетики) -* Количество баллов это то сколько монет вы получите за одну игру (если нажать **Enter** программа выберет рандомное количество от 260 до 280) - -### Установка - -1. Склонируйте репозиторий `git clone https://github.com/provincialcxz/BlumAutoBot.git` -2. Перейдите в папку с проектом -3. Откройте проект в редакторе и запустите - -### Быстрый запуск -* [Релиз](https://github.com/provincialcxz/BlumAutoBot/releases/tag/first) +1. Enable Telegram WebView (`Telegram settings => Advanced => Experimental settings => Enable webview inspecting`) +2. Press **F12** and go to the Network tab ![Network Tab Screenshot](https://i.imgur.com/2sOxffx.png) +3. Make some moves between tabs in blum game to get network logs ![Network Logs Screenshot](https://i.imgur.com/ISSQU3o.png) +4. Select one log and copy **Authorization** Request Header (without Bearer text) ![Authorization Example Screenshot](https://i.imgur.com/jtUcZaR.png) +5. Paste **AccessToken** into .json file in *accounts* folder ![JSON File Example](https://i.imgur.com/bg2kc8y.png)