KyranRana / cloudflare-bypass

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

error 403 and "Call to a member function getDataType() on null" on domain redirect #162

Open momala454 opened 4 years ago

momala454 commented 4 years ago

Hello, when scrapping this url https://www.extreme-down.xyz/rss.xml which redirect to https://www.extreme-down.ninja/rss.xml it doesn't work

[INFO] UAM (retry: 0) -> applying HTTPS settings [INFO] UAM (retry: 0) -> waiting for 5 seconds! [INFO] UAM (retry: 0) -> getting form params... [INFO] UAM (retry: 0) -> (r param: 3f8.........lb) [INFO] UAM (retry: 0) -> (jschl_vc param: 728e75.....756f7a1348) [INFO] UAM (retry: 0) -> (pass param: 15788.......RIew/) [INFO] UAM (retry: 0) -> (jschl_answer param: 2..........502) [INFO] UAM (retry: 1) -> applying HTTPS settings [INFO] UAM (retry: 1) -> waiting for 5 seconds! [INFO] UAM (retry: 1) -> getting form params...

then it redirect and the html is

<html>
<head><title>403 Forbidden</title></head>
<body>
<center><h1>403 Forbidden</h1></center>
<hr><center>cloudflare</center>
</body>
</html>

if i directly do the request on the new url (https://www.extreme-down.ninja/rss.xml) it works without problem

the line number may not match exactly as i modified the code to show the html

Notice: Undefined offset: 1 in .../CloudflareBypass/vendor/kyranrana/cloudflare-bypass/src/main/Model/UAM/UAMPageFormParams.php on line 39

Notice: Undefined offset: 1 in .../CloudflareBypass/vendor/kyranrana/cloudflare-bypass/src/main/Model/UAM/UAMPageFormParams.php on line 40

Notice: Undefined offset: 1 in .../CloudflareBypass/vendor/kyranrana/cloudflare-bypass/src/main/Model/UAM/UAMPageFormParams.php on line 41

Notice: Undefined offset: 1 in .../CloudflareBypass/vendor/kyranrana/cloudflare-bypass/src/main/Model/UAM/UAMPageChallengeCode.php on line 54

Notice: Undefined offset: 2 in .../CloudflareBypass/vendor/kyranrana/cloudflare-bypass/src/main/Model/UAM/UAMPageChallengeCode.php on line 54

Fatal error: Uncaught Error: Call to a member function getDataType() on null in .../CloudflareBypass/vendor/kyranrana/cloudflare-bypass/src/main/Model/UAM/UAMPageFormParams.php:68

KyranRana commented 4 years ago

Try with version 3.4.0 ?

momala454 commented 4 years ago

i don't think there is any reason to already drop php 7.0 support, i'm using a debian version that is still supported and which have php7.0