-
Notifications
You must be signed in to change notification settings - Fork 29
/
AmazonWafOptionsExample.cs
31 lines (28 loc) · 1.07 KB
/
AmazonWafOptionsExample.cs
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
using System;
using System.Linq;
using TwoCaptcha.Captcha;
namespace TwoCaptcha.Examples
{
public class AmazonWafOptionsExample
{
public AmazonWafOptionsExample(string apiKey)
{
TwoCaptcha solver = new TwoCaptcha(apiKey);
AmazonWaf captcha = new AmazonWaf();
captcha.SetSiteKey("AQIDAHjcYu/GjX+QlghicBgQ/7bFaQZ+m5FKCMDnO+vTbNg96AF5H1K/siwSLK7RfstKtN5bAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglg");
captcha.SetUrl("https://non-existent-example.execute-api.us-east-1.amazonaws.com");
captcha.SetContext("test_iv");
captcha.SetIV("test_context");
captcha.SetProxy("HTTPS", "login:password@IP_address:PORT");
try
{
solver.Solve(captcha).Wait();
Console.WriteLine("Captcha solved: " + captcha.Code);
}
catch (AggregateException e)
{
Console.WriteLine("Error occurred: " + e.InnerExceptions.First().Message);
}
}
}
}