惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

爱范儿
爱范儿
T
The Blog of Author Tim Ferriss
G
Google Developers Blog
博客园_首页
博客园 - 【当耐特】
量子位
S
SegmentFault 最新的问题
B
Blog RSS Feed
酷 壳 – CoolShell
酷 壳 – CoolShell
V
Visual Studio Blog
T
Tailwind CSS Blog
阮一峰的网络日志
阮一峰的网络日志
V
V2EX
Y
Y Combinator Blog
博客园 - 聂微东
The Cloudflare Blog
小众软件
小众软件
J
Java Code Geeks
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
月光博客
月光博客
H
Help Net Security
Jina AI
Jina AI
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
宝玉的分享
宝玉的分享

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Python library to bypass Cloudflare/G captcha v2 LOCALLY
Sinfolke · 2026-06-25 · via DEV Community

Sinfolke

Real world example

Site name is hidden

import asyncio
from pylcaptcha.http import BrowserHTTP
async def main(imei_number: str):
            async with BrowserHTTP() as protocol:
                await protocol.get('https://hidden', browser=True)  # solve captcha on loading
                await protocol.sync_csrf_token(
                    selector='meta[name="csrf-token"]',
                    header_name='x-csrf-token'
                )
                await protocol.get('https://hidden/ajax/model', params={'query': imei_number})
                result = await protocol.post('https://hidden/ajax/imei', data={
                    'imei': imei_number,
                    'token': await protocol.get_cf_token()
                })
                return result.text

if __name__ == '__main__':
    asyncio.run(main('3541...'))

As you can see the BrowserHTTP() handles captcha automatically under the hood. It finds that, solve, store tokens and auto add them to further requests. User simply should specify when to open browser for solution with browser=True. This page use cloudflare captcha. The same apply to google captcha -> auto defined, solved and token attached automatically.

How It Solves the Hard Stuff Under the Hood

Beating Behavior Telemetry with Bézier Math

Modern anti-bot systems track not only your IP and captcha results. Straight lines or instant jumps flag you as a bot immediately. To bypass this, the library drives interaction elements using a custom human-simulation class. It calculates dynamic Bézier curves mapped to a cubic-out easing function. The mouse pointer accelerates rapidly outwards and heavily decelerates as it approaches the checkbox target, matching human physics perfectly.

On-the-Fly Computer Vision for reCAPTCHA v2

The most complex part of this project was tackling visual challenges. There are two kinds of challanges: click image and squares.

Click image

This is less complex than click squares. For this purpose i've trained classification models, that determine whether this image has Car, Bicycle or else object. If threeshold is high enough, it clicks the image. To achieve this, the 3x3 or 4x4 grid is split to separate images. Every image is feed to classification model.

Click squares

This is where i had to work most of the time. You must find the actual object borders on an image. This required to train detection model, remove away borders from challange, find object, map to coordinates on challange and get final squares to check.

This library is currently a work-in-progress and is a personal engineering playground rather than a bulletproof production suite. Image recognition sets always need more training data, and edge firewalls are a moving target.

I would love to hear feedback from the community regarding how you handle session synchronization across dynamic async workers!

github