Skip to content

Commit

Permalink
Merge pull request #532 from Toheed07/Toheed07
Browse files Browse the repository at this point in the history
Added a new project Message Spam
  • Loading branch information
Mrinank-Bhowmick authored Jan 5, 2024
2 parents b08496a + 8600051 commit 05b30b5
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 0 deletions.
21 changes: 21 additions & 0 deletions projects/Message-Spam/README.md
Original file line number Diff line number Diff line change
@@ -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..
29 changes: 29 additions & 0 deletions projects/Message-Spam/mesaage_spam.py
Original file line number Diff line number Diff line change
@@ -0,0 +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))
4 changes: 4 additions & 0 deletions projects/Message-Spam/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
random
pyautogui
webbrowser
time

0 comments on commit 05b30b5

Please sign in to comment.