DJOCKER-FACE / QuillBot-AI-Text-Formatting

This is a Software to provide an GUI for the use of QuillBot AI Text Formatting and a bypass for it's daily limitation.
BSD 3-Clause "New" or "Revised" License
3 stars 1 forks source link

Unfortunately Cloudflare blocked the request on first try #1

Open 0xWTC opened 2 years ago

0xWTC commented 2 years ago

Any ideas how to override the check without getting a cookie with Selenium?

Exception in Tkinter callback
Traceback (most recent call last):
  File "C:\Python39\lib\site-packages\requests\models.py", line 910, in json
    return complexjson.loads(self.text, **kwargs)
  File "C:\Python39\lib\json\__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "C:\Python39\lib\json\decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "C:\Python39\lib\json\decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Python39\lib\tkinter\__init__.py", line 1892, in __call__
    return self.func(*args)
  File "c:\Users\Windows\Downloads\QuillBot-AI-Text-Formatting-main\QuillBot-AI-Text-Formatting-main\main.py", line 63, in main
    response = x.json()
  File "C:\Python39\lib\site-packages\requests\models.py", line 917, in json
    raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: [Errno Expecting value] <!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en-US"> <![endif]-->
<!--[if IE 7]>    <html class="no-js ie7 oldie" lang="en-US"> <![endif]-->
<!--[if IE 8]>    <html class="no-js ie8 oldie" lang="en-US"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en-US"> <!--<![endif]-->
<head>

<title>Please Wait... | Cloudflare</title>

<meta charset="UTF-8" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta name="robots" content="noindex, nofollow" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<link rel="stylesheet" id="cf_styles-css" href="/cdn-cgi/styles/cf.errors.css" />
<!--[if lt IE 9]><link rel="stylesheet" id='cf_styles-ie-css' href="/cdn-cgi/styles/cf.errors.ie.css" /><![endif]-->
<style>body{margin:0;padding:0}</style>

<!--[if gte IE 10]><!-->
<script>
  if (!navigator.cookieEnabled) {
    window.addEventListener('DOMContentLoaded', function () {
      var cookieEl = document.getElementById('cookie-alert');
      cookieEl.style.display = 'block';
    })
  }
</script>
<!--<![endif]-->

    <script>
    //<![CDATA[
    (function(){
      window._cf_chl_opt={
        cvId: "2",
        cType: "managed",
        cNounce: "82029",
        cRay: "70f7ad7bd9faee27",
        cHash: "f4c813fa464118b",
        cUPMDTk: "\/api\/paraphraser\/single-paraphrase\/2?text=what's%20up%20my%20brother?&strength=2&autoflip=false&wikify=false&fthresh=-1&inputLang=en&quoteIndex=-2&__cf_chl_tk=N6_2N5jSknBJKNSZom83piHB3agRf8oCK.UPaJ50UkU-1653244799-0-gaNycGzNB30",
        cFPWv: "g",
        cTTimeMs: "1000",
        cLt: "n",
        cRq: {
          ru: "aHR0cHM6Ly9xdWlsbGJvdC5jb20vYXBpL3BhcmFwaHJhc2VyL3NpbmdsZS1wYXJhcGhyYXNlLzI/dGV4dD13aGF0J3MlMjB1cCUyMG15JTIwYnJvdGhlcj8mc3RyZW5ndGg9MiZhdXRvZmxpcD1mYWxzZSZ3aWtpZnk9ZmFsc2UmZnRocmVzaD0tMSZpbnB1dExhbmc9ZW4mcXVvdGVJbmRleD0tMg==",
          ra: "TW96aWxsYS81LjAgKFdpbmRvd3MgTlQgMTAuMDsgcnY6OTEuMCkgR2Vja28vMjAxMDAxMDEgRmlyZWZveC85MS4w",
          rm: "R0VU",
          d: "NnodHsENWS9cGx1IVltJ2X7Hma9OlTkZOcUifNRaWhC6Mf5nyQ6QisTE8hQl+5u4wGqk3zyEpLZkkw+pwkVb9crKnn+3kw7z6VTWcCGuZcl8DWVNecSSV7G2q9O2N69LrAMXxvhBxJm/nuxVHfsLnRtUBDJCmOp63k9t+bJeHOXJ3hxL81aCvYki+RwgGOd3Nn+1/tKEyC5KOW72DNR+6RwT4EA4Aj74xp1NBkR0FW9r9wRZZW5dZ1dWikIGPuhvpNMf1ynXMRxGQPdVfnYDVKgpqvScnAE5NqQp3F0J3ynS959aUxO21UsqiImc+R4bRjC1hUJU5O+kkxq73K+fJKn2NsPQLrOKTtuMSY3XfuZIbQurjaFF1w1KtiUoXXxNimwpJ6GBm6lDA2Fh8J9VCd5WVSVnAQ09LPVtVcjS4W8dNClcHRm6eqb4xgW1sJKX2/qfcUMQXpEzUIyZgVJwrb34wPaPCUf+CfTwqvU4j50uqXFH7a+8p5iEUvPAujsXnRasTrtT+tbNpjsF92FMEGSklBEbVWcA2000qVHFPJ1ARPnl4H/ZQO81vgZzBDuJN37/4djgkoChhxF/BWNKTyPV1CxYqVQv+92nOw2IHMQ1ohLz0ujK6lEcTUG+ssm1oAEFiZEj5rkK5fNa2rSAvPO23Ii89dGPkE12McvnmPe+0C6hOiu9/wpX/OgWK0N9",
          t: "MTY1MzI0NDc5OS4zNTUwMDA=",
          m: "OWx3jU9CGm7yN+isCvtOiy3XO+EUyKbirjkew3PPXJs=",
          i1: "iru1FufKZryvHPOHpRNW4g==",
          i2: "qn0rcZm0aVzsTegK29SLHw==",
          zh: "PQOxkj92i4q1WvCaklS6elv+BDRlnT6xVaQgda5mGsg=",
          uh: "uSCd8G9ILjtxYchCHfPOHO/J7vbx2UtTYgAtsmTeAZQ=",
          hh: "F24U6mOwfFbG/3i/kdH1kl5uR6yfNYCjBDcBbsZ7Xmw=",
        }
      };
    }());
    //]]>
    </script>

