Skip to content

Instantly share code, notes, and snippets.

@Logic2apply
Created June 30, 2023 11:25
Show Gist options
  • Save Logic2apply/7f05b019f0bd298d048466f935a1d616 to your computer and use it in GitHub Desktop.
Save Logic2apply/7f05b019f0bd298d048466f935a1d616 to your computer and use it in GitHub Desktop.
Send multiple messages from whatsapp web at one click.
import pyautogui
import webbrowser as wb
import time
import hashlib
usrInp = int(input("\nSend Messages to:\n\t1. Chat\n\t2. Group\n: "))
if usrInp == 1:
countryCode = str(input("\nEnter Country Code:\n: "))
phoneNo = int(input("\nEnter Phone Number:\n: "))
phone = f"{countryCode}{phoneNo}"
url = f"https://web.whatsapp.com/send?phone={phone}"
elif usrInp == 2:
url = str(input("\nEnter Group URL:\n: "))
url = url.replace("https://chat.whatsapp.com/", "https://web.whatsapp.com/accept?code=") # Replaces the group invite link to whatsapp web link
else:
print("\nInvalid Input*`!!")
exit()
iterations = int(input("\nEnter No of Iterations:\n: "))
message = str(input("\nEnter Message:\n: "))
wb.open(url)
time.sleep(25)
# For sending fake hacking messages
# for i in range(iterations+1):
# if i != iterations:
# msg = f"{i+1}.{message} with data hash: "
# else:
# msg = f"Account Hacked Successfully with data hash: "
# hashcd = hashlib.sha256(msg.encode())
# hashmsg = f"{msg} *{hashcd.hexdigest()}*"
# pyautogui.write(hashmsg)
# pyautogui.press("enter")
# For sending casual messages
for i in range(iterations+1):
msg = f"{i+1}.{message} with data hash: "
pyautogui.write(msg)
pyautogui.press("enter")
print("\nYour Work Done...")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment