mirror of
https://github.com/openbullet/openbullet.git
synced 2023-10-21 07:33:42 -05:00
Added a new captcha service for custom servers that implement the 2Captcha API.
This commit is contained in:
@@ -72,6 +72,19 @@
|
||||
<Label DockPanel.Dock="Left" Content="CaptchasIO API Key" />
|
||||
<TextBox Grid.Column="0" Text="{Binding CIOToken}" Margin="0 0 5 0" />
|
||||
</DockPanel>
|
||||
<DockPanel>
|
||||
<Label DockPanel.Dock="Left" Content="Custom 2Captcha Server (API Key | Domain | Port)" />
|
||||
<Grid DockPanel.Dock="Left">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBox Grid.Column="0" Text="{Binding CustomTwoCapToken}" Margin="0 0 5 0" />
|
||||
<TextBox Grid.Column="1" Text="{Binding CustomTwoCapDomain}" Margin="5 0 0 0"/>
|
||||
<xctk:IntegerUpDown Grid.Column="2" Background="Transparent" Width="100" Minimum="0" Maximum="65535" Margin="10 0 0 0" Value="{Binding CustomTwoCapPort}" Foreground="{DynamicResource ForegroundMain}" HorizontalAlignment="Right"/>
|
||||
</Grid>
|
||||
</DockPanel>
|
||||
|
||||
<DockPanel>
|
||||
<CheckBox DockPanel.Dock="Top" Content="Bypass Balance Check (useful for OCR Software)" IsChecked="{Binding BypassBalanceCheck}" VerticalContentAlignment="Center"/>
|
||||
|
||||
@@ -36,42 +36,47 @@ namespace OpenBullet
|
||||
|
||||
try
|
||||
{
|
||||
switch (Globals.rlSettings.Captchas.CurrentService)
|
||||
var cs = Globals.rlSettings.Captchas;
|
||||
switch (cs.CurrentService)
|
||||
{
|
||||
case BlockCaptcha.CaptchaService.AntiCaptcha:
|
||||
balance = new AntiCaptcha(Globals.rlSettings.Captchas.AntiCapToken, Globals.rlSettings.Captchas.Timeout).GetBalance();
|
||||
balance = new AntiCaptcha(cs.AntiCapToken, cs.Timeout).GetBalance();
|
||||
break;
|
||||
|
||||
case BlockCaptcha.CaptchaService.DBC:
|
||||
balance = new DeathByCaptcha(Globals.rlSettings.Captchas.DBCUser, Globals.rlSettings.Captchas.DBCPass, Globals.rlSettings.Captchas.Timeout).GetBalance();
|
||||
balance = new DeathByCaptcha(cs.DBCUser, cs.DBCPass, cs.Timeout).GetBalance();
|
||||
break;
|
||||
|
||||
case BlockCaptcha.CaptchaService.DeCaptcher:
|
||||
balance = new DeCaptcher(Globals.rlSettings.Captchas.DCUser, Globals.rlSettings.Captchas.DCPass, Globals.rlSettings.Captchas.Timeout).GetBalance();
|
||||
balance = new DeCaptcher(cs.DCUser, cs.DCPass, cs.Timeout).GetBalance();
|
||||
break;
|
||||
|
||||
case BlockCaptcha.CaptchaService.ImageTypers:
|
||||
balance = new ImageTyperz(Globals.rlSettings.Captchas.ImageTypToken, Globals.rlSettings.Captchas.Timeout).GetBalance();
|
||||
balance = new ImageTyperz(cs.ImageTypToken, cs.Timeout).GetBalance();
|
||||
break;
|
||||
|
||||
case BlockCaptcha.CaptchaService.TwoCaptcha:
|
||||
balance = new TwoCaptcha(Globals.rlSettings.Captchas.TwoCapToken, Globals.rlSettings.Captchas.Timeout).GetBalance();
|
||||
balance = new TwoCaptcha(cs.TwoCapToken, cs.Timeout).GetBalance();
|
||||
break;
|
||||
|
||||
case BlockCaptcha.CaptchaService.RuCaptcha:
|
||||
balance = new RuCaptcha(Globals.rlSettings.Captchas.RuCapToken, Globals.rlSettings.Captchas.Timeout).GetBalance();
|
||||
balance = new RuCaptcha(cs.RuCapToken, cs.Timeout).GetBalance();
|
||||
break;
|
||||
|
||||
case BlockCaptcha.CaptchaService.AZCaptcha:
|
||||
balance = new AZCaptcha(Globals.rlSettings.Captchas.AZCapToken, Globals.rlSettings.Captchas.Timeout).GetBalance();
|
||||
balance = new AZCaptcha(cs.AZCapToken, cs.Timeout).GetBalance();
|
||||
break;
|
||||
|
||||
case BlockCaptcha.CaptchaService.SolveRecaptcha:
|
||||
balance = new SolveReCaptcha(Globals.rlSettings.Captchas.SRUserId, Globals.rlSettings.Captchas.SRToken, Globals.rlSettings.Captchas.Timeout).GetBalance();
|
||||
balance = new SolveReCaptcha(cs.SRUserId, cs.SRToken, cs.Timeout).GetBalance();
|
||||
break;
|
||||
|
||||
case BlockCaptcha.CaptchaService.CaptchasIO:
|
||||
balance = new CaptchasIO(Globals.rlSettings.Captchas.CIOToken, Globals.rlSettings.Captchas.Timeout).GetBalance();
|
||||
balance = new CaptchasIO(cs.CIOToken, cs.Timeout).GetBalance();
|
||||
break;
|
||||
|
||||
case BlockCaptcha.CaptchaService.CustomTwoCaptcha:
|
||||
balance = new CustomTwoCaptcha(cs.CustomTwoCapToken, cs.CustomTwoCapDomain, cs.CustomTwoCapPort, cs.Timeout).GetBalance();
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
@@ -146,8 +146,11 @@ namespace RuriLib
|
||||
|
||||
request.UserAgent = ReplaceValues(userAgent, data);
|
||||
|
||||
var twoCapToken = data.GlobalSettings.Captchas.TwoCapToken;
|
||||
if (twoCapToken != "") request.CaptchaSolver = new TwoCaptchaSolver() { ApiKey = data.GlobalSettings.Captchas.TwoCapToken };
|
||||
var cs = data.GlobalSettings.Captchas;
|
||||
if (cs.TwoCapToken != "")
|
||||
{
|
||||
request.CaptchaSolver = new TwoCaptchaSolver() { ApiKey = cs.TwoCapToken };
|
||||
}
|
||||
|
||||
var response = request.GetThroughCloudflare(new Uri(localUrl));
|
||||
var responseString = response.ToString();
|
||||
|
||||
@@ -40,7 +40,10 @@ namespace RuriLib
|
||||
TwoCaptcha,
|
||||
|
||||
/// <summary>The service provided by https://rucaptcha.com/</summary>
|
||||
RuCaptcha
|
||||
RuCaptcha,
|
||||
|
||||
/// <summary>The service provided by a custom server using the official 2Captcha API.</summary>
|
||||
CustomTwoCaptcha
|
||||
}
|
||||
|
||||
/// <summary>The balance of the account of the captcha-solving service.</summary>
|
||||
@@ -58,42 +61,47 @@ namespace RuriLib
|
||||
// Get balance. If balance is under a certain threshold, don't ask for captcha solve
|
||||
Balance = 0; // Reset it or the block will save it for future calls
|
||||
data.Log(new LogEntry("Checking balance...", Colors.White));
|
||||
switch (data.GlobalSettings.Captchas.CurrentService)
|
||||
var cs = data.GlobalSettings.Captchas;
|
||||
switch (cs.CurrentService)
|
||||
{
|
||||
case CaptchaService.ImageTypers:
|
||||
Balance = new ImageTyperz(data.GlobalSettings.Captchas.ImageTypToken, data.GlobalSettings.Captchas.Timeout).GetBalance();
|
||||
Balance = new ImageTyperz(cs.ImageTypToken, cs.Timeout).GetBalance();
|
||||
break;
|
||||
|
||||
case CaptchaService.AntiCaptcha:
|
||||
Balance = new AntiCaptcha(data.GlobalSettings.Captchas.AntiCapToken, data.GlobalSettings.Captchas.Timeout).GetBalance();
|
||||
Balance = new AntiCaptcha(cs.AntiCapToken, cs.Timeout).GetBalance();
|
||||
break;
|
||||
|
||||
case CaptchaService.DBC:
|
||||
Balance = new DeathByCaptcha(data.GlobalSettings.Captchas.DBCUser, data.GlobalSettings.Captchas.DBCPass, data.GlobalSettings.Captchas.Timeout).GetBalance();
|
||||
Balance = new DeathByCaptcha(cs.DBCUser, cs.DBCPass, cs.Timeout).GetBalance();
|
||||
break;
|
||||
|
||||
case CaptchaService.TwoCaptcha:
|
||||
Balance = new TwoCaptcha(data.GlobalSettings.Captchas.TwoCapToken, data.GlobalSettings.Captchas.Timeout).GetBalance();
|
||||
Balance = new TwoCaptcha(cs.TwoCapToken, cs.Timeout).GetBalance();
|
||||
break;
|
||||
|
||||
case CaptchaService.RuCaptcha:
|
||||
Balance = new RuCaptcha(data.GlobalSettings.Captchas.RuCapToken, data.GlobalSettings.Captchas.Timeout).GetBalance();
|
||||
Balance = new RuCaptcha(cs.RuCapToken, cs.Timeout).GetBalance();
|
||||
break;
|
||||
|
||||
case CaptchaService.DeCaptcher:
|
||||
Balance = new DeCaptcher(data.GlobalSettings.Captchas.DCUser, data.GlobalSettings.Captchas.DCPass, data.GlobalSettings.Captchas.Timeout).GetBalance();
|
||||
Balance = new DeCaptcher(cs.DCUser, cs.DCPass, cs.Timeout).GetBalance();
|
||||
break;
|
||||
|
||||
case CaptchaService.AZCaptcha:
|
||||
Balance = new AZCaptcha(data.GlobalSettings.Captchas.AZCapToken, data.GlobalSettings.Captchas.Timeout).GetBalance();
|
||||
Balance = new AZCaptcha(cs.AZCapToken, cs.Timeout).GetBalance();
|
||||
break;
|
||||
|
||||
case CaptchaService.SolveRecaptcha:
|
||||
Balance = new SolveReCaptcha(data.GlobalSettings.Captchas.SRUserId, data.GlobalSettings.Captchas.SRToken, data.GlobalSettings.Captchas.Timeout).GetBalance();
|
||||
Balance = new SolveReCaptcha(cs.SRUserId, cs.SRToken, cs.Timeout).GetBalance();
|
||||
break;
|
||||
|
||||
case CaptchaService.CaptchasIO:
|
||||
Balance = new CaptchasIO(data.GlobalSettings.Captchas.CIOToken, data.GlobalSettings.Captchas.Timeout).GetBalance();
|
||||
Balance = new CaptchasIO(cs.CIOToken, cs.Timeout).GetBalance();
|
||||
break;
|
||||
|
||||
case CaptchaService.CustomTwoCaptcha:
|
||||
Balance = new CustomTwoCaptcha(cs.CustomTwoCapToken, cs.CustomTwoCapDomain, cs.CustomTwoCapPort, cs.Timeout).GetBalance();
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
@@ -137,38 +137,43 @@ namespace RuriLib
|
||||
var bitmap = new Bitmap(captchaFile);
|
||||
try
|
||||
{
|
||||
switch (data.GlobalSettings.Captchas.CurrentService)
|
||||
var cs = data.GlobalSettings.Captchas;
|
||||
switch (cs.CurrentService)
|
||||
{
|
||||
case CaptchaService.ImageTypers:
|
||||
service = new ImageTyperz(data.GlobalSettings.Captchas.ImageTypToken, data.GlobalSettings.Captchas.Timeout);
|
||||
service = new ImageTyperz(cs.ImageTypToken, cs.Timeout);
|
||||
break;
|
||||
|
||||
case CaptchaService.AntiCaptcha:
|
||||
service = new AntiCaptcha(data.GlobalSettings.Captchas.AntiCapToken, data.GlobalSettings.Captchas.Timeout);
|
||||
service = new AntiCaptcha(cs.AntiCapToken, cs.Timeout);
|
||||
break;
|
||||
|
||||
case CaptchaService.DBC:
|
||||
service = new DeathByCaptcha(data.GlobalSettings.Captchas.DBCUser, data.GlobalSettings.Captchas.DBCPass, data.GlobalSettings.Captchas.Timeout);
|
||||
service = new DeathByCaptcha(cs.DBCUser, cs.DBCPass, cs.Timeout);
|
||||
break;
|
||||
|
||||
case CaptchaService.TwoCaptcha:
|
||||
service = new TwoCaptcha(data.GlobalSettings.Captchas.TwoCapToken, data.GlobalSettings.Captchas.Timeout);
|
||||
service = new TwoCaptcha(cs.TwoCapToken, cs.Timeout);
|
||||
break;
|
||||
|
||||
case CaptchaService.RuCaptcha:
|
||||
service = new RuCaptcha(data.GlobalSettings.Captchas.RuCapToken, data.GlobalSettings.Captchas.Timeout);
|
||||
service = new RuCaptcha(cs.RuCapToken, cs.Timeout);
|
||||
break;
|
||||
|
||||
case CaptchaService.DeCaptcher:
|
||||
service = new DeCaptcher(data.GlobalSettings.Captchas.DCUser, data.GlobalSettings.Captchas.DCPass, data.GlobalSettings.Captchas.Timeout);
|
||||
service = new DeCaptcher(cs.DCUser, cs.DCPass, cs.Timeout);
|
||||
break;
|
||||
|
||||
case CaptchaService.AZCaptcha:
|
||||
service = new AZCaptcha(data.GlobalSettings.Captchas.AZCapToken, data.GlobalSettings.Captchas.Timeout);
|
||||
service = new AZCaptcha(cs.AZCapToken, cs.Timeout);
|
||||
break;
|
||||
|
||||
case CaptchaService.CaptchasIO:
|
||||
service = new CaptchasIO(data.GlobalSettings.Captchas.CIOToken, data.GlobalSettings.Captchas.Timeout);
|
||||
service = new CaptchasIO(cs.CIOToken, cs.Timeout);
|
||||
break;
|
||||
|
||||
case CaptchaService.CustomTwoCaptcha:
|
||||
service = new CustomTwoCaptcha(cs.CustomTwoCapToken, cs.CustomTwoCapDomain, cs.CustomTwoCapPort, cs.Timeout);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
@@ -86,42 +86,47 @@ namespace RuriLib
|
||||
string recapResponse = "";
|
||||
CaptchaServices.CaptchaService service = null;
|
||||
|
||||
switch (data.GlobalSettings.Captchas.CurrentService)
|
||||
var cs = data.GlobalSettings.Captchas;
|
||||
switch (cs.CurrentService)
|
||||
{
|
||||
case CaptchaService.ImageTypers:
|
||||
service = new ImageTyperz(data.GlobalSettings.Captchas.ImageTypToken, data.GlobalSettings.Captchas.Timeout);
|
||||
service = new ImageTyperz(cs.ImageTypToken, cs.Timeout);
|
||||
break;
|
||||
|
||||
case CaptchaService.AntiCaptcha:
|
||||
service = new AntiCaptcha(data.GlobalSettings.Captchas.AntiCapToken, data.GlobalSettings.Captchas.Timeout);
|
||||
service = new AntiCaptcha(cs.AntiCapToken, cs.Timeout);
|
||||
break;
|
||||
|
||||
case CaptchaService.DBC:
|
||||
service = new DeathByCaptcha(data.GlobalSettings.Captchas.DBCUser, data.GlobalSettings.Captchas.DBCPass, data.GlobalSettings.Captchas.Timeout);
|
||||
service = new DeathByCaptcha(cs.DBCUser, cs.DBCPass, cs.Timeout);
|
||||
break;
|
||||
|
||||
case CaptchaService.TwoCaptcha:
|
||||
service = new TwoCaptcha(data.GlobalSettings.Captchas.TwoCapToken, data.GlobalSettings.Captchas.Timeout);
|
||||
service = new TwoCaptcha(cs.TwoCapToken, cs.Timeout);
|
||||
break;
|
||||
|
||||
case CaptchaService.RuCaptcha:
|
||||
service = new RuCaptcha(data.GlobalSettings.Captchas.RuCapToken, data.GlobalSettings.Captchas.Timeout);
|
||||
service = new RuCaptcha(cs.RuCapToken, cs.Timeout);
|
||||
break;
|
||||
|
||||
case CaptchaService.DeCaptcher:
|
||||
service = new DeCaptcher(data.GlobalSettings.Captchas.DCUser, data.GlobalSettings.Captchas.DCPass, data.GlobalSettings.Captchas.Timeout);
|
||||
service = new DeCaptcher(cs.DCUser, cs.DCPass, cs.Timeout);
|
||||
break;
|
||||
|
||||
case CaptchaService.AZCaptcha:
|
||||
service = new AZCaptcha(data.GlobalSettings.Captchas.AZCapToken, data.GlobalSettings.Captchas.Timeout);
|
||||
service = new AZCaptcha(cs.AZCapToken, cs.Timeout);
|
||||
break;
|
||||
|
||||
case CaptchaService.SolveRecaptcha:
|
||||
service = new SolveReCaptcha(data.GlobalSettings.Captchas.SRUserId, data.GlobalSettings.Captchas.SRToken, data.GlobalSettings.Captchas.Timeout);
|
||||
service = new SolveReCaptcha(cs.SRUserId, cs.SRToken, cs.Timeout);
|
||||
break;
|
||||
|
||||
case CaptchaService.CaptchasIO:
|
||||
service = new CaptchasIO(data.GlobalSettings.Captchas.CIOToken, data.GlobalSettings.Captchas.Timeout);
|
||||
service = new CaptchasIO(cs.CIOToken, cs.Timeout);
|
||||
break;
|
||||
|
||||
case CaptchaService.CustomTwoCaptcha:
|
||||
service = new CustomTwoCaptcha(cs.CustomTwoCapToken, cs.CustomTwoCapDomain, cs.CustomTwoCapPort, cs.Timeout);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
@@ -36,6 +36,12 @@ namespace RuriLib.CaptchaServices
|
||||
/// <summary>The password to access the captcha service.</summary>
|
||||
public string Pass { get; set; }
|
||||
|
||||
/// <summary>The custom server's domain.</summary>
|
||||
public string Domain { get; set; }
|
||||
|
||||
/// <summary>The custom server's port.</summary>
|
||||
public int Port { get; set; }
|
||||
|
||||
/// <summary>The maximum time to wait for captcha completion.</summary>
|
||||
public int Timeout { get; set; }
|
||||
|
||||
@@ -71,6 +77,21 @@ namespace RuriLib.CaptchaServices
|
||||
Status = CaptchaStatus.Idle;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a captcha service that authenticates via api key on a custom server.
|
||||
/// </summary>
|
||||
/// <param name="apiKey">The API key of your account</param>
|
||||
/// <param name="domain">The server's domain</param>
|
||||
/// <param name="port">The server's port</param>
|
||||
/// <param name="timeout">The maximum time to wait for captcha completion</param>
|
||||
public CaptchaService(string apiKey, string domain, int port, int timeout)
|
||||
{
|
||||
ApiKey = apiKey;
|
||||
Domain = domain;
|
||||
Port = port;
|
||||
Timeout = timeout;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the remaining balance in the account.
|
||||
/// </summary>
|
||||
|
||||
@@ -0,0 +1,103 @@
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Imaging;
|
||||
using System.Globalization;
|
||||
using System.Net;
|
||||
using System.Threading;
|
||||
|
||||
namespace RuriLib.CaptchaServices
|
||||
{
|
||||
/// <summary>
|
||||
/// Implements the API of https://2captcha.com
|
||||
/// </summary>
|
||||
public class CustomTwoCaptcha : CaptchaService
|
||||
{
|
||||
/// <summary>
|
||||
/// Creates a client that uses the official 2Captcha API on a custom domain.
|
||||
/// </summary>
|
||||
///
|
||||
/// <param name="apiKey">The 2Captcha API key</param>
|
||||
/// <param name="domain">The custom server's domain</param>
|
||||
/// <param name="port">The custom server's port</param>
|
||||
/// <param name="timeout">The maximum time to wait for the challenge to be solved</param>
|
||||
public CustomTwoCaptcha(string apiKey, string domain, int port, int timeout) : base(apiKey, domain, port, timeout) { }
|
||||
|
||||
/// <inheritdoc />
|
||||
public override double GetBalance()
|
||||
{
|
||||
using (CWebClient client = new CWebClient())
|
||||
{
|
||||
if (Timeout > 0) client.Timeout = Timeout;
|
||||
var response = client.DownloadString($"http://{Domain}:{Port}/res.php?key={ApiKey}&action=getbalance");
|
||||
return double.Parse(response, CultureInfo.InvariantCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string SolveRecaptcha(string siteKey, string siteUrl)
|
||||
{
|
||||
// Create task
|
||||
using (CWebClient client = new CWebClient())
|
||||
{
|
||||
if (Timeout > 0) client.Timeout = Timeout;
|
||||
var response = client.DownloadString($"http://{Domain}:{Port}/in.php?key={ApiKey}&method=userrecaptcha&googlekey={siteKey}&pageurl={siteUrl}");
|
||||
if (!response.StartsWith("OK")) throw new Exception(response);
|
||||
TaskId = response.Split('|')[1];
|
||||
Status = CaptchaStatus.Processing;
|
||||
|
||||
// Check if task has been completed
|
||||
DateTime start = DateTime.Now;
|
||||
while (Status == CaptchaStatus.Processing && (DateTime.Now - start).TotalSeconds < Timeout)
|
||||
{
|
||||
Thread.Sleep(5000);
|
||||
response = client.DownloadString($"http://{Domain}:{Port}/res.php?key={ApiKey}&action=get&id={TaskId}");
|
||||
if (response.Contains("NOT_READY")) continue;
|
||||
if (response.Contains("ERROR")) throw new Exception(response);
|
||||
Status = CaptchaStatus.Completed;
|
||||
return response.Split('|')[1];
|
||||
}
|
||||
throw new TimeoutException();
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string SolveCaptcha(Bitmap bitmap)
|
||||
{
|
||||
// Create task
|
||||
using (CWebClient client = new CWebClient())
|
||||
{
|
||||
if (Timeout > 0) client.Timeout = Timeout;
|
||||
client.Headers.Add(HttpRequestHeader.ContentType, "application/x-www-form-urlencoded");
|
||||
var response = client.UploadString($"http://{Domain}{Port}/in.php",
|
||||
$"key={ApiKey}&method=base64®sense=1&body={EscapeLongString(GetBase64(bitmap, ImageFormat.Bmp))}");
|
||||
if (!response.StartsWith("OK")) throw new Exception(response);
|
||||
TaskId = response.Split('|')[1];
|
||||
Status = CaptchaStatus.Processing;
|
||||
|
||||
// Check if task has been completed
|
||||
DateTime start = DateTime.Now;
|
||||
while (Status == CaptchaStatus.Processing && (DateTime.Now - start).TotalSeconds < Timeout)
|
||||
{
|
||||
Thread.Sleep(5000);
|
||||
response = client.DownloadString($"http://{Domain}:{Port}/res.php?key={ApiKey}&action=get&id={TaskId}");
|
||||
if (response.Contains("NOT_READY")) continue;
|
||||
if (response.Contains("ERROR")) throw new Exception(response);
|
||||
Status = CaptchaStatus.Completed;
|
||||
return response.Split('|')[1];
|
||||
}
|
||||
throw new TimeoutException();
|
||||
}
|
||||
}
|
||||
|
||||
#pragma warning disable 0414
|
||||
#pragma warning disable 0649
|
||||
class GenericResponse
|
||||
{
|
||||
public int status;
|
||||
public string request;
|
||||
}
|
||||
#pragma warning restore 0414
|
||||
#pragma warning restore 0649
|
||||
}
|
||||
}
|
||||
@@ -209,6 +209,7 @@
|
||||
<Compile Include="Blocks\BlockLSCode.cs" />
|
||||
<Compile Include="Blocks\BlockTCP.cs" />
|
||||
<Compile Include="CaptchaServices\CaptchasIO.cs" />
|
||||
<Compile Include="CaptchaServices\CustomTwoCaptcha.cs" />
|
||||
<Compile Include="CaptchaServices\RuCaptcha.cs" />
|
||||
<Compile Include="GZip.cs" />
|
||||
<Compile Include="LoliScript\Exceptions\BlockProcessingException.cs" />
|
||||
|
||||
@@ -64,6 +64,18 @@ namespace RuriLib.ViewModels
|
||||
/// <summary>The CaptchaDecoder API Token.</summary>
|
||||
public string CDToken { get { return cdToken; } set { cdToken = value; OnPropertyChanged(); } }
|
||||
|
||||
private string customTwoCapToken = "";
|
||||
/// <summary>The custom 2Captcha API Token.</summary>
|
||||
public string CustomTwoCapToken { get { return customTwoCapToken; } set { customTwoCapToken = value; OnPropertyChanged(); } }
|
||||
|
||||
private string customTwoCapDomain = "example.com";
|
||||
/// <summary>The custom 2Captcha server's domain.</summary>
|
||||
public string CustomTwoCapDomain { get { return customTwoCapDomain; } set { customTwoCapDomain = value; OnPropertyChanged(); } }
|
||||
|
||||
private int customTwoCapPort = 80;
|
||||
/// <summary>The custom 2Captcha server's port.</summary>
|
||||
public int CustomTwoCapPort { get { return customTwoCapPort; } set { customTwoCapPort = value; OnPropertyChanged(); } }
|
||||
|
||||
private bool bypassBalanceCheck = false;
|
||||
/// <summary>Whether to bypass the balance check before solving a captcha challenge.</summary>
|
||||
public bool BypassBalanceCheck { get { return bypassBalanceCheck; } set { bypassBalanceCheck = value; OnPropertyChanged(); } }
|
||||
|
||||
Reference in New Issue
Block a user