-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbot.py
37 lines (29 loc) · 1.32 KB
/
bot.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
from datetime import datetime
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.common.exceptions import NoSuchElementException
from time import sleep
import chardet
driver = webdriver.Firefox()
driver.get('http://web.whatsapp.com')
sleep(15)
driver.find_element_by_xpath("/html/body/div/div/div/div/div/div/div[1]/div/div/div[1]/div/div/div").click()
sleep(5)
fileLocation= "Path/KEYINS.txt"
with open(fileLocation,"r") as file:
for line in file:
driver.find_element_by_xpath("//*/footer/div[1]/div[2]/div/div[2]").send_keys(line)
driver.find_element_by_xpath("//*/footer/div[1]/div[2]/div/div[2]").send_keys(Keys.ENTER)
sleep(5)
fileLocation= "Path/AESKEY.txt"
with open(fileLocation,"r") as file:
for line in file:
driver.find_element_by_xpath("//*/footer/div[1]/div[2]/div/div[2]").send_keys(line)
driver.find_element_by_xpath("//*/footer/div[1]/div[2]/div/div[2]").send_keys(Keys.ENTER)
sleep(5)
fileLocation= "Path/AES.txt"
with open(fileLocation,"r") as file:
for line in file:
for word in line.split(" "):
driver.find_element_by_xpath("//*/footer/div[1]/div[2]/div/div[2]").send_keys(word)
driver.find_element_by_xpath("//*/footer/div[1]/div[2]/div/div[2]").send_keys(Keys.ENTER)