advnpzn/akipy

Add mechanism/feature to bypass Cloudflare protection

Open

#10 opened on Jun 23, 2026

View on GitHub
 (2 comments) (0 reactions) (1 assignee)Python (9 forks)auto 404
bugenhancementhelp wanted

Repository metrics

Stars
 (14 stars)
PR merge metrics
 (PR metrics pending)

Description

Akinator.com seems to have started using Cloudflare for detection. (Way long before, but I was too lazy to create an issue and work on an implementation)

Sending requests without headers will be immediately rejected.

curl -sI https://en.akinator.com
HTTP/2 403 
date: Tue, 23 Jun 2026 19:24:12 GMT
content-type: text/html; charset=UTF-8
cache-control: private, max-age=0, no-store, no-cache, must-revalidate, post-check=0, pre-check=0
expires: Thu, 01 Jan 1970 00:00:01 GMT
referrer-policy: same-origin
x-frame-options: SAMEORIGIN
speculation-rules: "/cdn-cgi/speculation"
report-to: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=8BHTPcA3m5rywG36RPuHXVgjP2uaZOBzOxx176X4faiDejjK%2Bxr2x%2BnaVgrvVfwWMGpC0vm5ulCHBgzS4XR72fEEhDL9AiX26U40HYYFBVnHQqDzSdRE63HrvvIZzmoSJdpWgen0Cvx9b3OFMg%3D%3D"}]}
nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
server: cloudflare
cf-ray: a105df22cc377a04-PAT
alt-svc: h3=":443"; ma=86400

With a custom header, we will get the output, but it is not guaranteed that Cloudflare won't block it or give out additional methods for verifying genuine requests.

curl -sI https://en.akinator.com -H "User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.92 Safari/537.36" -H "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" 2>&1
HTTP/2 200 
date: Tue, 23 Jun 2026 19:09:03 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
x-frame-options: SAMEORIGIN
x-content-type-options: nosniff
strict-transport-security: max-age=31536000; includeSubDomains
referrer-policy: strict-origin-when-cross-origin
cache-control: max-age=2592000
cache-control: private
expires: Thu, 23 Jul 2026 19:09:03 GMT
x-iplb-request-id: AC46BFB7:4944_576298FD:0050_6A3AD9CF_8B9DE35:102833
x-iplb-instance: 61920
set-cookie: SERVERID250165=f6c143d3|ajrZ0|ajrZ0; path=/; HttpOnly
cf-cache-status: DYNAMIC
speculation-rules: "/cdn-cgi/speculation"
server-timing: cfCacheStatus;desc="DYNAMIC"
server-timing: cfEdge;dur=17,cfOrigin;dur=451
report-to: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=1PPx3bTlv9BdvXmXMSKNj3LvCM7yujS0Yp%2F0Q%2FHSieDWSrb4x3O5Ys4Vsnbmw2guN3OaMBIV%2BuCib6KF5YGUjgZ4tYNTfj7g5afs%2FbSrFeWEPlOnvpnTgJzDP5iz6E%2BLHsV9CI67NHAgSy%2BFbA%3D%3D"}]}
nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
cf-ray: a105c8edb9377950-AMD
alt-svc: h3=":443"; ma=86400

So, a clever mechanism must be built to bypass the Cloudflare verification. what I would suggest is, a combo of these techniques.

  1. Browser-like header rotation/generation.
  2. Providing an interface to connect with a FlareSolverr instance (https://github.com/FlareSolverr/FlareSolverr)

Both can be used while one acting as a fallback mechanism in case if one fails to work.

Contributor guide