0

I have problem on site where email is under obfuscator. When i run my program i get output:

The email is:{"success":"","code":1,"msg":"ReCAPTCHA"}

But when i want click 'watch email' on computer all is fine and i get:

The email is:{"success":"","code":0,"msg":"xxxx@gmail.com"}

Code in POST:

REQUEST HEADERS

Accept: application/json, text/javascript, */*; q=0.01
Accept-Encoding: gzip, deflate, br
Accept-Language: pl-PL,pl;q=0.9,en-US;q=0.8,en;q=0.7
Connection: keep-alive
Content-Length: 141
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Cookie: SOOOME COOKIES.
Host: https://xxxxxxx.com
Origin: https://xxxxxxx.com
Referer: https://xxxxxxx.com/asas
User-Agent: Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Mobile Safari/537.36
X-Requested-With: XMLHttpRequest

QUERY STRING PARAMETRS
decode: 

FORM DATA
hash: YToyOntpOjA7czo0NDoidHh3VFlXck83eFdza1FRUWgydUlvb0MveHRRemNLaCtNa3BuenVJU0VmUT0iO2k6MTtzOjE2OiK3SJ7OlhTa5DgPfA1YqCfRIjt9
type: ademail


And here is my code:

import requests 
url = "https://xxxxx.com/_ajax/obfuscator/?decode"
headers = {
    'User-Agent':'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Mobile Safari/537.36',
    'Accept': 'application/json, text/javascript, */*; q=0.01',
    'Accept-Encoding': 'gzip, deflate, br',
    'Accept-Language': 'pl-PL,pl;q=0.9,en-US;q=0.8,en;q=0.7',
    'Connection': 'keep-alive',
    'Content-Length': '141',
    'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
    'Host': 'https://xxxxx.com/',
    'Origin': 'https://xxxxx.com/',
    'Referer':'https://xxxxx.com/asd',
    'X-Requested-With':'XMLHttpRequest' }

data = {'hash':'YToyOntpOjA7czo0NDoiQStHbXkrY2p1dllrUmlXSWdWTjdNbHF2Y3cyak13QU5GeUtaQXZReFcrbz0iO2k6MTtzOjE2OiJ7Byq7O88ydxCtVWgoEETOIjt9',  
        'type':'adsemail'} 

r = requests.post(url, data, headers) 
pastebin_url = r.text 
print("The email is:%s"%pastebin_url) 

I also try do it the same as Webdriver

driver = webdriver.Chrome("C:/Users/User/Desktop/Email/chromedriver.exe")
driver.set_page_load_timeout(5000)
driver.get("https://xxxx.com/asd")
driver.implicitly_wait(3000)
sleep(1)
RODO = "//input[@class='btn btn-confirm']"
driver.find_element_by_xpath(RODO).click()
sleep(7)
email = "//span[@class='click_to_show']"
driver.find_element_by_xpath(email).click()

But i get Recaptcha to do.... ;/

Where is the problem?

I also try:

``` user_agent = 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.50 Safari/537.36'
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument('user-agent={0}'.format(user_agent))

driver = webdriver.Chrome("C:/Users/User/Desktop/Email/chromedriver.exe")
driver.set_page_load_timeout(5000)  

But not working, site want captcha ;/

Myster
  • 29
  • 6
  • Have you tried to update the user-agent field for the selenium chrome browser? Have a look here for [details](https://stackoverflow.com/a/54433282/6657098) on avoiding detection while automating – cullzie Feb 08 '19 at 02:05
  • Edited up! I gonna also try add this, but site want captcha ;/ – Myster Feb 08 '19 at 02:35

0 Answers0