File size: 11,990 Bytes
c135c3c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 |
<!DOCTYPE html>
<html lang="vi">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>API Documentation - Professional Captcha Solver</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet" />
<link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/atom-one-dark.min.css" />
<style>
body {
background-color: #0d1117;
color: #c9d1d9;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica,
Arial, sans-serif;
}
.sidebar {
position: fixed;
top: 0;
bottom: 0;
left: 0;
z-index: 100;
padding: 48px 0 0;
box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.1);
width: 280px;
background-color: #161b22;
}
.sidebar-sticky {
position: relative;
top: 0;
height: calc(100vh - 48px);
padding-top: 0.5rem;
overflow-x: hidden;
overflow-y: auto;
}
.nav-link {
font-weight: 500;
color: #8b949e;
margin-bottom: 5px;
}
.nav-link:hover,
.nav-link.active {
color: #58a6ff;
background-color: rgba(255, 255, 255, 0.05);
border-radius: 6px;
}
main {
margin-left: 280px;
padding: 40px;
}
h1,
h2,
h3 {
color: #ffffff;
margin-top: 40px;
margin-bottom: 20px;
border-bottom: 1px solid #30363d;
padding-bottom: 10px;
}
h1 {
margin-top: 0;
border: none;
}
.card {
background-color: #161b22;
border: 1px solid #30363d;
margin-bottom: 20px;
}
.card-header {
background-color: #21262d;
border-bottom: 1px solid #30363d;
font-weight: bold;
color: #fff;
}
code {
color: #ff7b72;
word-wrap: break-word;
}
pre {
background-color: #0d1117;
border-radius: 6px;
padding: 15px;
border: 1px solid #30363d;
}
.badge-method {
background: #238636;
color: white;
padding: 5px 10px;
border-radius: 4px;
font-weight: bold;
}
.table {
color: #c9d1d9;
}
.table-dark {
--bs-table-bg: #161b22;
}
.api-endpoint {
background: #161b22;
padding: 15px;
border-radius: 6px;
border: 1px solid #30363d;
font-family: monospace;
font-size: 1.1em;
color: #a5d6ff;
}
.highlight-box {
background: rgba(56, 139, 253, 0.1);
border-left: 4px solid #58a6ff;
padding: 15px;
margin: 20px 0;
border-radius: 0 6px 6px 0;
}
.step-badge {
display: inline-block;
width: 24px;
height: 24px;
background: #58a6ff;
color: #0d1117;
border-radius: 50%;
text-align: center;
line-height: 24px;
font-weight: bold;
margin-right: 10px;
}
</style>
</head>
<body>
<nav class="sidebar">
<div class="position-sticky sidebar-sticky px-3">
<h4 class="text-white px-3 mb-4">📚 API Docs</h4>
<ul class="nav flex-column">
<li class="nav-item">
<a class="nav-link active" href="#intro">Giới thiệu</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#auth">Xác thực (Auth)</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#endpoint">API Endpoint</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#proxy">Cấu hình Proxy</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#integration">Quy trình Tích hợp</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#nodejs">Code mẫu: Node.js</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#python">Code mẫu: Python</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#csharp">Code mẫu: C#</a>
</li>
</ul>
<div class="mt-5 px-3">
<a href="/" class="btn btn-outline-primary w-100">← Quay lại Dashboard</a>
</div>
</div>
</nav>
<main>
<section id="intro">
<h1>Giới thiệu</h1>
<p class="lead">
Enterprise Captcha Solver cung cấp giải pháp tự động vượt qua các hệ thống bảo mật captcha tiên tiến nhất hiện
nay.
</p>
<div class="highlight-box">
<strong>Smart Config Implementation:</strong> Hệ thống của chúng tôi sử dụng công nghệ "Smart Selection".
</div>
</section>
<section id="auth">
<h2>🔐 Xác thực (Authentication)</h2>
<p>
Mọi request gửi đến API đều cần phải có
<strong>x-api-key</strong> trong Header.
</p>
<pre><code class="language-http">x-api-key: YOUR_API_KEY_HERE</code></pre>
</section>
<section id="endpoint">
<h2>📡 API Endpoint</h2>
<p>Gửi yêu cầu POST đến địa chỉ sau để nhận Token:</p>
<div class="api-endpoint mb-4">
<span class="badge-method me-2">POST</span>
https://kinxsoftware.online/api/solve
</div>
<pre><code class="language-json">{
"action": "FLOW_GENERATION",
"proxy": "http://user:pass@ip:port"
}</code></pre>
</section>
<section id="proxy">
<h2>🌐 Cấu hình Proxy</h2>
<p>Hệ thống hỗ trợ truyền Proxy riêng biệt cho mỗi yêu cầu. Khi được truyền vào, trình duyệt giải captcha sẽ sử
dụng Proxy này để tránh bị Google chặn IP.</p>
<div class="card">
<div class="card-header">Định dạng Proxy hỗ trợ</div>
<div class="card-body text-light">
<ul>
<li><strong>Không xác thực:</strong> <code>http://host:port</code></li>
<li><strong>Có xác thực:</strong> <code>http://username:password@host:port</code></li>
</ul>
<p class="mb-0 text-warning"><i class="bi bi-exclamation-triangle"></i> Lưu ý: Hiện tại hệ thống hỗ trợ tốt
nhất cho HTTP Proxy.</p>
</div>
</div>
</section>
<section id="integration">
<h2>⚙️ Quy trình Tích hợp Chuẩn</h2>
<p>
Sau khi nhận được <code>token</code> thành công, hãy thực hiện tích hợp vào Request mục tiêu theo các bước sau:
</p>
<h3><span class="step-badge">1</span> Chèn vào Headers</h3>
<p>Thêm các header sau để xác thực Token với máy chủ mục tiêu:</p>
<pre><code class="language-http">x-goog-recaptcha-token: [CAPTCHA_TOKEN]
x-recaptcha-token: [CAPTCHA_TOKEN]</code></pre>
<h3><span class="step-badge">2</span> Chèn vào Body (Context)</h3>
<p>
Trong Payload của request chính, hãy đảm bảo cấu trúc <code>clientContext</code> được thiết lập đúng:
</p>
<pre><code class="language-json">{
"clientContext": {
"recaptchaToken": "[CAPTCHA_TOKEN]",
"userPaygateTier": "PAYGATE_TIER_TWO",
"tool": "PINHOLE"
}
}</code></pre>
<h3><span class="step-badge">3</span> Đồng bộ User-Agent</h3>
<p>
<strong>Quan trọng:</strong> Bạn phải sử dụng đúng User-Agent dưới đây để đảm bảo Token được chấp nhận:
</p>
<pre><code class="language-text">Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36</code></pre>
</section>
<section id="nodejs">
<h2>🟩 Code mẫu: Node.js (Built-in)</h2>
<pre><code class="language-javascript">const http = require('http');
const https = require('https');
/**
* Script kiểm tra API giải captcha với Proxy
* Hỗ trợ cả HTTP và HTTPS, tự động chọn module phù hợp
*/
async function testCaptchaWithProxy() {
const API_URL = 'https://kinxsoftware.online/api/solve';
const API_KEY = 'YOUR_API_KEY_HERE';
const PROXY = 'http://user:pass@ip:port';
const postData = JSON.stringify({
action: 'FLOW_GENERATION',
proxy: PROXY
});
const url = new URL(API_URL);
const isHttps = url.protocol === 'https:';
const transport = isHttps ? https : http;
const options = {
hostname: url.hostname,
port: url.port || (isHttps ? 443 : 80),
path: url.pathname,
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-api-key': API_KEY,
'Content-Length': Buffer.byteLength(postData)
},
// Bỏ qua kiểm tra SSL nếu là localhost hoặc server tự cấp chứng chỉ
rejectUnauthorized: false
};
console.log('--- Đang gửi yêu cầu giải captcha với Proxy ---');
console.log('URL:', API_URL);
console.log('Proxy:', PROXY);
const req = transport.request(options, (res) => {
let data = '';
res.on('data', (chunk) => {
data += chunk;
});
res.on('end', () => {
console.log('Phản hồi từ Server:', res.statusCode);
try {
const jsonResponse = JSON.parse(data);
console.log('Kết quả:', JSON.stringify(jsonResponse, null, 2));
} catch (e) {
console.log('Phản hồi không phải JSON:', data);
}
});
});
req.on('error', (e) => {
console.error('Lỗi kết nối:', e.message);
});
req.write(postData);
req.end();
}
testCaptchaWithProxy();</code></pre>
</section>
<section id="python">
<h2>🐍 Code mẫu: Python (Requests)</h2>
<pre><code class="language-python">import requests
def solve_and_run():
# BƯỚC 1: Lấy Token từ API
url = "https://kinxsoftware.online/api/solve"
payload = {
"action": "FLOW_GENERATION",
"proxy": "http://user:pass@ip:port" # <-- Thêm proxy tại đây
}
headers = {"x-api-key": "YOUR_API_KEY_HERE"}
res = requests.post(url, json=payload, headers=headers, verify=False)
data = res.json()
token = data.get("token")
print(f"Token: {token}")
# BƯỚC 2: Tích hợp vào request mục tiêu (giữ nguyên User-Agent)
# ... code tích hợp tiếp theo
</code></pre>
</section>
<section id="csharp">
<h2>🔷 Code mẫu: C# (HttpClient)</h2>
<pre><code class="language-csharp">using System.Net.Http.Json;
// BƯỚC 1: Lấy Token
var client = new HttpClient();
client.DefaultRequestHeaders.Add("x-api-key", "YOUR_API_KEY_HERE");
var payloadSolver = new {
action = "FLOW_GENERATION",
proxy = "http://user:pass@ip:port" // <-- Thêm proxy tại đây
};
// Gửi yêu cầu giải captcha
var solverRes = await client.PostAsJsonAsync("https://kinxsoftware.online/api/solve", payloadSolver);
var solverData = await solverRes.Content.ReadFromJsonAsync<dynamic>();
string token = solverData.token;
Console.WriteLine($"Token: {token}");
</code></pre>
</section>
<footer class="mt-5 text-center text-muted border-top pt-4">
<p>© 2024 Captcha Solver Professional Service.</p>
</footer>
</main>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script>
<script>
hljs.highlightAll();
</script>
</body>
</html> |