Open wordfangsss opened 1 day ago
Hi,
You can create a Python file to extract the OTP. Here's how:
On your VPS, save the script at the bottom of this reply in your games folder as otp.py
:
Run the script on your VPS using this command:
./launch.sh otp
When prompted, select No to updating the settings.
Choose any wallet name or use the default.
Attempt to log into your Telegram account on your preferred device via the phone number and OTP method.
Once the OTP has been sent, go back to your VPS, and select the account from your saved Telegram session.
The VPS will return a message like The most recent OTP was: 12345...
Enter the OTP on your preferred device, and you should be logged back into your Telegram account.
import os
import shutil
import sys
import time
import re
import json
import getpass
import random
import subprocess
from PIL import Image
from pyzbar.pyzbar import decode
import qrcode_terminal
import fcntl
from fcntl import flock, LOCK_EX, LOCK_UN, LOCK_NB
from selenium import webdriver
from selenium.webdriver import ActionChains
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.keys import Keys
from selenium.common.exceptions import NoSuchElementException, TimeoutException, StaleElementReferenceException, ElementClickInterceptedException
from datetime import datetime, timedelta
from selenium.webdriver.chrome.service import Service as ChromeService
from claimer import Claimer
class OTPFinder(Claimer):
def initialize_settings(self):
super().initialize_settings()
self.script = "games/cold.py"
self.prefix = "BNB-Cold:"
self.url = "https://web.telegram.org/k/#777000"
self.pot_full = "Filled"
self.pot_filling = "Mining"
self.seed_phrase = None
self.forceLocalProxy = False
self.forceRequestUserAgent = False
self.start_app_xpath = "//button//span[contains(text(), 'Open Wallet')]"
def __init__(self):
self.settings_file = "variables.txt"
self.status_file_path = "status.txt"
self.wallet_id = ""
self.load_settings()
self.random_offset = random.randint(self.settings['lowestClaimOffset'], self.settings['highestClaimOffset'])
super().__init__()
def next_steps(self):
# Initialise Chrome/Chromium & load the login notification service user (ID 777000)
self.step = "01"
self.driver = self.get_driver()
self.driver.get(self.url)
# Check for the last OTP & Print it
xpath = "(//span[@class='translatable-message'])[last()]"
self.target_element = self.move_and_click(xpath,10, False, "read the last OTP code ", "08", "visible")
OTP = self.monitor_element(xpath, 10, "grab the last OTP")
OTP = self.strip_html_and_non_numeric(OTP)
print(f"The most recent OTP was: {OTP}")
# Close the session
self.quit_driver()
def main():
claimer = OTPFinder()
claimer.run()
if __name__ == "__main__":
main()
Hi,
You can create a Python file to extract the OTP. Here's how:
- On your VPS, save the script at the bottom of this reply in your games folder as
otp.py
:- Run the script on your VPS using this command:
./launch.sh otp
- When prompted, select No to updating the settings.
- Choose any wallet name or use the default.
- Attempt to log into your Telegram account on your preferred device via the phone number and OTP method.
- Once the OTP has been sent, go back to your VPS, and select the account from your saved Telegram session.
- The VPS will return a message like
The most recent OTP was: 12345...
- Enter the OTP on your preferred device, and you should be logged back into your Telegram account.
import os import shutil import sys import time import re import json import getpass import random import subprocess from PIL import Image from pyzbar.pyzbar import decode import qrcode_terminal import fcntl from fcntl import flock, LOCK_EX, LOCK_UN, LOCK_NB from selenium import webdriver from selenium.webdriver import ActionChains from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.chrome.service import Service from selenium.webdriver.chrome.options import Options from selenium.webdriver.common.keys import Keys from selenium.common.exceptions import NoSuchElementException, TimeoutException, StaleElementReferenceException, ElementClickInterceptedException from datetime import datetime, timedelta from selenium.webdriver.chrome.service import Service as ChromeService from claimer import Claimer class OTPFinder(Claimer): def initialize_settings(self): super().initialize_settings() self.script = "games/cold.py" self.prefix = "BNB-Cold:" self.url = "https://web.telegram.org/k/#777000" self.pot_full = "Filled" self.pot_filling = "Mining" self.seed_phrase = None self.forceLocalProxy = False self.forceRequestUserAgent = False self.start_app_xpath = "//button//span[contains(text(), 'Open Wallet')]" def __init__(self): self.settings_file = "variables.txt" self.status_file_path = "status.txt" self.wallet_id = "" self.load_settings() self.random_offset = random.randint(self.settings['lowestClaimOffset'], self.settings['highestClaimOffset']) super().__init__() def next_steps(self): # Initialise Chrome/Chromium & load the login notification service user (ID 777000) self.step = "01" self.driver = self.get_driver() self.driver.get(self.url) # Check for the last OTP & Print it xpath = "(//span[@class='translatable-message'])[last()]" self.target_element = self.move_and_click(xpath,10, False, "read the last OTP code ", "08", "visible") OTP = self.monitor_element(xpath, 10, "grab the last OTP") OTP = self.strip_html_and_non_numeric(OTP) print(f"The most recent OTP was: {OTP}") # Close the session self.quit_driver() def main(): claimer = OTPFinder() claimer.run() if __name__ == "__main__": main()
showing error like this
i check the logs error showing like this
Traceback (most recent call last):
File "/root/HotWalletBot/games/seed.py", line 268, in
Traceback (most recent call last):
File "/root/HotWalletBot/games/seed.py", line 268, in
so i think the sessions is not active again right?
My Telegram account has been logged out on all devices, and I no longer have access to the phone number to request OTP. However, I checked on my VPS, and it turns out that my Telegram session in Selenium is still running and has not been logged out. To ensure that the session is still active, I tried running one of the Telegram games like ./launch.sh seed and logged in using the Telegram session that I had previously backed up when I first ran the script. Now, the question is, how can I log in again to my Telegram app on my device?