cloudflare-bypass icon indicating copy to clipboard operation
cloudflare-bypass copied to clipboard

Call to a member function getDataType() on null

Open kacperkwapisz opened this issue 4 years ago • 18 comments

So yesterday the script worked but now it's showing this issue, I tried to somehow fix it but without looking into your code. I really need help because I'm a owner of a big site with big traffic & this issue is so disturbing my users.

[22-Apr-2020 10:06:21 Europe/Berlin] PHP Fatal error:  Uncaught Error: Call to a member function getDataType() on null in /path/vendor/kyranrana/cloudflare-bypass/src/main/Model/UAM/UAMPageFormParams.php:67
Stack trace:
#0 /path/vendor/kyranrana/cloudflare-bypass/src/main/Model/UAM/UAMPageFormParams.php(41): CloudflareBypass\Model\UAM\UAMPageFormParams::getJschlAnswerFromPage(Object(CloudflareBypass\Model\UAM\UAMPageAttributes))
#1 /path/vendor/kyranrana/cloudflare-bypass/src/main/Model/UAM/UAMPageAttributes.php(55): CloudflareBypass\Model\UAM\UAMPageFormParams::getParamsFromPage(Object(CloudflareBypass\Model\UAM\UAMPageAttributes))
#2 /path/vendor/kyranrana/cloudflare-bypass/src/main/CFCurlImpl.php(146): CloudflareBypass\Model\UAM\UAMPageAttributes->__construct('https', 'cda-hd.cc', '<!DOCTYPE HTML>...')
#3 /path/vendor/kyranrana/cloudflare-bypass/src/main/CFCurlImpl.php(96): CloudflareBypass\CFCurlImpl->bypassIUAMPage(Resource id #23, '<!DOCTYPE HTML>...', Array, 0, Object in /path/vendor/kyranrana/cloudflare-bypass/src/main/Model/UAM/UAMPageFormParams.php on line 67

I'm using PHP version 7.3 btw.

kacperkwapisz avatar Apr 22 '20 08:04 kacperkwapisz

same here.!

neverknoww avatar Apr 22 '20 11:04 neverknoww

Same here too :)

ryosensei avatar Apr 23 '20 20:04 ryosensei

yeah, i would like some beta test ;)

momala454 avatar Apr 24 '20 17:04 momala454

solved or not please ?

KabDeveloper avatar Apr 26 '20 22:04 KabDeveloper

Some code changes that allow you to generate an answer that cf considers incorrect:

  1. File UAMPageFormParams.php Line 33: preg_match('/name="jschl_vc" value="([^"]+)"/', $page, $jschlVcMatches); New code: preg_match('/value="(\w+)"\sid="\S+"\sname="jschl_vc"/', $page, $jschlVcMatches);

  2. File UAMPageChallengeCode.php Line 42: $code = trim(substr($code, 0, strpos($code, "}, 4000);"))); Two line of new code: preg_match("/},(\s|)\d+\);/", $code, $matches); $code = trim(substr($code, 0, strpos($code, $matches[0])));

vvpgrp avatar May 02 '20 18:05 vvpgrp

Some code changes that allow you to generate an answer that cf considers incorrect:

  1. File UAMPageFormParams.php Line 33: preg_match('/name="jschl_vc" value="([^"]+)"/', $page, $jschlVcMatches); New code: preg_match('/value="(\w+)"\sid="\S+"\sname="jschl_vc"/', $page, $jschlVcMatches);
  2. File UAMPageChallengeCode.php Line 42: $code = trim(substr($code, 0, strpos($code, "}, 4000);"))); Two line of new code: preg_match("/},(\s|)\d+\);/", $code, $matches); $code = trim(substr($code, 0, strpos($code, $matches[0])));

still got the same error

kacperkwapisz avatar May 02 '20 18:05 kacperkwapisz

@vvpgrp If we make that changes, we will get a working script ? is it a fix ?

Thank you

KabDeveloper avatar May 02 '20 18:05 KabDeveloper

@vvpgrp If we make that changes, we will get a working script ? is it a fix ?

Thank you

No, this is not a full fix! This is only part of the changes to get a working script!

vvpgrp avatar May 02 '20 18:05 vvpgrp

