Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Captcha New Challenge #30

Open
1 task
andress134 opened this issue Jun 28, 2020 · 7 comments
Open
1 task

Captcha New Challenge #30

andress134 opened this issue Jun 28, 2020 · 7 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@andress134
Copy link

Describe the bug

  • Hooman version:
  • Node.js version:
  • OS & version:

Actual behavior

Hello, cloudflare has updated new challenge for captcha, hooman is patched for moment, will hooman updated? will continue this project?

Expected behavior

write here

Code to reproduce

// paste code here

Checklist

  • I have tried my code with the latest version of Node.js and hooman.
@christophernarciso
Copy link

christophernarciso commented Jul 3, 2020

This is the new captcha

Test url: https://osbot.org/forum/topic/157064-excellent-vorkath/page/5000/

`
//<![CDATA[
(function(){

window._cf_chl_opt={
  cvId: "1",
  cType: "non-interactive",
  cNounce: "3363",
  cRay: "5acec1fde9821185",
  cHash: "88a6094f7c217a7",
  cRq: {
    d: "fBL0cHVXbZ+X+3CfWGO8rYPHHJFyKEDVQaGqP+RPmS9UeZzLkWqY0wp7ZdE2UvZ081LLJ1oX72sWBQtrS9UVujJnrh5hFHvrs8Gcsqlhr0TgOeC3U5/h5QpoXVKDg5EyLupTKHBCWqwgbPmudjjEfmdQNpLTnC13r/8AwcSa0gkeisApAKLwJ2Ana1HoV6dZ8dGsi54B7ErZCd/vclegtrOjU2J5FDZZYp37WgmVd95a5yrd2xFKbZ+eJDAzWif4TAc9wIomug+l1Zu3Ne8LLMKNbJPLQ+l48RmJEaCF+o2tmoWibzH+EDYfysulIry5m5ue0y0KZ0/Ql0GMqD7ZY8UAJxcDKnbi/7IBbhEJIrEHefprML2oa8zE5ew3lhDZ",
    t: "MTU5Mzc1OTkyMi44NzMwMDA=",
    m: "xfxTSJsnY8V5yWzj9uBSGgr8jHt2fborYukGFrjMXh4=",
    i1: "qPm0Hw+Trv6tx3JRSD31HA==",
    i2: "bvlp85/nQ3JrsMrAGGXedA==",
  }
}
window._cf_chl_enter = function(){window._cf_chl_opt.p=1};

var a = function() {try{return !!window.addEventListener} catch(e) {return !1} },
b = function(b, c) {a() ? document.addEventListener("DOMContentLoaded", b, c) : document.attachEvent("onreadystatechange", b)};
b(function(){
  var cookiesEnabled=(navigator.cookieEnabled)? true : false;
  var cookieSupportInfix=cookiesEnabled?'/nocookie':'/cookie';
  var a = document.getElementById('cf-content');a.style.display = 'block';
  var isIE = /(MSIE|Trident\/|Edge\/)/i.test(window.navigator.userAgent);
  var trkjs = isIE ? new Image() : document.createElement('img');
  trkjs.setAttribute("src", "/cdn-cgi/images/trace/jschal/js"+cookieSupportInfix+"/transparent.gif?ray=5acec1fde9821185");
  trkjs.id = "trk_jschal_js";
  trkjs.setAttribute("alt", "");
  document.body.appendChild(trkjs);
  
  document.body.appendChild(trkjs);
  var cpo = document.createElement('script');
  cpo.type = 'text/javascript';
  cpo.src = "/cdn-cgi/challenge-platform/orchestrate/jsch/v1";
  var done = false;
  cpo.onload = cpo.onreadystatechange = function() {
    if (!done && (!this.readyState || this.readyState === "loaded" || this.readyState === "complete")) {
      done = true;
      cpo.onload = cpo.onreadystatechange = null;
      window._cf_chl_enter()
    }
  };
  document.getElementsByTagName('head')[0].appendChild(cpo);

}, false);

})();
//]]>
`

The python library 'cloudscraper' identifies it by:
`# ------------------------------------------------------------------------------- #
# check if the response contains new Cloudflare challenge
# ------------------------------------------------------------------------------- #

@staticmethod
def is_New_IUAM_Challenge(resp):
    try:
        return (
            resp.headers.get('Server', '').startswith('cloudflare')
            and resp.status_code in [429, 503]
            and re.search(
                r'cpo.src\s*=\s*"/cdn-cgi/challenge-platform/orchestrate/jsch/v1"',
                resp.text,
                re.M | re.S
            )
            and re.search(r'window._cf_chl_enter\(', resp.text, re.M | re.S)
        )
    except AttributeError:
        pass

    return False`

