JimmyLaurent / cloudflare-scraper

A package to bypass Cloudflare's protection
MIT License
286 stars 30 forks source link

Problem: library won't work #45

Open BaseMax opened 1 year ago

BaseMax commented 1 year ago

It seems this library won't work.

Testing on https://www.ckgsir.com/bluestrip-widget

const cloudflareScraper = require('cloudflare-scraper');

(async () => {
    try {
        const response = await cloudflareScraper.get('https://www.ckgsir.com/bluestrip-widget');
        console.log(response);
    } catch (error) {
        console.log(error);
    }
})();

C:\Users\Max\JS>node test.js
StatusCodeError: 403 - "<!DOCTYPE html>\n<!--[if lt IE 7]> <html class=\"no-js ie6 oldie\" lang=\"en-US\"> <![endif]-->\n<!--[if IE 7]>    <html class=\"no-js ie7 oldie\" lang=\"en-US\"> <![endif]-->\n<!--[if IE 8]>    <html class=\"no-js ie8 oldie\" lang=\"en-US\"> <![endif]-->\n<!--[if gt IE 8]><!--> <html class=\"no-js\" lang=\"en-US\"> <!--<![endif]-->\n<head>\n<title>Attention Required! | Cloudflare</title>\n<meta charset=\"UTF-8\" />\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=Edge\" />\n<meta name=\"robots\" content=\"noindex, nofollow\" />\n<meta name=\"viewport\" content=\"width=device-width,initial-scale=1\" />\n<link rel=\"stylesheet\" id=\"cf_styles-css\" href=\"/cdn-cgi/styles/cf.errors.css\" />\n<!--[if lt IE 9]><link rel=\"stylesheet\" id='cf_styles-ie-css' href=\"/cdn-cgi/styles/cf.errors.ie.css\" /><![endif]-->\n<style>body{margin:0;padding:0}</style>\n\n\n<!--[if gte IE 10]><!-->\n<script>\n  if (!navigator.cookieEnabled) {\n    window.addEventListener('DOMContentLoaded', function () {\n      var cookieEl = document.getElementById('cookie-alert');\n      cookieEl.style.display = 'block';\n    })\n  }\n</script>\n<!--<![endif]-->\n\n\n</head>\n<body>\n  <div id=\"cf-wrapper\">\n    <div class=\"cf-alert cf-alert-error cf-cookie-error\" id=\"cookie-alert\" data-translate=\"enable_cookies\">Please enable cookies.</div>\n    <div id=\"cf-error-details\" class=\"cf-error-details-wrapper\">\n      <div class=\"cf-wrapper cf-header cf-error-overview\">\n        <h1 data-translate=\"block_headline\">Sorry, you have been blocked</h1>\n        <h2 class=\"cf-subheadline\"><span data-translate=\"unable_to_access\">You are unable to access</span> ckgsir.com</h2>\n      </div><!-- /.header -->\n\n      <div class=\"cf-section cf-highlight\">\n        <div class=\"cf-wrapper\">\n          <div class=\"cf-screenshot-container cf-screenshot-full\">\n            \n              <span class=\"cf-no-screenshot error\"></span>\n            \n          </div>\n        </div>\n      </div><!-- /.captcha-container -->\n\n      <div class=\"cf-section cf-wrapper\">\n        <div class=\"cf-columns two\">\n          <div class=\"cf-column\">\n            <h2 data-translate=\"blocked_why_headline\">Why have I been blocked?</h2>\n\n            <p data-translate=\"blocked_why_detail\">This website is using a security service to protect itself from online attacks. The action you just performed triggered the security solution. There are several actions that could trigger this block including submitting a certain word or phrase, a SQL command or malformed data.</p>\n          </div>\n\n          <div class=\"cf-column\">\n            <h2 data-translate=\"blocked_resolve_headline\">What can I do to resolve this?</h2>\n\n            <p data-translate=\"blocked_resolve_detail\">You can email the site owner to let them know you were blocked. Please include what you were doing when this page came up and the Cloudflare Ray ID found at the bottom of this page.</p>\n          </div>\n        </div>\n      </div><!-- /.section -->\n\n      <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\">\n  <p class=\"text-13\">\n    <span class=\"cf-footer-item sm:block sm:mb-1\">Cloudflare Ray ID: <strong class=\"font-semibold\">760d28b3ab18903d</strong></span>\n    <span class=\"cf-footer-separator sm:hidden\">&bull;</span>\n    <span id=\"cf-footer-item-ip\" class=\"cf-footer-item hidden sm:block sm:mb-1\">\n      Your IP:\n      <button type=\"button\" id=\"cf-footer-ip-reveal\" class=\"cf-footer-ip-reveal-btn\">Click to reveal</button>\n      <span class=\"hidden\" id=\"cf-footer-ip\">86.57.68.238</span>\n      <span class=\"cf-footer-separator sm:hidden\">&bull;</span>\n    </span>\n    <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>\n    \n  </p>\n  <script>(function(){function d(){var b=a.getElementById(\"cf-footer-item-ip\"),c=a.getElementById(\"cf-footer-ip-reveal\");b&&\"classList\"in b&&(b.classList.remove(\"hidden\"),c.addEventListener(\"click\",function(){c.classList.add(\"hidden\");a.getElementById(\"cf-footer-ip\").classList.remove(\"hidden\")}))}var a=document;document.addEventListener&&a.addEventListener(\"DOMContentLoaded\",d)})();</script>\n</div><!-- /.error-footer -->\n\n\n    </div><!-- /#cf-error-details -->\n  </div><!-- /#cf-wrapper -->\n\n  <script>\n  window._cf_translation = {};\n  \n  \n</script>\n\n</body>\n</html>\n"
    at new StatusCodeError (C:\Users\Max\JS\node_modules\request-promise-core\lib\errors.js:32:15)
    at Request.plumbing.callback (C:\Users\Max\JS\node_modules\request-promise-core\lib\plumbing.js:104:33)
    at Request.RP$callback [as _callback] (C:\Users\Max\JS\node_modules\request-promise-core\lib\plumbing.js:46:31)
    at Request.self.callback (C:\Users\Max\JS\node_modules\request\request.js:185:22)
    at Request.emit (node:events:527:28)
    at Request.<anonymous> (C:\Users\Max\JS\node_modules\request\request.js:1154:10)
    at Request.emit (node:events:527:28)
    at Gunzip.<anonymous> (C:\Users\Max\JS\node_modules\request\request.js:1076:12)
    at Object.onceWrapper (node:events:641:28)
    at Gunzip.emit (node:events:527:28) {
  statusCode: 403,
  error: '<!DOCTYPE html>\n' +
    '<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en-US"> <![endif]-->\n' +
    '<!--[if IE 7]>    <html class="no-js ie7 oldie" lang="en-US"> <![endif]-->\n' +
    '<!--[if IE 8]>    <html class="no-js ie8 oldie" lang="en-US"> <![endif]-->\n' +
    '<!--[if gt IE 8]><!--> <html class="no-js" lang="en-US"> <!--<![endif]-->\n' +
    '<head>\n' +
    '<title>Attention Required! | Cloudflare</title>\n' +
    '<meta charset="UTF-8" />\n' +
    '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />\n' +
    '<meta http-equiv="X-UA-Compatible" content="IE=Edge" />\n' +
    '<meta name="robots" content="noindex, nofollow" />\n' +
    '<meta name="viewport" content="width=device-width,initial-scale=1" />\n' +
    '<link rel="stylesheet" id="cf_styles-css" href="/cdn-cgi/styles/cf.errors.css" />\n' +
    `<!--[if lt IE 9]><link rel="stylesheet" id='cf_styles-ie-css' href="/cdn-cgi/styles/cf.errors.ie.css" /><![endif]-->\n` +
    '<style>body{margin:0;padding:0}</style>\n' +
    '\n' +
    '\n' +
    '<!--[if gte IE 10]><!-->\n' +
    '<script>\n' +
    '  if (!navigator.cookieEnabled) {\n' +
    "    window.addEventListener('DOMContentLoaded', function () {\n" +
    "      var cookieEl = document.getElementById('cookie-alert');\n" +
    "      cookieEl.style.display = 'block';\n" +
    '    })\n' +
    '  }\n' +
    '</script>\n' +
    '<!--<![endif]-->\n' +
    '\n' +
    '\n' +
    '</head>\n' +
    '<body>\n' +
    '  <div id="cf-wrapper">\n' +
    '    <div class="cf-alert cf-alert-error cf-cookie-error" id="cookie-alert" data-translate="enable_cookies">Please enable cookies.</div>\n' +
    '    <div id="cf-error-details" class="cf-error-details-wrapper">\n' +
    '      <div class="cf-wrapper cf-header cf-error-overview">\n' +
    '        <h1 data-translate="block_headline">Sorry, you have been blocked</h1>\n' +
    '        <h2 class="cf-subheadline"><span data-translate="unable_to_access">You are unable to access</span> ckgsir.com</h2>\n' +
    '      </div><!-- /.header -->\n' +
    '\n' +
    '      <div class="cf-section cf-highlight">\n' +
    '        <div class="cf-wrapper">\n' +
    '          <div class="cf-screenshot-container cf-screenshot-full">\n' +
    '            \n' +
    '              <span class="cf-no-screenshot error"></span>\n' +
    '            \n' +
    '          </div>\n' +
    '        </div>\n' +
    '      </div><!-- /.captcha-container -->\n' +
    '\n' +
    '      <div class="cf-section cf-wrapper">\n' +
    '        <div class="cf-columns two">\n' +
    '          <div class="cf-column">\n' +
    '            <h2 data-translate="blocked_why_headline">Why have I been blocked?</h2>\n' +
    '\n' +
    '            <p data-translate="blocked_why_detail">This website is using a security service to protect itself from online attacks. The action you just performed triggered the security solution. There are several actions that could trigger this block including submitting a certain word or phrase, a SQL command or malformed data.</p>\n' +
    '          </div>\n' +
    '\n' +
    '          <div class="cf-column">\n' +
    '            <h2 data-translate="blocked_resolve_headline">What can I do to resolve this?</h2>\n' +
    '\n' +
    '            <p data-translate="blocked_resolve_detail">You can email the site owner to let them know you were blocked. Please include what you were doing when this page came up and the Cloudflare Ray ID found at the bottom of this page.</p>\n' +
    '          </div>\n' +
    '        </div>\n' +
    '      </div><!-- /.section -->\n' +
    '\n' +
    '      <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">\n' +
    '  <p class="text-13">\n' +
    '    <span class="cf-footer-item sm:block sm:mb-1">Cloudflare Ray ID: <strong class="font-semibold">760d28b3ab18903d</strong></span>\n' +
    '    <span class="cf-footer-separator sm:hidden">&bull;</span>\n' +
    '    <span id="cf-footer-item-ip" class="cf-footer-item hidden sm:block sm:mb-1">\n' +
    '      Your IP:\n' +
    '      <button type="button" id="cf-footer-ip-reveal" class="cf-footer-ip-reveal-btn">Click to reveal</button>\n' +
    '      <span class="hidden" id="cf-footer-ip">86.57.68.238</span>\n' +
    '      <span class="cf-footer-separator sm:hidden">&bull;</span>\n' +
    '    </span>\n' +
    '    <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>\n' +
    '    \n' +
    '  </p>\n' +
    '  <script>(function(){function d(){var b=a.getElementById("cf-footer-item-ip"),c=a.getElementById("cf-footer-ip-reveal");b&&"classList"in b&&(b.classList.remove("hidden"),c.addEventListener("click",function(){c.classList.add("hidden");a.getElementById("cf-footer-ip").classList.remove("hidden")}))}var a=document;document.addEventListener&&a.addEventListener("DOMContentLoaded",d)})();</script>\n' +
    '</div><!-- /.error-footer -->\n' +
    '\n' +
    '\n' +
    '    </div><!-- /#cf-error-details -->\n' +
    '  </div><!-- /#cf-wrapper -->\n' +
    '\n' +
    '  <script>\n' +
    '  window._cf_translation = {};\n' +
    '  \n' +
    '  \n' +
    '</script>\n' +
    '\n' +
    '</body>\n' +
    '</html>\n',
  options: {
    jar: RequestJar { _jar: [CookieJar] },
    headers: {
      'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36'
    },
    gzip: true,
    uri: 'https://www.ckgsir.com/bluestrip-widget',
    method: 'GET',
    callback: [Function: RP$callback],
    transform: undefined,
    simple: true,
    resolveWithFullResponse: false,
    transform2xxOnly: false
  },
  response: <ref *1> IncomingMessage {
    _readableState: ReadableState {
      objectMode: false,
      highWaterMark: 16384,
      buffer: BufferList { head: null, tail: null, length: 0 },
      length: 0,
      pipes: [],
      flowing: false,
      ended: true,
      endEmitted: true,
      reading: false,
      constructed: true,
      sync: false,
      needReadable: false,
      emittedReadable: false,
      readableListening: false,
      resumeScheduled: false,
      errorEmitted: false,
      emitClose: true,
      autoDestroy: true,
      destroyed: true,
      errored: null,
      closed: true,
      closeEmitted: true,
      defaultEncoding: 'utf8',
      awaitDrainWriters: null,
      multiAwaitDrain: false,
      readingMore: false,
      dataEmitted: true,
      decoder: null,
      encoding: null,
      [Symbol(kPaused)]: true
    },
    _events: [Object: null prototype] {
      end: [Array],
      close: [Function (anonymous)]
    },
    _eventsCount: 2,
    _maxListeners: undefined,
    socket: TLSSocket {
      _tlsOptions: [Object],
      _secureEstablished: true,
      _securePending: false,
      _newSessionPending: false,
      _controlReleased: true,
      secureConnecting: false,
      _SNICallback: null,
      servername: 'www.ckgsir.com',
      alpnProtocol: false,
      authorized: true,
      authorizationError: null,
      encrypted: true,
      _events: [Object: null prototype],
      _eventsCount: 9,
      connecting: false,
      _hadError: false,
      _parent: null,
      _host: 'www.ckgsir.com',
      _readableState: [ReadableState],
      _maxListeners: undefined,
      _writableState: [WritableState],
      allowHalfOpen: false,
      _sockname: null,
      _pendingData: null,
      _pendingEncoding: '',
      server: undefined,
      _server: null,
      ssl: null,
      _requestCert: true,
      _rejectUnauthorized: true,
      parser: null,
      _httpMessage: [ClientRequest],
      [Symbol(res)]: null,
      [Symbol(verified)]: true,
      [Symbol(pendingSession)]: null,
      [Symbol(async_id_symbol)]: 8,
      [Symbol(kHandle)]: null,
      [Symbol(lastWriteQueueSize)]: 0,
      [Symbol(timeout)]: null,
      [Symbol(kBuffer)]: null,
      [Symbol(kBufferCb)]: null,
      [Symbol(kBufferGen)]: null,
      [Symbol(kCapture)]: false,
      [Symbol(kSetNoDelay)]: false,
      [Symbol(kSetKeepAlive)]: false,
      [Symbol(kSetKeepAliveInitialDelay)]: 0,
      [Symbol(kBytesRead)]: 2452,
      [Symbol(kBytesWritten)]: 235,
      [Symbol(connect-options)]: [Object],
      [Symbol(RequestTimeout)]: undefined
    },
    httpVersionMajor: 1,
    httpVersionMinor: 1,
    httpVersion: '1.1',
    complete: true,
    rawHeaders: [
      'Date',
      'Thu, 27 Oct 2022 17:30:20 GMT',
      'Content-Type',
      'text/html; charset=UTF-8',
      'Transfer-Encoding',
      'chunked',
      'Connection',
      'close',
      'Cache-Control',
      'max-age=15',
      'Expires',
      'Thu, 27 Oct 2022 17:30:35 GMT',
      'X-Frame-Options',
      'SAMEORIGIN',
      'Set-Cookie',
      '__cf_bm=lrsj4zmz_62ze_mAsNS9cKeZrrEY3T8JkGUnB8hFX6g-1666891820-0-AX5PDllPO/nNYQDHTpxXeXHPGtguDVxFdWBB7jveBgj8PbB9DgJis7vLv935h1v8Wl4gr6CnSFKrh5HmH6IedyA=; path=/; expires=Thu, 27-Oct-22 18:00:20 GMT; domain=.ckgsir.com; HttpOnly; Secure; SameSite=None',
      'Vary',
      'Accept-Encoding',
      'Strict-Transport-Security',
      'max-age=0; includeSubDomains; preload',
      'X-Content-Type-Options',
      'nosniff',
      'Server',
      'cloudflare',
      'CF-RAY',
      '760d28b3ab18903d-FRA',
      'Content-Encoding',
      'gzip'
    ],
    rawTrailers: [],
    aborted: false,
    upgrade: false,
    url: '',
    method: null,
    statusCode: 403,
    statusMessage: 'Forbidden',
    client: TLSSocket {
      _tlsOptions: [Object],
      _secureEstablished: true,
      _securePending: false,
      _newSessionPending: false,
      _controlReleased: true,
      secureConnecting: false,
      _SNICallback: null,
      servername: 'www.ckgsir.com',
      alpnProtocol: false,
      authorized: true,
      authorizationError: null,
      encrypted: true,
      _events: [Object: null prototype],
      _eventsCount: 9,
      connecting: false,
      _hadError: false,
      _parent: null,
      _host: 'www.ckgsir.com',
      _readableState: [ReadableState],
      _maxListeners: undefined,
      _writableState: [WritableState],
      allowHalfOpen: false,
      _sockname: null,
      _pendingData: null,
      _pendingEncoding: '',
      server: undefined,
      _server: null,
      ssl: null,
      _requestCert: true,
      _rejectUnauthorized: true,
      parser: null,
      _httpMessage: [ClientRequest],
      [Symbol(res)]: null,
      [Symbol(verified)]: true,
      [Symbol(pendingSession)]: null,
      [Symbol(async_id_symbol)]: 8,
      [Symbol(kHandle)]: null,
      [Symbol(lastWriteQueueSize)]: 0,
      [Symbol(timeout)]: null,
      [Symbol(kBuffer)]: null,
      [Symbol(kBufferCb)]: null,
      [Symbol(kBufferGen)]: null,
      [Symbol(kCapture)]: false,
      [Symbol(kSetNoDelay)]: false,
      [Symbol(kSetKeepAlive)]: false,
      [Symbol(kSetKeepAliveInitialDelay)]: 0,
      [Symbol(kBytesRead)]: 2452,
      [Symbol(kBytesWritten)]: 235,
      [Symbol(connect-options)]: [Object],
      [Symbol(RequestTimeout)]: undefined
    },
    _consuming: true,
    _dumped: false,
    req: ClientRequest {
      _events: [Object: null prototype],
      _eventsCount: 5,
      _maxListeners: undefined,
      outputData: [],
      outputSize: 0,
      writable: true,
      destroyed: true,
      _last: true,
      chunkedEncoding: false,
      shouldKeepAlive: false,
      maxRequestsOnConnectionReached: false,
      _defaultKeepAlive: true,
      useChunkedEncodingByDefault: false,
      sendDate: false,
      _removedConnection: false,
      _removedContLen: false,
      _removedTE: false,
      _contentLength: 0,
      _hasBody: true,
      _trailer: '',
      finished: true,
      _headerSent: true,
      _closed: true,
      socket: [TLSSocket],
      _header: 'GET /bluestrip-widget HTTP/1.1\r\n' +
        'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36\r\n' +
        'host: www.ckgsir.com\r\n' +
        'accept-encoding: gzip, deflate\r\n' +
        'Connection: close\r\n' +
        '\r\n',
      _keepAliveTimeout: 0,
      _onPendingData: [Function: nop],
      agent: [Agent],
      socketPath: undefined,
      method: 'GET',
      maxHeaderSize: undefined,
      insecureHTTPParser: undefined,
      path: '/bluestrip-widget',
      _ended: true,
      res: [Circular *1],
      aborted: false,
      timeoutCb: null,
      upgradeOrConnect: false,
      parser: null,
      maxHeadersCount: null,
      reusedSocket: false,
      host: 'www.ckgsir.com',
      protocol: 'https:',
      [Symbol(kCapture)]: false,
      [Symbol(kNeedDrain)]: false,
      [Symbol(corked)]: 0,
      [Symbol(kOutHeaders)]: [Object: null prototype]
    },
    request: Request {
      _events: [Object: null prototype],
      _eventsCount: 5,
      _maxListeners: undefined,
      headers: [Object],
      gzip: true,
      uri: [Url],
      method: 'GET',
      readable: true,
      writable: true,
      explicitMethod: true,
      _qs: [Querystring],
      _auth: [Auth],
      _oauth: [OAuth],
      _multipart: [Multipart],
      _redirect: [Redirect],
      _tunnel: [Tunnel],
      _rp_resolve: [Function (anonymous)],
      _rp_reject: [Function (anonymous)],
      _rp_promise: [Promise],
      _rp_callbackOrig: undefined,
      callback: [Function (anonymous)],
      _rp_options: [Object],
      setHeader: [Function (anonymous)],
      hasHeader: [Function (anonymous)],
      getHeader: [Function (anonymous)],
      removeHeader: [Function (anonymous)],
      localAddress: undefined,
      pool: {},
      dests: [],
      __isRequestRequest: true,
      _callback: [Function: RP$callback],
      proxy: null,
      tunnel: true,
      setHost: true,
      originalCookieHeader: undefined,
      _jar: [RequestJar],
      port: 443,
      host: 'www.ckgsir.com',
      path: '/bluestrip-widget',
      httpModule: [Object],
      agentClass: [Function: Agent],
      agent: [Agent],
      _started: true,
      href: 'https://www.ckgsir.com/bluestrip-widget',
      req: [ClientRequest],
      ntick: true,
      response: [Circular *1],
      originalHost: 'www.ckgsir.com',
      originalHostHeaderName: 'host',
      responseContent: [Gunzip],
      _ended: true,
      _destdata: true,
      _callbackCalled: true,
      [Symbol(kCapture)]: false
    },
    toJSON: [Function: responseToJSON],
    caseless: Caseless { dict: [Object] },
    body: '<!DOCTYPE html>\n' +
      '<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en-US"> <![endif]-->\n' +
      '<!--[if IE 7]>    <html class="no-js ie7 oldie" lang="en-US"> <![endif]-->\n' +
      '<!--[if IE 8]>    <html class="no-js ie8 oldie" lang="en-US"> <![endif]-->\n' +
      '<!--[if gt IE 8]><!--> <html class="no-js" lang="en-US"> <!--<![endif]-->\n' +
      '<head>\n' +
      '<title>Attention Required! | Cloudflare</title>\n' +
      '<meta charset="UTF-8" />\n' +
      '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />\n' +
      '<meta http-equiv="X-UA-Compatible" content="IE=Edge" />\n' +
      '<meta name="robots" content="noindex, nofollow" />\n' +
      '<meta name="viewport" content="width=device-width,initial-scale=1" />\n' +
      '<link rel="stylesheet" id="cf_styles-css" href="/cdn-cgi/styles/cf.errors.css" />\n' +
      `<!--[if lt IE 9]><link rel="stylesheet" id='cf_styles-ie-css' href="/cdn-cgi/styles/cf.errors.ie.css" /><![endif]-->\n` +
      '<style>body{margin:0;padding:0}</style>\n' +
      '\n' +
      '\n' +
      '<!--[if gte IE 10]><!-->\n' +
      '<script>\n' +
      '  if (!navigator.cookieEnabled) {\n' +
      "    window.addEventListener('DOMContentLoaded', function () {\n" +
      "      var cookieEl = document.getElementById('cookie-alert');\n" +
      "      cookieEl.style.display = 'block';\n" +
      '    })\n' +
      '  }\n' +
      '</script>\n' +
      '<!--<![endif]-->\n' +
      '\n' +
      '\n' +
      '</head>\n' +
      '<body>\n' +
      '  <div id="cf-wrapper">\n' +
      '    <div class="cf-alert cf-alert-error cf-cookie-error" id="cookie-alert" data-translate="enable_cookies">Please enable cookies.</div>\n' +
      '    <div id="cf-error-details" class="cf-error-details-wrapper">\n' +
      '      <div class="cf-wrapper cf-header cf-error-overview">\n' +
      '        <h1 data-translate="block_headline">Sorry, you have been blocked</h1>\n' +
      '        <h2 class="cf-subheadline"><span data-translate="unable_to_access">You are unable to access</span> ckgsir.com</h2>\n' +
      '      </div><!-- /.header -->\n' +
      '\n' +
      '      <div class="cf-section cf-highlight">\n' +
      '        <div class="cf-wrapper">\n' +
      '          <div class="cf-screenshot-container cf-screenshot-full">\n' +
      '            \n' +
      '              <span class="cf-no-screenshot error"></span>\n' +
      '            \n' +
      '          </div>\n' +
      '        </div>\n' +
      '      </div><!-- /.captcha-container -->\n' +
      '\n' +
      '      <div class="cf-section cf-wrapper">\n' +
      '        <div class="cf-columns two">\n' +
      '          <div class="cf-column">\n' +
      '            <h2 data-translate="blocked_why_headline">Why have I been blocked?</h2>\n' +
      '\n' +
      '            <p data-translate="blocked_why_detail">This website is using a security service to protect itself from online attacks. The action you just performed triggered the security solution. There are several actions that could trigger this block including submitting a certain word or phrase, a SQL command or malformed data.</p>\n' +
      '          </div>\n' +
      '\n' +
      '          <div class="cf-column">\n' +
      '            <h2 data-translate="blocked_resolve_headline">What can I do to resolve this?</h2>\n' +
      '\n' +
      '            <p data-translate="blocked_resolve_detail">You can email the site owner to let them know you were blocked. Please include what you were doing when this page came up and the Cloudflare Ray ID found at the bottom of this page.</p>\n' +
      '          </div>\n' +
      '        </div>\n' +
      '      </div><!-- /.section -->\n' +
      '\n' +
      '      <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">\n' +
      '  <p class="text-13">\n' +
      '    <span class="cf-footer-item sm:block sm:mb-1">Cloudflare Ray ID: <strong class="font-semibold">760d28b3ab18903d</strong></span>\n' +
      '    <span class="cf-footer-separator sm:hidden">&bull;</span>\n' +
      '    <span id="cf-footer-item-ip" class="cf-footer-item hidden sm:block sm:mb-1">\n' +
      '      Your IP:\n' +
      '      <button type="button" id="cf-footer-ip-reveal" class="cf-footer-ip-reveal-btn">Click to reveal</button>\n' +
      '      <span class="hidden" id="cf-footer-ip">86.57.68.238</span>\n' +
      '      <span class="cf-footer-separator sm:hidden">&bull;</span>\n' +
      '    </span>\n' +
      '    <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>\n' +
      '    \n' +
      '  </p>\n' +
      '  <script>(function(){function d(){var b=a.getElementById("cf-footer-item-ip"),c=a.getElementById("cf-footer-ip-reveal");b&&"classList"in b&&(b.classList.remove("hidden"),c.addEventListener("click",function(){c.classList.add("hidden");a.getElementById("cf-footer-ip").classList.remove("hidden")}))}var a=document;document.addEventListener&&a.addEventListener("DOMContentLoaded",d)})();</script>\n' +
      '</div><!-- /.error-footer -->\n' +
      '\n' +
      '\n' +
      '    </div><!-- /#cf-error-details -->\n' +
      '  </div><!-- /#cf-wrapper -->\n' +
      '\n' +
      '  <script>\n' +
      '  window._cf_translation = {};\n' +
      '  \n' +
      '  \n' +
      '</script>\n' +
      '\n' +
      '</body>\n' +
      '</html>\n',
    [Symbol(kCapture)]: false,
    [Symbol(kHeaders)]: {
      date: 'Thu, 27 Oct 2022 17:30:20 GMT',
      'content-type': 'text/html; charset=UTF-8',
      'transfer-encoding': 'chunked',
      connection: 'close',
      'cache-control': 'max-age=15',
      expires: 'Thu, 27 Oct 2022 17:30:35 GMT',
      'x-frame-options': 'SAMEORIGIN',
      'set-cookie': [Array],
      vary: 'Accept-Encoding',
      'strict-transport-security': 'max-age=0; includeSubDomains; preload',
      'x-content-type-options': 'nosniff',
      server: 'cloudflare',
      'cf-ray': '760d28b3ab18903d-FRA',
      'content-encoding': 'gzip'
    },
    [Symbol(kHeadersCount)]: 28,
    [Symbol(kTrailers)]: null,
    [Symbol(kTrailersCount)]: 0,
    [Symbol(RequestTimeout)]: undefined
  }
}
Angelk90 commented 1 year ago

@BaseMax : Were you able to get it working?

@JimmyLaurent : Using this module it would be possible to bypass cloudflare's checking.

enter image description here

BaseMax commented 1 year ago

@BaseMax : Were you able to get it working?

No :(

Using this module it would be possible to bypass cloudflare's checking.

Can you share more details about the solution?

Thanks

Angelk90 commented 1 year ago

@BaseMax : I haven't found a solution yet.