2018-04-18 19:14:57 +03:00
|
|
|
from selenium import webdriver
|
|
|
|
import os
|
2020-03-19 19:51:32 +03:00
|
|
|
from webdriver_manager.chrome import ChromeDriverManager #1st changer
|
2018-04-18 19:14:57 +03:00
|
|
|
def banner():
|
|
|
|
print('''
|
|
|
|
## ## ======= #### #### #### =======
|
|
|
|
\ \ #### / / # # ## ## / /\ \ / /\ \ # #
|
|
|
|
\ \ / /\ \ / / #====== ## ## / / \ \/ / \ \ #======
|
|
|
|
\ \/ / \ \/ / # # ## ## / / #### \ \ # #
|
|
|
|
#### #### ======= #### ## ## =======
|
|
|
|
''')
|
|
|
|
def main():
|
2020-03-19 19:51:32 +03:00
|
|
|
driver = webdriver.Chrome(ChromeDriverManager().install()) #2nd change
|
2018-04-18 19:14:57 +03:00
|
|
|
driver.get('https://web.whatsapp.com/')
|
|
|
|
|
|
|
|
name = input('Enter the name of user or group: ')
|
|
|
|
msg = input('Enter your message: ')
|
|
|
|
count = int(input('Enter the count: '))
|
|
|
|
|
|
|
|
input('Enter any key after scanning QR code')
|
|
|
|
|
|
|
|
user = driver.find_element_by_xpath('//span[@title = "{}"]'.format(name))
|
|
|
|
user.click()
|
2019-11-11 09:37:15 +03:00
|
|
|
|
|
|
|
# The classname of message box may vary.
|
2020-09-15 19:03:48 +03:00
|
|
|
msg_box = driver.find_element_by_xpath('//*[@id="main"]/footer/div[1]/div[2]/div/div[2]')
|
2018-04-18 19:14:57 +03:00
|
|
|
|
|
|
|
for i in range(count):
|
|
|
|
msg_box.send_keys(msg)
|
2019-11-11 09:37:15 +03:00
|
|
|
# The classname of send button may vary.
|
2020-09-15 19:03:48 +03:00
|
|
|
button = driver.find_element_by_xpath('//*[@id="main"]/footer/div[1]/div[3]/button')
|
2018-04-18 19:14:57 +03:00
|
|
|
button.click()
|
|
|
|
print('Bombing Complete!!')
|
|
|
|
|
|
|
|
banner()
|
2020-09-15 19:03:48 +03:00
|
|
|
main()
|