@vvpgrp Tried but unfortunately not working.

KabDeveloper avatar May 03 '20 02:05 KabDeveloper

I made one more small addition. Guys, can you check if this fix works for you? For my case it works!

  1. File UAMPageFormParams.php Line 33: preg_match('/name="jschl_vc" value="([^"]+)"/', $page, $jschlVcMatches); New code: preg_match('/value="(\w+)"\sid="\S+"\sname="jschl_vc"/', $page, $jschlVcMatches);

  2. File UAMPageChallengeCode.php Line 44: $code = str_replace("var s,t,o,p,b,r,e,a,k,i,n,g,f, ", "", $code); New code: $code = str_replace("var s,t,o,p, b,r,e,a,k,i,n,g,f, ", "", $code);

  3. File UAMPageChallengeCode.php Line 42: $code = trim(substr($code, 0, strpos($code, "}, 4000);"))); Two line of new code: preg_match("/},(\s|)\d+\);/", $code, $matches); $code = trim(substr($code, 0, strpos($code, $matches[0])));

vvpgrp avatar May 03 '20 08:05 vvpgrp

Yep, that fixed the problem. Thanks, @vvpgrp ! Now, @KyranRana could you make an official update with this fix?

kacperkwapisz avatar May 03 '20 10:05 kacperkwapisz

@vvpgrp yes, its worked for me. Thank you for a temporarily fix!

zikju avatar May 03 '20 13:05 zikju

In my case I am getting this error:

[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: 9ccfeb5c63e6a1769d2e67bf7578d2fb2ed263c9-1588527245-0-ATAUM2eLV4dtfzTtR+HJUyD5eYWH3hSK1gRreXJXDCaRP5descDP24JowVpYz+eSZx6GPXAt3I/8YJgip6uVUjsMA5IPCDzp3z5Rf8iwh3A8WvACw88DkVsJUmOQTFaQOZjSElZf8/aEWZC5hEyIjvOf11JBSXvm3pYM942ptGL67oHtEzjxjer5vUiPSyy5YhtrtQ3PA3ZEBN9s0baujJRirYCYarSoKPffyBhj/tejAFSWoTbXLEtHHx/Rjoh5huccneoPMBss5GW8RgeOpoCz9v9ZD8ZoPN/VpYuXnZDByNbNUoO7AZn1xYe4XRrOn0gEiijmXrz+ckNUY+/j1ozJGdZ4nPO7C4VLnbY3T+Yajxig4kclxtq41RKROmtrFfAJtBK6Vpbp65WrtIVSdJnRHBVFJFIWnQ2I+Da+BSEuCicZsu9mj81xjQUyS/T99Ouq08eJoAkVn/6IVslFq0Yg4c7/+7RvSAS8zfVTX4coxaYYXF3zxr2LpgNGldUmiFk49Cp7hdSlDhf2dratDfuRgkVwc9h6GCQ+ldiEXBnaIsepccDGgqa95ep51V+NQgEHtGPEEX3BfyCX+QJXr6jJ3y0tMWjpwYqP4/gn2d/io15uHnvyUGwEuAtj77fwle3rBaYiTtMiPWMUDv2lnaPRWjjki8RHiN9x6g5YFqy3cijUGJ45dRbYT1QLXJqhdwz2f3hhYmHL0nm6LecnKWGg/jjQhG2B0QGpATkN1PxIF3+Du89urmuqHMxvlcsuMxSEtMIva9Qu2Pd85Xb5RnWZmbYXMrh6tUynrlGGwSxnwt/WqVQIZs6TQkwvE50CaBpmFak6a0ckg4rOUxTzSwLN4nWmSbFx0kdMsTmcukc/7bl3qp/Dwj2lzTjfRRCjSk0cI4gkpjJko5iyBYcEOK90F/bTftZZDUagerKKxKXAfjQtXUN22yUdTCRusrWbrrAI/xJlr8pG6fBxR5u71obU7VnzQ1BO+WAdtkY8WJD2Vg/8ll3OwrnLy/LD84SM2G35pt0IxOrEAuyXoGsyoTwDAfgUc/ZaMfJ6c6cQCy5Nt+pH+95os3FIuCB1i+BKQ83Hpu+SvoIjrOz0coSugUZJiimTqm2/vvmIR2E+g2L+qRYenwZiUxmj7TKMcdTW12IH2l79cHbpALM7S0A5ezNWrijc28kjcmUDqb7uNEr8QZPk5aoD0dBQCgln9KmxDC4hMUY1vXqSaydbbPhlrzK/q8AzkURXUQ2MLECpnjzOTAcckezQW74gyYZT0dkPkrlGKAn60WXb3a8hVxXwtzoCoJxOqhvvj2ppofEZYjoY3eJ7ZZ8OMKetkYhKiOv53iNSAbyWTUk2IcL0MJdD49IwgF1glz6Nr2s72M/Ns87lR4gEDb5UoNXVJAvxEhXmAFlw7jXwze7VFGD5YO1Ei8mJ/LHCxsfnYu76MpTTkOwHokb6qLOkQiqiSSnD499njfaCVqr5BzzQSBikPS9nS84XSJpRjyJ79MgyYS3O3U7PX8UetQFMFrYZi+g7hVDun4bNwgvMZ1SdPMSUMMYtlvE=) [INFO] UAM (retry: 0) -> (jschl_vc param: 2bf65926dbd2d3a24f1a87302ff12ad6) [INFO] UAM (retry: 0) -> (pass param: 1588527249.749-za9QP4Oa5E) [INFO] UAM (retry: 0) -> (jschl_answer param: 1.2727743388) [ERROR] Captcha (retry: 1) -> not supported! Unknown error -> Captcha page is not supported!