<style>
  #cf-wrapper #spinner {width:69px; margin:  auto;}
  #cf-wrapper #cf-please-wait{text-align:center}
  .attribution {margin-top: 32px;}
  .bubbles { background-color: #f58220; width:20px; height: 20px; margin:2px; border-radius:100%; display:inline-block; }
  #cf-wrapper #challenge-form { padding-top:25px; padding-bottom:25px; }
  #cf-hcaptcha-container { text-align:center;}
  #cf-hcaptcha-container iframe { display: inline-block;}
  @keyframes fader     { 0% {opacity: 0.2;} 50% {opacity: 1.0;} 100% {opacity: 0.2;} }
  #cf-wrapper #cf-bubbles { width:69px; }
  @-webkit-keyframes fader { 0% {opacity: 0.2;} 50% {opacity: 1.0;} 100% {opacity: 0.2;} }
  #cf-bubbles > .bubbles { animation: fader 1.6s infinite;}
  #cf-bubbles > .bubbles:nth-child(2) { animation-delay: .2s;}
  #cf-bubbles > .bubbles:nth-child(3) { animation-delay: .4s;}
</style>
</head>
<body>
  <div id="cf-wrapper">
    <div class="cf-alert cf-alert-error cf-cookie-error" id="cookie-alert" data-translate="enable_cookies">Please enable cookies.</div>
    <div id="cf-error-details" class="cf-error-details-wrapper">
      <div class="cf-wrapper cf-header cf-error-overview">

        <h1 data-translate="managed_challenge_headline">Please wait...</h1>
        <h2 class="cf-subheadline"><span data-translate="managed_checking_msg">We are checking your browser...</span> quillbot.com</h2>

      </div>

      <div class="cf-section cf-highlight cf-captcha-container">
        <div class="cf-wrapper">
          <div class="cf-columns two">
            <div class="cf-column">

              <div class="cf-highlight-inverse cf-form-stacked">
                <form class="challenge-form managed-form" id="challenge-form" action="/api/paraphraser/single-paraphrase/2?text=what&#039;s%20up%20my%20brother?&amp;strength=2&amp;autoflip=false&amp;wikify=false&amp;fthresh=-1&amp;inputLang=en&amp;quoteIndex=-2&amp;__cf_chl_f_tk=N6_2N5jSknBJKNSZom83piHB3agRf8oCK.UPaJ50UkU-1653244799-0-gaNycGzNB30" method="POST" enctype="application/x-www-form-urlencoded">

    <div id='cf-please-wait'>
      <div id='spinner'>
        <div id="cf-bubbles">
            <div class="bubbles"></div>
            <div class="bubbles"></div>
            <div class="bubbles"></div>
        </div>
      </div>
      <p data-translate="please_wait" id="cf-spinner-please-wait">Please stand by, while we are checking your browser...</p>
      <p data-translate="redirecting" id="cf-spinner-redirecting" style="display:none">Redirecting...</p>
      </div>

  <input type="hidden" name="md" value="oUXL75BOWOQL0hM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MutzNWzanpDt7fDDtwpC9Bn1rkQ==">
  <input type="hidden" name="vc" value="f713ee810659ae28eab10aa06812b3bf">

  <noscript id="cf-captcha-bookmark" class="cf-captcha-info">
  <h1 data-translate="turn_on_js" style="color:#bd2426;">Please turn JavaScript on and reload the page.</h1>
  </noscript>
    <div id="no-cookie-warning" class="cookie-warning" data-translate="turn_on_cookies" style="display:none">
      <p data-translate="turn_on_cookies" style="color:#bd2426;">Please enable Cookies and reload the page.</p>
    </div>
  <script>
  //<![CDATA[
    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;
        if(!cookiesEnabled){
          var q = document.getElementById('no-cookie-warning');q.style.display = 'block';
        }
      });
  //]]>
  </script>
  <div id="trk_captcha_js" style="background-image:url('/cdn-cgi/images/trace/captcha/nojs/h/transparent.gif?ray=70f7ad7bd9faee27')"></div>
