-
Notifications
You must be signed in to change notification settings - Fork 681
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #532 from Toheed07/Toheed07
Added a new project Message Spam
- Loading branch information
Showing
3 changed files
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
random | ||
pyautogui | ||
webbrowser | ||
time |