KabDeveloper avatar May 03 '20 17:05 KabDeveloper

@bcashier

In my case I am getting this error:

[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: 9ccfeb5c63e6a1769d2e67bf7578d2fb2ed263c9-1588527245-0- ... Dun4bNwgvMZ1SdPMSUMMYtlvE=) [INFO] UAM (retry: 0) -> (**jschl_vc** param: 2bf65926dbd2d3a24f1a87302ff12ad6) [INFO] UAM (retry: 0) -> (**pass** param: 1588527249.749-za9QP4Oa5E) [INFO] UAM (retry: 0) -> (**jschl_answer** param: 1.2727743388) [ERROR] Captcha (retry: 1) -> not supported! Unknown error -> **Captcha page is not supported!**

Read carefully: Captcha page is not supported!

vvpgrp avatar May 03 '20 17:05 vvpgrp

Seems to not be working again?

[INFO] UAM (retry: 0) -> (jschl_vc param: 8ed994d39ebe29c84cd11e49a371053c)
[INFO] UAM (retry: 0) -> (pass param: 1588679802.02-r4m69aPBHh)
[INFO] UAM (retry: 0) -> (jschl_answer param: 2.8137459666)
[INFO] UAM (retry: 1) -> applying HTTPS settings
[INFO] UAM (retry: 1) -> waiting for 5 seconds!
[INFO] UAM (retry: 1) -> getting form params...

**Notice: Undefined offset: 1 in UAMPageFormParams.php on line 38**

devoided avatar May 05 '20 11:05 devoided

@devoided Seems to not be working again?

[INFO] UAM (retry: 0) -> (jschl_vc param: 8ed994d39ebe29c84cd11e49a371053c)
[INFO] UAM (retry: 0) -> (pass param: 1588679802.02-r4m69aPBHh)
[INFO] UAM (retry: 0) -> (jschl_answer param: 2.8137459666)
[INFO] UAM (retry: 1) -> applying HTTPS settings
[INFO] UAM (retry: 1) -> waiting for 5 seconds!
[INFO] UAM (retry: 1) -> getting form params...

**Notice: Undefined offset: 1 in UAMPageFormParams.php on line 38**

Doesn't work or only seems to not be working again?😊 Did you executed this fix?

Please publish a link to the site to check working!

vvpgrp avatar May 05 '20 13:05 vvpgrp

@vvpgrp not working again sadly

kacperkwapisz avatar May 06 '20 10:05 kacperkwapisz

@vvpgrp not working again sadly

Try this fix!

vvpgrp avatar May 25 '20 04:05 vvpgrp