</form>

  <script>
    //<![CDATA[
    (function(){
        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/managed/js/transparent.gif?ray=70f7ad7bd9faee27");
        trkjs.id = "trk_managed_js";
        trkjs.setAttribute("alt", "");
        document.body.appendChild(trkjs);
        var cpo=document.createElement('script');
        cpo.type='text/javascript';
        cpo.src="/cdn-cgi/challenge-platform/h/g/orchestrate/managed/v1?ray=70f7ad7bd9faee27";

        window._cf_chl_opt.cOgUHash = location.hash === '' && location.href.indexOf('#') !== -1 ? '#' : location.hash;
        window._cf_chl_opt.cOgUQuery = location.search === '' && location.href.slice(0, -window._cf_chl_opt.cOgUHash.length).indexOf('?') !== -1 ? '?' : location.search;
        if (window._cf_chl_opt.cUPMDTk && window.history && window.history.replaceState) {
          var ogU = location.pathname + window._cf_chl_opt.cOgUQuery + window._cf_chl_opt.cOgUHash;
          history.replaceState(null, null, "\/api\/paraphraser\/single-paraphrase\/2?text=what's%20up%20my%20brother?&strength=2&autoflip=false&wikify=false&fthresh=-1&inputLang=en&quoteIndex=-2&__cf_chl_rt_tk=N6_2N5jSknBJKNSZom83piHB3agRf8oCK.UPaJ50UkU-1653244799-0-gaNycGzNB30" + window._cf_chl_opt.cOgUHash);
          cpo.onload = function() {
            history.replaceState(null, null, ogU);
          };
        }

        document.getElementsByTagName('head')[0].appendChild(cpo);
    }());
    //]]>
    </script>

              </div>
            </div>

            <div class="cf-column">
              <div class="cf-screenshot-container">

                <span class="cf-no-screenshot"></span>

              </div>
            </div>
          </div>
        </div>
      </div>

      <div class="cf-section cf-wrapper">
        <div class="cf-columns two">
          <div class="cf-column">
            <h2 data-translate="why_captcha_headline">Why do I have to complete a CAPTCHA?</h2>

            <p data-translate="why_captcha_detail">Completing the CAPTCHA proves you are a human
and gives you temporary access to the web property.</p>
          </div>

          <div class="cf-column">
            <h2 data-translate="resolve_captcha_headline">What can I do to prevent this in the future?</h2>

            <p data-translate="resolve_captcha_antivirus">If you are on a personal connection, like at home, you can run an anti-virus scan on your device to make sure it is not infected with malware.</p>

            <p data-translate="resolve_captcha_network">If you are at an office or shared network, you can ask the network administrator to run a scan across the network looking for misconfigured or infected devices.</p>

          </div>
        </div>
      </div>

      <div class="cf-error-footer cf-wrapper w-240 lg:w-full py-10 sm:py-4 sm:px-8 mx-auto text-center sm:text-left border-solid border-0 border-t border-gray-300">
  <p class="text-13">
    <span class="cf-footer-item sm:block sm:mb-1">Cloudflare Ray ID: <strong class="font-semibold">70f7ad7bd9faee27</strong></span>
    <span class="cf-footer-separator sm:hidden">&bull;</span>
    <span class="cf-footer-item sm:block sm:mb-1"><span>Your IP</span>: 88.8.14.125</span>
    <span class="cf-footer-separator sm:hidden">&bull;</span>
    <span class="cf-footer-item sm:block sm:mb-1"><span>Performance &amp; security by</span> <a rel="noopener noreferrer" href="https://www.cloudflare.com/5xx-error-landing" id="brand_link" target="_blank">Cloudflare</a></span>

  </p>
</div><!-- /.error-footer -->

    </div>
  </div>

  <script>
  window._cf_translation = {};

</script>

</body>
</html>
: 0
DJOCKER-FACE commented 2 years ago

Two solutions here either try to flush your ip AKA restart router. or use a proxy any free one would work the pattern goest:

s.get(url, headers=headers, proxy...)

you can google it

0xWTC commented 2 years ago

thanks. It's interesting cause I have a good residential IP and I'm actually logged in into Quillbot Premium, so I'm surprised CF is blocking that IP.

DJOCKER-FACE commented 2 years ago

Did you notice any problem like that before with cf? Keep in mind in case yourself or someone is using your ip to dos any website that use cf dns will result in this error.i would recommend AV scanning you device just in case someone is using them as proxy.

0xWTC commented 2 years ago

Thanks for the anwer. I haven't noticed a problem. I've been doing extensive Quillbotting with Selenium, so to speak ;)

The interesting part is if I just log in to Quillbot Premium with Selenium and then navigate the browser to:

url = f"https://quillbot.com/api/paraphraser/single-paraphrase/2?text={string}&strength=2&autoflip=true&wikify=false&fthresh=-2&inputLang=en&quoteIndex=-1"

I'm getting the correct API response.

And I'm unable to replicate the same with requests/bf4. I will try some VPNs/good residential proxies and report back.