Skip to content

Commit

Permalink
Added a new Message Spam Project
Browse files Browse the repository at this point in the history
  • Loading branch information
Toheed07 committed Oct 15, 2023
1 parent bcbe2bd commit 8600051
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions projects/Message-Spam/mesaage_spam.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,29 @@
# Import necessary libraries
import random
import pyautogui as pg
import webbrowser as wb
import time

# Define the WhatsApp Web URL
web_url = "https://web.whatsapp.com"

# Open the web browser to the WhatsApp Web URL
wb.open(web_url)

# Wait for 10 seconds to allow the user to log in by scanning the QR code
time.sleep(10)

# List of messages to send
messages = ('Hello', 'Hey', 'Good Morning')

# Send 10 random messages
for _ in range(10):
# Choose a random message from the list
message = random.choice(messages)

# Type and send the message using PyAutoGUI
pg.write(message)
pg.press('enter')

# Pause for a random duration between 1 to 3 seconds
time.sleep(random.uniform(1, 3))

0 comments on commit 8600051

Please sign in to comment.