-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathConfigFixture.cs
71 lines (66 loc) · 3.2 KB
/
ConfigFixture.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
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
using CaptchaSharp.Models;
using Newtonsoft.Json;
using System.IO;
namespace CaptchaSharp.Tests;
public class ConfigFixture
{
private const string _credentialsFile = "config.json";
public Config Config { get; set; }
public ConfigFixture()
{
if (File.Exists(_credentialsFile))
{
Config = JsonConvert.DeserializeObject<Config>(File.ReadAllText(_credentialsFile))!;
}
else
{
// Write a blank structure if it doesn't exist so that we don't have to manually create it from scratch
Config = new Config();
File.WriteAllText(_credentialsFile, JsonConvert.SerializeObject(Config, Formatting.Indented));
}
}
}
public class Config
{
public Credentials Credentials { get; set; } = new();
public SessionParams SessionParams { get; set; } = new();
}
public class Credentials
{
public string TwoCaptchaApiKey { get; set; } = string.Empty;
public string AntiCaptchaApiKey { get; set; } = string.Empty;
public string CustomTwoCaptchaApiKey { get; set; } = string.Empty;
public string CustomTwoCaptchaHost { get; set; } = string.Empty;
public int CustomTwoCaptchaPort { get; set; } = 80;
public bool CustomTwoCaptchaOverrideHostHeader { get; set; } = true;
public string DeathByCaptchaUsername { get; set; } = string.Empty;
public string DeathByCaptchaPassword { get; set; } = string.Empty;
public string CaptchaCoderApiKey { get; set; } = string.Empty;
public string HumanCoderApiKey { get; set; } = string.Empty;
public string ImageTyperzApiKey { get; set; } = string.Empty;
public string CapMonsterHost { get; set; } = string.Empty;
public int CapMonsterPort { get; set; } = 80;
public string AzCaptchaApiKey { get; set; } = string.Empty;
public string CaptchasIoApiKey { get; set; } = string.Empty;
public string RuCaptchaApiKey { get; set; } = string.Empty;
public string TrueCaptchaApiKey { get; set; } = string.Empty;
public string TrueCaptchaUsername { get; set; } = string.Empty;
public string NineKWApiKey { get; set; } = string.Empty;
public string CapSolverApiKey { get; set; } = string.Empty;
public string CapMonsterCloudApiKey { get; set; } = string.Empty;
public string MetaBypassTechClientId { get; set; } = string.Empty;
public string MetaBypassTechClientSecret { get; set; } = string.Empty;
public string MetaBypassTechUsername { get; set; } = string.Empty;
public string MetaBypassTechPassword { get; set; } = string.Empty;
public string NextCaptchaApiKey { get; set; } = string.Empty;
public string NoCaptchaAiApiKey { get; set; } = string.Empty;
public string NopechaApiKey { get; set; } = string.Empty;
public string BestCaptchaSolverApiKey { get; set; } = string.Empty;
public string CaptchaAiApiKey { get; set; } = string.Empty;
public string EzCaptchaApiKey { get; set; } = string.Empty;
public string SolveCaptchaApiKey { get; set; } = string.Empty;
public string EndCaptchaUsername { get; set; } = string.Empty;
public string EndCaptchaPassword { get; set; } = string.Empty;
public string CapGuruApiKey { get; set; } = string.Empty;
public string AycdApiKey { get; set; } = string.Empty;
}