Skip to content

Commit

Permalink
Update Moriarty.py
Browse files Browse the repository at this point in the history
Fixed Truecaller XPath Mismatch
  • Loading branch information
LukeTeaKirk authored Apr 29, 2021
1 parent f861f45 commit 1cb4c7c
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions Moriarty.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,24 +59,22 @@ def microsoft_mail(phone_number,username,password):
driver.get("https://www.truecaller.com/auth/sign-in")
WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.XPATH, "/html/body/div/main/div/a[2]"))).click()
WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.NAME, "loginfmt"))).send_keys(username)
WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.XPATH, "/html/body/div/form[1]/div/div/div[2]/div/div/div[1]/div[2]/div[2]/div/div/div/div[4]/div/div/div/div[2]/input"))).click()
WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.XPATH, "/html/body/div/form[1]/div/div/div/div[2]/div/div/div[1]/div[3]/div/div/div/div[4]/div/div/div/div[2]/input"))).click()



try:
WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.NAME, "passwd"))).send_keys(password)
WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.XPATH, "/html/body/div/form[1]/div/div/div[2]/div/div/div[1]/div[2]/div[2]/div/div[2]/div/div[3]/div[2]/div/div/div/div/input"))).click()
WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.XPATH, "/html/body/div/form[1]/div/div/div/div[2]/div/div/div[1]/div[3]/div/div[2]/div/div[3]/div[2]/div/div/div/div/input"))).click()
#WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.XPATH, "/html/body/div[1]/div/div/div[2]/div/div[1]/div[2]/div/div[2]/div/form/div/div/div/div[2]/input"))).click() Only run on first execution w microsoft account
time.sleep(5)


WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.XPATH, "/html/body/div/nav/div/form/input"))).send_keys(phone_number)
time.sleep(1)
WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.XPATH, "/html/body/div/nav/div/form/button"))).click()



try:
name=WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.XPATH, "/html/body/div[1]/main/div/div[1]/div[1]/header/div[2]/h1"))).text
name=WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.XPATH, "/html/body/div[1]/main/div/div[1]/div[1]/header/div[2]/h1/span"))).text
owner_of_number=name
print(colored.green("[+]Owner Of The Number:")+colored.blue(owner_of_number))
driver.quit()
Expand Down Expand Up @@ -193,4 +191,3 @@ def sync(phone_number):
deep_info_three(options.phone_number)
print(colored.yellow("-"*50))


0 comments on commit 1cb4c7c

Please sign in to comment.