0

I use tor to access casperjs via this socks proxy my OS windows 10 x64

my test.js

var casper = require('casper').create({
verbose: true,
logLevel: 'error',
pageSettings: {
    loadImages: false, // The WebPage instance used by Casper will
    loadPlugins: false, // use these settings
    userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36'
    }
});
var caturl = ('http://www.test.com');
casper.start(caturl, function() {
    this.echo(this.getTitle());
});
casper.run();

result from my local machine

casperjs test.js
This Is Page Title

when open tor, and I'm sure its working fine also the socks proxy is working tested it before

casperjs  --proxy=127.0.0.1:9150 --proxy-type=socks5 test.js
Attention Required! | Cloudflare

the result as I see, that its want to solve recaptcha to open this site from cloudflare

BUT

when I open the tor browser, and open the link tested in casperjs, its open normally without any asking for recaptcha

WHY when open the link with casperjs ask for recaptcha , and when open the link with tor browser (same proxy IP used) it doesn't ask for recaptcha ?

is this related with useragent or what ?

ezak
  • 133
  • 1
  • 1
  • 9
  • It's usually based on the IP. Are you sure your Tor browser doesn't have cloudflare's cookie saying you already passed verification? – drew010 Feb 02 '17 at 19:10
  • threre is nothing happened while loading page with tor browser , its just open the page directly in 2 second or 3 only, also when open cookies from tor, there is nothing in it related to cloudflare or the website tested – ezak Feb 03 '17 at 06:56
  • There are ways to identify PhantomJS even with custom useragent. http://engineering.shapesecurity.com/2015/01/detecting-phantomjs-based-visitors.html Given that this is Cloudflare's bread abd butter I wouldn't be surprised if they implemented those techniques. – Vaviloff Feb 05 '17 at 03:51
  • Is there anyway to take this off to scrap website using cloudflare under attack mode with casperjs or any similar (with click ability) over tor proxy – ezak Feb 06 '17 at 05:35

0 Answers0