@andress134
Copy link
Author

This is the new captcha

Test url: https://osbot.org/forum/topic/157064-excellent-vorkath/page/5000/

`
//<![CDATA[
(function(){

window._cf_chl_opt={
  cvId: "1",
  cType: "non-interactive",
  cNounce: "3363",
  cRay: "5acec1fde9821185",
  cHash: "88a6094f7c217a7",
  cRq: {
    d: "fBL0cHVXbZ+X+3CfWGO8rYPHHJFyKEDVQaGqP+RPmS9UeZzLkWqY0wp7ZdE2UvZ081LLJ1oX72sWBQtrS9UVujJnrh5hFHvrs8Gcsqlhr0TgOeC3U5/h5QpoXVKDg5EyLupTKHBCWqwgbPmudjjEfmdQNpLTnC13r/8AwcSa0gkeisApAKLwJ2Ana1HoV6dZ8dGsi54B7ErZCd/vclegtrOjU2J5FDZZYp37WgmVd95a5yrd2xFKbZ+eJDAzWif4TAc9wIomug+l1Zu3Ne8LLMKNbJPLQ+l48RmJEaCF+o2tmoWibzH+EDYfysulIry5m5ue0y0KZ0/Ql0GMqD7ZY8UAJxcDKnbi/7IBbhEJIrEHefprML2oa8zE5ew3lhDZ",
    t: "MTU5Mzc1OTkyMi44NzMwMDA=",
    m: "xfxTSJsnY8V5yWzj9uBSGgr8jHt2fborYukGFrjMXh4=",
    i1: "qPm0Hw+Trv6tx3JRSD31HA==",
    i2: "bvlp85/nQ3JrsMrAGGXedA==",
  }
}
window._cf_chl_enter = function(){window._cf_chl_opt.p=1};

var a = function() {try{return !!window.addEventListener} catch(e) {return !1} },
b = function(b, c) {a() ? document.addEventListener("DOMContentLoaded", b, c) : document.attachEvent("onreadystatechange", b)};
b(function(){
  var cookiesEnabled=(navigator.cookieEnabled)? true : false;
  var cookieSupportInfix=cookiesEnabled?'/nocookie':'/cookie';
  var a = document.getElementById('cf-content');a.style.display = 'block';
  var isIE = /(MSIE|Trident\/|Edge\/)/i.test(window.navigator.userAgent);
  var trkjs = isIE ? new Image() : document.createElement('img');
  trkjs.setAttribute("src", "/cdn-cgi/images/trace/jschal/js"+cookieSupportInfix+"/transparent.gif?ray=5acec1fde9821185");
  trkjs.id = "trk_jschal_js";
  trkjs.setAttribute("alt", "");
  document.body.appendChild(trkjs);
  
  document.body.appendChild(trkjs);
  var cpo = document.createElement('script');
  cpo.type = 'text/javascript';
  cpo.src = "/cdn-cgi/challenge-platform/orchestrate/jsch/v1";
  var done = false;
  cpo.onload = cpo.onreadystatechange = function() {
    if (!done && (!this.readyState || this.readyState === "loaded" || this.readyState === "complete")) {
      done = true;
      cpo.onload = cpo.onreadystatechange = null;
      window._cf_chl_enter()
    }
  };
  document.getElementsByTagName('head')[0].appendChild(cpo);

}, false);

})();
//]]>
`

The python library 'cloudscraper' identifies it by:
`# ------------------------------------------------------------------------------- #

check if the response contains new Cloudflare challenge

-------------------------------------------------------------------------------

@staticmethod
def is_New_IUAM_Challenge(resp):
    try:
        return (
            resp.headers.get('Server', '').startswith('cloudflare')
            and resp.status_code in [429, 503]
            and re.search(
                r'cpo.src\s*=\s*"/cdn-cgi/challenge-platform/orchestrate/jsch/v1"',
                resp.text,
                re.M | re.S
            )
            and re.search(r'window._cf_chl_enter\(', resp.text, re.M | re.S)
        )
    except AttributeError:
        pass

    return False`

Is the uam bro

@Revadike
Copy link

Revadike commented Jul 4, 2020

any updates on this @sayem314 ?

@sayem314 sayem314 added bug Something isn't working enhancement New feature or request labels Jul 5, 2020
@sayem314
Copy link
Owner

sayem314 commented Jul 5, 2020

This is the new challenge. I'm currently busy with some private projects. I need some free time to analyze it.

@yovanoc
Copy link

yovanoc commented Sep 9, 2021

Any news on this?

@andress134
Copy link
Author

Any news on this?

it is patched forever nobody will update it

@Revadike
Copy link

It's gonna be a cat and mouse game and only one side is getting paid for it, so...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants