KyranRana / cloudflare-bypass

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

'CloudflareBypass\CFCurlImpl' not found #134

Closed snout closed 5 years ago

snout commented 5 years ago

I'm trying the example, after having used composer to install. Php newbie, totally.

$ php7.0 curlbypass # [which is the main README.md example] PHP Fatal error: Uncaught Error: Class 'CloudflareBypass\CFCurlImpl' not found in /var/tmp/curlbypass:18 Stack trace:

0 {main}

thrown in /var/tmp/curlbypass on line 18

PHP 7.0+49 debian "7.0.33-0+deb9u3" libcurl3 7.52.1-5+deb9u9 openssl 1.1.0j-1~deb9u1

Laky-64 commented 5 years ago

Fatal error: Uncaught Error: Class 'CloudflareBypass\CFCurlImpl' not found , idm, I get the same error, I installed everything with composer

ghost commented 5 years ago

Try setting the full path to the autoload.php file?

Laky-64 commented 5 years ago

what do you mean? The autoload finds it for me

snout commented 5 years ago

Also and uuh, since this is the first time ever I've even used composer (whatever it's really for), where do I find the files such as autoload and tell the main program to use it?

..okay, a quick google later, I included "require 'Composer/autoload.php';" at the top of the test program, and now it loads the cloudflare page, but doesn't go past the 5-second wait, just returns a "HTTP/1.1 503 Service Temporarily Unavailable". But it does run and returns that first CF page now, yes.

(Meanwhile I found cfscrape (python) that does what I want - connect site, wait out the CF timer in im-under-attack-mode, hands back cookie and user-agent string for reuse in cURL, wget or any other non-CF-aware program. As apparently, from cfscrape's documentation, the cookie and user-agent must be the same in subsequent requests, so it's printed out for easy inclusion in the cURL command line.)

Laky-64 commented 5 years ago

i solved with service apache2 restart

Laky-64 commented 5 years ago

You must first create a folder on your server, then install the Kyranrana library using composer, then restart apache, then download the extension created by kyranrana from github and take all the files contained in the scr / main folder, and put them in the folder that you had previously created to install composer and then restart apache again

ghost commented 5 years ago

So much effort. All I do is download the zip and upload to a folder. CD to the folder containing the .json file and run "composer install" and its done

snout commented 5 years ago

You must first create a folder on your server, then install the Kyranrana library using composer, then restart apache, then download the extension created by kyranrana from github and take all the files contained in the scr / main folder, and put them in the folder that you had previously created to install composer and then restart apache again

Ohgod. >.< I don't even have apache installed, just a lighttpd for basic serving needs. This is growing way too big to be worth it for me. :p

ghost commented 5 years ago

Its actually alot simpler than wavdevteam is making out. Don't be put off contact me and I'll help you

snout commented 5 years ago

Thanks but nah- cfscraper already does the job for me.

ghost commented 5 years ago

Yeah php isn't really the framework for this job.