-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathCyberSiARAExample.cs
More file actions
29 lines (26 loc) · 945 Bytes
/
CyberSiARAExample.cs
File metadata and controls
29 lines (26 loc) · 945 Bytes
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
using System;
using System.Linq;
using TwoCaptcha.Captcha;
namespace TwoCaptcha.Examples
{
public class CyberSiARAExample
{
public CyberSiARAExample(string apiKey)
{
TwoCaptcha solver = new TwoCaptcha(apiKey);
CyberSiARA cyberSiARA = new CyberSiARA();
cyberSiARA.SetMasterUrlId("tpjOCKjjpdzv3d8Ub2E9COEWKt1vl1Mv");
cyberSiARA.SetPageUrl("https://demo.mycybersiara.com/");
cyberSiARA.SetUserAgent("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36");
try
{
solver.Solve(cyberSiARA).Wait();
Console.WriteLine("Captcha solved: " + cyberSiARA.Code);
}
catch (AggregateException e)
{
Console.WriteLine("Error occurred: " + e.InnerExceptions.First().Message);
}
}
}
}