Open nitemare opened 4 years ago
You're using a deprecated version of cloudflare-bypass
as you're using an old deprecated version (3.3.0). As @KyranRana is currently not using a stable tag release process (cf #157 ), the only possible way for you to use the actual latest with composer is to depend on jaymoulin/cloudflare-bypass
instead of kyranrana/cloudflare-bypass
. Another possible way is to download the actual master branch and paste all the codebase in your vendor folder. (cf https://github.com/KyranRana/cloudflare-bypass/issues/164#issuecomment-599148216)
Once again, I'm not happy with this (hopfully temporary) solution but this is the only way I found to unstuck this situation.
You're using a deprecated version of
cloudflare-bypass
as you're using an old deprecated version (3.3.0). As @KyranRana is currently not using a stable tag release process (cf #157 ), the only possible way for you to use the actual latest with composer is to depend onjaymoulin/cloudflare-bypass
instead ofkyranrana/cloudflare-bypass
. Another possible way is to download the actual master branch and paste all the codebase in your vendor folder. (cf #164 (comment))Once again, I'm not happy with this (hopfully temporary) solution but this is the only way I found to unstuck this situation.
If you read my post, i twice stated that i downloaded the zip, and overwrote the files with the newer one, i have the same files that are found by clicking 'Download Zip' under 'Clone or Download' on this page: https://github.com/KyranRana/cloudflare-bypass
Further, i get the same results using jaymoulin/cloudflare-bypass
I have installed with composer, as well as downloaded the zip and copied the files over the composer-version files.
Note: I've updated fully with composer and those files show as modified in September, 2019, I tested both scenarios, and got the above results. I then downloaded the latest commit zip file, with files updated today, and copied those overtop, tested both scenarios again
I read your post. I suggested this because your version indicates 3.3.0
which is not the latest version.
You can see here https://github.com/KyranRana/cloudflare-bypass/runs/531659676, here https://github.com/KyranRana/cloudflare-bypass/suites/544653472/artifacts/3335930, and here https://github.com/KyranRana/cloudflare-bypass/blob/master/src/test/FunctionalTest.php#L30 that the actual version is working for CF clearance page.
As explained in both code and your reported error, [ERROR] Captcha (retry: 1) -> not supported! Unknown error -> Captcha page is not supported!
Also, please keep in mind I'm trying to help you and I don't think attitude will cheer people to help.
try to reorder the headers, you have
"Upgrade-Insecure-Requests: 1",
"User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36",
"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3",
"Accept-Language: en-US,en;q=0.9"
do
"Accept-Language: en-US,en;q=0.9",
"User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36",
"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3",
"Upgrade-Insecure-Requests: 1",
I'm not trying to give you attitude, but i am understandably frustrated that i have manually copied all files from the zip file, and installed them in the vendor folder, making it the latest version, and yet you tell me its not? and don't tell me where a newer version would be, i don't see how i could have an 'old deprecated version'
I also have the same issues with using jaymoulin/cloudflare-bypass
@momala454 Thanks for the suggestion, i just tried that and got the same result
test using the code from https://github.com/KyranRana/cloudflare-bypass/blob/master/src/test/FunctionalTest.php#L30
test using the code from https://github.com/KyranRana/cloudflare-bypass/blob/master/src/test/FunctionalTest.php#L30
I've copied and pasted it, and used the below as the final code
require "{Home Path}/libraries/vendor/autoload.php";
use CloudflareBypass\CFCurlImpl;
use CloudflareBypass\Model\UAMOptions;
$url = "https://torrentz2.eu/";
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLINFO_HEADER_OUT, true);
curl_setopt($ch, CURLOPT_HTTPHEADER,
array(
'Accept-Language: *',
'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:54.0) Gecko/20100101 Firefox/54.0',
'Accept: */*',
'Upgrade-Insecure-Requests: 1'
));
$cfCurl = new CFCurlImpl();
$cfOptions = new UAMOptions();
try {
$page = $cfCurl->exec($ch, $cfOptions);
} catch (ErrorException $ex) {
echo "Unknown error -> " . $ex->getMessage();
}
Edit: forgot to mention, the above code still returns error 'Unknown error -> Captcha page is not supported!'
if you have a captcha it means your ip is blacklisted
Sorry guys I am going to tag the most recent commit of this project version 3.4.0. Big thanks to @jaymoulin
I'm still getting errors that have been reported in issues that were closed. I am using the latest commit available. I have installed with composer, as well as downloaded the zip and copied the files over the composer-version files.
Issue Depending only on the HTTP Headers used, I am getting one of 2 errors, and I cannot successfully retrieve the site. Those errors are:
or
See below for full output and setup
Scenario 1
To test this out, I have been using the CFCurlTest.php example. (see details below for example code)
If I use it as-is, only changing the url to:
and using the existing headers (see below details)
Results of Scenario 1 This will return NULL for $page and the Verbose error is:
See details below for Verbose Output
Scenario 2
I attempted to troubleshoot myself, making sure i had all the headers it asks for, and copied the user-agent i had working on v2, It no longer says its not supported, but it appears the clearance cookie never gets received. Once again using the CFCurlTest.php example:
Again, changing the url to:
and using the my updated headers (see below details)
Results of Scenario 2 This too will return NULL for $page. Occasionally i have gotten the cloudflare challange page, but mostly its NULL. This is the Verbose Error:
See details below for Verbose Output
Additional information you deem important (e.g. issue happens only occasionally): This issue has been posted before, to which either it goes ignored, or someone replies "that site works for me" and the issue is ignored or assumed fixed.
I understand it may be a setup issue, rather than a bug, but i'm using the stock example, so something isn't as it should be
Version you are using (you may find this information in your
composer.lock
file)Note: I've updated fully with composer and those files show as modified in September, 2019, I tested both scenarios, and got the above results. I then downloaded the latest commit zip file, with files updated today, and copied those overtop, tested both scenarios again
PHP Version you are using