Skip to content

Commit 57713ed

Browse files
victorkowalskivictorkowalski
andauthored
Prosopo (#40)
* Prosopo * readme upd * captchafox added * captchafox test upd * temu added * readme upd --------- Co-authored-by: victorkowalski <victorkowalski@yandex.ru>
1 parent 6fd0a86 commit 57713ed

22 files changed

Lines changed: 392 additions & 1 deletion

README.md

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ Examples of API requests for different captcha types are available on the [C# ca
4343
- [DataDome](#datadome)
4444
- [atbCAPTCHA](#atbcaptcha)
4545
- [Tencent](#tencent)
46+
- [Prosopo](#prosopo)
47+
- [Captchafox](#captchafox)
48+
- [Temu](#temu)
4649
- [VK Image](#vk-image)
4750
- [VK Captcha](#vk-captcha)
4851
- [Other methods](#other-methods)
@@ -490,6 +493,49 @@ tencent.SetAppId("190014885");
490493
tencent.SetPageUrl("https://www.example.com/");
491494
```
492495

496+
### Prosopo
497+
498+
<sup>[API method description.](https://2captcha.com/2captcha-api#prosopo-procaptcha)</sup>
499+
500+
Use this method to solve Prosopo and obtain a token to bypass the protection.
501+
502+
503+
```csharp
504+
Prosopo captcha = new Prosopo();
505+
506+
captcha.SetSiteKey("5EZVvsHMrKCFKp5NYNoTyDjTjetoVo1Z4UNNbTwJf1GfN6Xm");
507+
captcha.SetUrl("https://www.twickets.live/");
508+
```
509+
510+
### Captchafox
511+
512+
<sup>[API method description.](https://2captcha.com/2captcha-api#captchafox)</sup>
513+
514+
Use this method to solve Captchafox and obtain a token to bypass the protection.
515+
516+
517+
```csharp
518+
Captchafox captcha = new Captchafox();
519+
captcha.SetSiteKey("sk_ILKWNruBBVKDOM7dZs59KHnDLEWiH");
520+
captcha.SetUrl("https://mysite.com/page/with/captchafox");
521+
captcha.SetUserAgent("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36");
522+
captcha.SetProxy("HTTPS", "login:password@IP_address:PORT");
523+
```
524+
525+
### Temu
526+
527+
<sup>[API method description.](https://2captcha.com/2captcha-api#temucaptcha)</sup>
528+
529+
This method can be used to solve Temu. Returns a coordinates.
530+
531+
```csharp
532+
Temu captcha = new Temu();
533+
captcha.SetBody(bodyStr);
534+
captcha.SetPart1(part1Str);
535+
captcha.SetPart2(part2Str);
536+
captcha.SetPart3(part3Str);
537+
```
538+
493539
### VK Image
494540

495541
<sup>[API method description.](https://2captcha.com/2captcha-api#vkcaptcha)</sup>
@@ -508,7 +554,6 @@ string base64EncodedImage = Convert.ToBase64String(bytes);
508554
VkCaptcha captcha = new VkCaptcha("vkimage");
509555
captcha.SetBase64(base64EncodedImage);
510556
captcha.SetSteps("[5,12,22,24,21,23,10,7,2,8,19,18,8,24,21,22,11,14,16,5,18,20,4,21,12,6,0,0,11,12,8,20,19,3,14,8,9,13,16,24,18,3,2,23,8,12,6,1,11,0,20,15,19,22,17,24,8,0,12,5,19,14,11,6,7,14,23,24,23,20,4,20,6,12,4,17,4,18,6,20,17,5,23,7,10,2,8,9,5,4,17,24,11,14,4,10,12,22,21,2]");
511-
512557
```
513558

514559
### VK Captcha
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
using System;
2+
using System.Linq;
3+
using TwoCaptcha.Captcha;
4+
5+
namespace TwoCaptcha.Examples
6+
{
7+
public class CaptchafoxExample
8+
{
9+
public CaptchafoxExample(string apiKey)
10+
{
11+
TwoCaptcha solver = new TwoCaptcha(apiKey);
12+
13+
Captchafox captcha = new Captchafox();
14+
captcha.SetSiteKey("sk_ILKWNruBBVKDOM7dZs59KHnDLEWiH");
15+
captcha.SetUrl("https://mysite.com/page/with/captchafox");
16+
captcha.SetUserAgent("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36");
17+
captcha.SetProxy("HTTPS", "login:password@IP_address:PORT");
18+
19+
try
20+
{
21+
solver.Solve(captcha).Wait();
22+
Console.WriteLine("Captcha solved: " + captcha.Code);
23+
}
24+
catch (AggregateException e)
25+
{
26+
Console.WriteLine("Error occurred: " + e.InnerExceptions.First().Message);
27+
}
28+
}
29+
}
30+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
using System;
2+
using System.Linq;
3+
using TwoCaptcha.Captcha;
4+
5+
namespace TwoCaptcha.Examples
6+
{
7+
public class ProsopoExample
8+
{
9+
public ProsopoExample(string apiKey)
10+
{
11+
TwoCaptcha solver = new TwoCaptcha(apiKey);
12+
13+
Prosopo captcha = new Prosopo();
14+
captcha.SetSiteKey("5EZVvsHMrKCFKp5NYNoTyDjTjetoVo1Z4UNNbTwJf1GfN6Xm");
15+
captcha.SetUrl("https://www.twickets.live/");
16+
17+
try
18+
{
19+
solver.Solve(captcha).Wait();
20+
Console.WriteLine("Captcha solved: " + captcha.Code);
21+
}
22+
catch (AggregateException e)
23+
{
24+
Console.WriteLine("Error occurred: " + e.InnerExceptions.First().Message);
25+
}
26+
}
27+
}
28+
}

TwoCaptcha.Examples/Run.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,16 @@ public static void Main(string[] args)
199199
YandexOptionsExample YandexOptionsExample = new YandexOptionsExample(apiKey);
200200
break;
201201

202+
case "ProsopoExample":
203+
ProsopoExample ProsopoExample = new ProsopoExample(apiKey);
204+
break;
205+
206+
case "CaptchafoxExample":
207+
CaptchafoxExample CaptchafoxExample = new CaptchafoxExample(apiKey);
208+
break;
209+
210+
case "TemuExample":
211+
TemuExample TemuExample = new TemuExample(apiKey);
202212
case "VkImageExample":
203213
VkImageExample VkImageExample = new VkImageExample(apiKey);
204214
break;

TwoCaptcha.Examples/TemuExample.cs

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
using System;
2+
using System.IO;
3+
using System.Linq;
4+
using TwoCaptcha.Captcha;
5+
6+
namespace TwoCaptcha.Examples
7+
{
8+
public class TemuExample
9+
{
10+
public TemuExample(string apiKey)
11+
{
12+
TwoCaptcha solver = new TwoCaptcha(apiKey);
13+
14+
byte[] bodyBytes = File.ReadAllBytes("resources/temu/body.png");
15+
string bodyStr = Convert.ToBase64String(bodyBytes);
16+
17+
byte[] part1Bytes = File.ReadAllBytes("resources/temu/part1.png");
18+
string part1Str = Convert.ToBase64String(part1Bytes);
19+
20+
byte[] part2Bytes = File.ReadAllBytes("resources/temu/part2.png");
21+
string part2Str = Convert.ToBase64String(part2Bytes);
22+
23+
byte[] part3Bytes = File.ReadAllBytes("resources/temu/part3.png");
24+
string part3Str = Convert.ToBase64String(part3Bytes);
25+
26+
Temu captcha = new Temu();
27+
captcha.SetBody(bodyStr);
28+
captcha.SetPart1(part1Str);
29+
captcha.SetPart2(part2Str);
30+
captcha.SetPart3(part3Str);
31+
32+
try
33+
{
34+
solver.Solve(captcha).Wait();
35+
Console.WriteLine("Captcha solved: " + captcha.Code);
36+
}
37+
catch (AggregateException e)
38+
{
39+
Console.WriteLine("Error occurred: " + e.InnerExceptions.First().Message);
40+
}
41+
}
42+
}
43+
}

TwoCaptcha.Examples/TwoCaptcha.Examples.csproj

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,21 @@
1010
<ProjectReference Include="..\TwoCaptcha\TwoCaptcha.csproj" />
1111
</ItemGroup>
1212

13+
<ItemGroup>
14+
<Compile Update="Properties\Resources.Designer.cs">
15+
<DesignTime>True</DesignTime>
16+
<AutoGen>True</AutoGen>
17+
<DependentUpon>Resources.resx</DependentUpon>
18+
</Compile>
19+
</ItemGroup>
20+
21+
<ItemGroup>
22+
<EmbeddedResource Update="Properties\Resources.resx">
23+
<Generator>ResXFileCodeGenerator</Generator>
24+
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
25+
</EmbeddedResource>
26+
</ItemGroup>
27+
1328
<ItemGroup>
1429
<None Update="resources\audio-en.mp3">
1530
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
@@ -83,6 +98,28 @@
8398
</ItemGroup>
8499

85100
<ItemGroup>
101+
<None Update="resources\temu\body.png">
102+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
103+
</None>
104+
</ItemGroup>
105+
106+
<ItemGroup>
107+
<None Update="resources\temu\part1.png">
108+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
109+
</None>
110+
</ItemGroup>
111+
112+
<ItemGroup>
113+
<None Update="resources\temu\part2.png">
114+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
115+
</None>
116+
</ItemGroup>
117+
118+
<ItemGroup>
119+
<None Update="resources\temu\part3.png">
120+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
121+
</None>
122+
</ItemGroup>
86123
<None Update="resources\vk.jpg">
87124
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
88125
</None>
819 KB
Loading
15.9 KB
Loading
16.5 KB
Loading
8.27 KB
Loading

0 commit comments

Comments
 (0)