From 860005117f6c891c741fbf226a9f8af91b9f44e3 Mon Sep 17 00:00:00 2001 From: Toheed07 Date: Sun, 15 Oct 2023 13:45:32 +0530 Subject: [PATCH] Added a new Message Spam Project --- projects/Message-Spam/mesaage_spam.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/projects/Message-Spam/mesaage_spam.py b/projects/Message-Spam/mesaage_spam.py index b86ea306e..162b1e9ce 100644 --- a/projects/Message-Spam/mesaage_spam.py +++ b/projects/Message-Spam/mesaage_spam.py @@ -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))