From bcbe2bdcfcb5b2739d30d615bd3545a5749e96a1 Mon Sep 17 00:00:00 2001 From: Toheed07 Date: Sun, 15 Oct 2023 13:36:07 +0530 Subject: [PATCH 1/2] Added a new Message Spam Project --- projects/Message-Spam/README.md | 21 +++++++++++++++++++++ projects/Message-Spam/mesaage_spam.py | 19 +++++++++++++++++++ projects/Message-Spam/requirements.txt | 4 ++++ 3 files changed, 44 insertions(+) create mode 100644 projects/Message-Spam/README.md create mode 100644 projects/Message-Spam/mesaage_spam.py create mode 100644 projects/Message-Spam/requirements.txt diff --git a/projects/Message-Spam/README.md b/projects/Message-Spam/README.md new file mode 100644 index 000000000..42f980c50 --- /dev/null +++ b/projects/Message-Spam/README.md @@ -0,0 +1,21 @@ +# WhatsApp Random Message Sender + +## Usage + +1. Install required libraries: + +- `pip install -r requirements.txt` + +2. Run the script: + ``` + python mesaage_spam.py + ``` + +3. Follow on-screen instructions to log in to WhatsApp Web. + +4. The script will send random messages to the current chat. + +## Customization + +- Edit the `messages` variable to change the list of messages to send. +- Adjust the sleep interval for message timing.. \ No newline at end of file diff --git a/projects/Message-Spam/mesaage_spam.py b/projects/Message-Spam/mesaage_spam.py new file mode 100644 index 000000000..b86ea306e --- /dev/null +++ b/projects/Message-Spam/mesaage_spam.py @@ -0,0 +1,19 @@ +import random +import pyautogui as pg +import webbrowser as wb +import time + +web_url = "https://web.whatsapp.com" +wb.open(web_url) + +time.sleep(10) + +messages = ('Hello', 'Hey', 'Good Morning') + +for _ in range(10): + message = random.choice(messages) + + pg.write(message) + pg.press('enter') + + time.sleep(random.uniform(1, 3)) diff --git a/projects/Message-Spam/requirements.txt b/projects/Message-Spam/requirements.txt new file mode 100644 index 000000000..b63b4631c --- /dev/null +++ b/projects/Message-Spam/requirements.txt @@ -0,0 +1,4 @@ +random +pyautogui +webbrowser +time \ No newline at end of file From 860005117f6c891c741fbf226a9f8af91b9f44e3 Mon Sep 17 00:00:00 2001 From: Toheed07 Date: Sun, 15 Oct 2023 13:45:32 +0530 Subject: [PATCH 2/2] 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))