KyranRana / cloudflare-bypass

A new and improved PHP library which bypasses the Cloudflare IUAM page using cURL
MIT License
275 stars 97 forks source link

Error log Help me. #123

Closed DrPaw closed 4 years ago

DrPaw commented 5 years ago

[01-Sep-2019 07:59:38 UTC] PHP Fatal error: Uncaught ErrorException: --> [Captcha] ERROR. captcha page found. No implementation exists for this yet! in /home/betrost/public_html/src/CloudflareBypass/CaptchaPageImpl.php:16 Stack trace:

0 /home/betrost/public_html/src/CloudflareBypass/CFCurlImpl.php(83): CloudflareBypass\CaptchaPageImpl->getClearanceUrl('--> ')

1 /home/betrost/public_html/index.php(39): CloudflareBypass\CFCurlImpl->exec(Resource id #3, Object(CloudflareBypass\Model\UAMOptions))

2 {main}

thrown in /home/betrost/public_html/src/CloudflareBypass/CaptchaPageImpl.php on line 16 [01-Sep-2019 08:00:17 UTC] PHP Parse error: syntax error, unexpected 'private' (T_PRIVATE), expecting '{' in /home/betrost/public_html/src/CloudflareBypass/CFCurlImpl.php on line 22 [01-Sep-2019 08:04:39 UTC] PHP Fatal error: Uncaught ErrorException: --> [Captcha] ERROR. captcha page found. No implementation exists for this yet! in /home/betrost/public_html/src/CloudflareBypass/CaptchaPageImpl.php:16 Stack trace:

0 /home/betrost/public_html/src/CloudflareBypass/CFCurlImpl.php(83): CloudflareBypass\CaptchaPageImpl->getClearanceUrl('--> ')

1 /home/betrost/public_html/index.php(39): CloudflareBypass\CFCurlImpl->exec(Resource id #3, Object(CloudflareBypass\Model\UAMOptions))

2 {main}

thrown in /home/betrost/public_html/src/CloudflareBypass/CaptchaPageImpl.php on line 16 [01-Sep-2019 08:05:24 UTC] PHP Fatal error: Uncaught ErrorException: --> [Captcha] ERROR. captcha page found. No implementation exists for this yet! in /home/betrost/public_html/src/CloudflareBypass/CaptchaPageImpl.php:16 Stack trace:

0 /home/betrost/public_html/src/CloudflareBypass/CFCurlImpl.php(83): CloudflareBypass\CaptchaPageImpl->getClearanceUrl('--> ')

1 /home/betrost/public_html/index.php(39): CloudflareBypass\CFCurlImpl->exec(Resource id #3, Object(CloudflareBypass\Model\UAMOptions))

2 {main}

thrown in /home/betrost/public_html/src/CloudflareBypass/CaptchaPageImpl.php on line 16 [01-Sep-2019 08:05:25 UTC] PHP Fatal error: Uncaught ErrorException: --> [Captcha] ERROR. captcha page found. No implementation exists for this yet! in /home/betrost/public_html/src/CloudflareBypass/CaptchaPageImpl.php:16 Stack trace:

0 /home/betrost/public_html/src/CloudflareBypass/CFCurlImpl.php(83): CloudflareBypass\CaptchaPageImpl->getClearanceUrl('--> ')

1 /home/betrost/public_html/index.php(39): CloudflareBypass\CFCurlImpl->exec(Resource id #3, Object(CloudflareBypass\Model\UAMOptions))

2 {main}

thrown in /home/betrost/public_html/src/CloudflareBypass/CaptchaPageImpl.php on line 16

KyranRana commented 5 years ago

Hi DrPaw. Which site are you requesting?

DrPaw commented 5 years ago

`<?php ini_set("display_errors","0"); header('Access-Control-Allow-Origin: *'); header("Content-type: application/json; charset=utf-8");

include 'src/autoload.php';

use CloudflareBypass\CFCurlImpl; use CloudflareBypass\Model\UAMOptions;

$file = "cache/data.txt"; $ch = curl_init("https://www.ciprobet22.com");

/curl_setopt($ch, CURLOPT_PROXY, '95.0.107.172:8080');/

curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // Want to cache clearance cookies ? curl_setopt($ch, CURLOPT_COOKIEJAR, $file); curl_setopt($ch, CURLOPT_COOKIEFILE, $file);

curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_USERAGENT, "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"); curl_setopt($ch, CURLOPT_POST, true); if($_POST) { curl_setopt($ch, CURLOPT_POSTFIELDS, $_POST); } if($_GET) { curl_setopt($ch, CURLOPT_POSTFIELDS, $_GET); }

$cfCurl = new CFCurlImpl();

$cfOptions = new UAMOptions(); // $cfOptions->setVerbose(true); // Enable verbose // $cfOptions->setDelay(5); // Set delay before requesting clearance // $cfOptions->setExtraHeaders(["header: value"]); // Set extra headers (use this instead of CURLOPT_HTTPHEADER)

$page = $cfCurl->exec($ch, $cfOptions);

// Want to get clearance cookies ? //$cookies = curl_getinfo($ch, CURLINFO_COOKIELIST);

echo $page; `

KyranRana commented 5 years ago

That works for me, can you try pulling down the latest version of master and trying again? Make sure you have verbose mode enabled. And paste all logs on a pastebin and link me to it.

DrPaw commented 5 years ago

I installed the latest version and now I get this error.

you can look at this address. http://betrost.com

KyranRana commented 5 years ago

Hi DrPaw, run the php file through command line with $cfOptions->setVerbose(true) uncommented in your PHP file and send me the logs the script produces.

Paste it into a paste at http://pastebin.com

DrPaw commented 5 years ago

Hi KyranRana as you said, it does not create a log file for me at the moment you can look at the address again.

http://betrost.com

DrPaw commented 5 years ago

`<?php

include 'src/autoload.php';

use CloudflareBypass\CFCurlImpl; use CloudflareBypass\Model\UAMOptions;

$ch = curl_init("https://www.ciprobet22.com");

// Want to cache clearance cookies ? // curl_setopt($ch, CURLOPT_COOKIEJAR, "cookies.txt"); // curl_setopt($ch, CURLOPT_COOKIEFILE, "cookies.txt");

curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_USERAGENT, "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");

$cfCurl = new CFCurlImpl();

$cfOptions = new UAMOptions(); $cfOptions->setVerbose(true); // Enable verbose // $cfOptions->setDelay(5); // Set delay before requesting clearance // $cfOptions->setExtraHeaders(["header: value"]); // Set extra headers (use this instead of CURLOPT_HTTPHEADER)

$page = $cfCurl->exec($ch, $cfOptions);

// Want to get clearance cookies ? // $cookies = curl_getinfo($ch, CURLINFO_COOKIELIST);

echo $page;`

KyranRana commented 5 years ago

What version of PHP is your server running? What version of cURL is your server running? What version of OpenSSL do you have installed on your server?

DrPaw commented 5 years ago

Curl Version: 7.62.0 Php Version 7.2 OpenSSL/1.0.2k

KyranRana commented 5 years ago

Also, are you sure you put the script above onto http://betrost.com ? You should see some logs if you did. Logs are added as echo statements so they should appear in the source code.

DrPaw commented 5 years ago

Hi KyranRana I'll give you ftp information if you want to review there.

KyranRana commented 5 years ago

Sure that would be useful. I'll also try running the same script with your PHP version.

DrPaw commented 5 years ago

It gives such an error after the last update. Error log

`[02-Sep-2019 05:56:52 UTC] PHP Fatal error: Uncaught ErrorException: --> [Captcha] ERROR. captcha page found. No implementation exists for this yet! in /home/betrost/public_html/src/CloudflareBypass/CaptchaPageImpl.php:16 Stack trace:

0 /home/betrost/public_html/src/CloudflareBypass/CFCurlImpl.php(83): CloudflareBypass\CaptchaPageImpl->getClearanceUrl('--> ')

1 /home/betrost/public_html/index.php(28): CloudflareBypass\CFCurlImpl->exec(Resource id #3, Object(CloudflareBypass\Model\UAMOptions))

2 {main}

thrown in /home/betrost/public_html/src/CloudflareBypass/CaptchaPageImpl.php on line 16`

KyranRana commented 4 years ago

Try with version 3.3.0 ?

KyranRana commented 4 years ago

Closed due to inactivity.