From e8facd5a3a7ee47cbe2830d54fe3b7e6c417e1b3 Mon Sep 17 00:00:00 2001 From: Andrea Draghetti Date: Mon, 29 Jan 2024 16:14:32 +0100 Subject: [PATCH] Remove possible keyword "bot" before the token To speed up the analysis of a token and chat, it may be useful to remove the keyword "bot" from the Token API. When doing a copy and paste from the criminal's code, in speed it is easy to copy the whole string. --- TeleGatherer.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/TeleGatherer.py b/TeleGatherer.py index fb9645a..f136caa 100644 --- a/TeleGatherer.py +++ b/TeleGatherer.py @@ -250,6 +250,10 @@ def add_token_and_chat_id_to_file(file_path, bot_token, chat_id): file_path = ".bot-history" # Replace with the actual file path + # Remove possible keyword "bot" before the token + if args.bot_token.startswith("bot"): + args.bot_token = args.bot_token[3:] + if check_file_for_token_and_chat_id(file_path, args.bot_token, args.chat_id): print("Bot token and chat ID pair already exists in the file.") response = input("Are you sure you want to continue? (y/n): ") @@ -258,4 +262,4 @@ def add_token_and_chat_id_to_file(file_path, bot_token, chat_id): else: add_token_and_chat_id_to_file(file_path, args.bot_token, args.chat_id) - main(args.bot_token, args.chat_id) \ No newline at end of file + main(args.bot_token, args.chat_id)