Advertisement
N3ll4

Untitled

May 20th, 2023 (edited)
2,189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.41 KB | Source Code | 0 0
  1. from pyrogram import Client
  2. from faker import Faker
  3. import time
  4. import random
  5. import locale
  6.  
  7. fake = Faker('ru_RU')  # Faker mit ru_RU-Locale initialisieren
  8.  
  9. BOT_NAME = "@contractMObot"
  10. app = Client("spam", api_id=, api_hash="")
  11. print("Wie viele Durchgänge soll ich machen?")
  12. count = int(input(">>> "))
  13.  
  14. def run():
  15.     with app:
  16.         # Start the conversation
  17.         app.send_message(BOT_NAME, "/start")
  18.         time.sleep(2)  # Let the bot respond
  19.  
  20.         # Agree to the terms
  21.         app.send_message(BOT_NAME, "Согласен")
  22.         time.sleep(2)
  23.  
  24.         # Send the fake name
  25.         app.send_message(BOT_NAME, fake.name())
  26.         time.sleep(2)
  27.  
  28.         # Send a random age
  29.         app.send_message(BOT_NAME, str(random.randint(18, 70)))
  30.         time.sleep(2)
  31.  
  32.         # Send the fake address
  33.         app.send_message(BOT_NAME, fake.address())
  34.         time.sleep(2)
  35.  
  36.         # Send the fake phone number
  37.         app.send_message(BOT_NAME, f"+7 (946) 464-64-64")
  38.         time.sleep(2)
  39.  
  40.         # Send the fake email
  41.         app.send_message(BOT_NAME, fake.email())
  42.         time.sleep(2)
  43.  
  44.         # Confirm the correctness
  45.         app.send_message(BOT_NAME, 'Да, все верно')
  46.  
  47. for i in range(count):
  48.     run()
  49.     if (i + 1) % 100 == 0:
  50.         print(f"Durchgang {i+1} abgeschlossen. Pause für 5 Minuten...")
  51.         time.sleep(300)  # Pause für 5 Minuten (300 Sekunden)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement