/// <summary> /// Initializes all default providers. /// </summary> public Providers(RuriLibSettingsService settings) { if (settings != null) { RandomUA = new DefaultRandomUAProvider(settings); Captcha = new CaptchaSharpProvider(settings); PuppeteerBrowser = new DefaultPuppeteerBrowserProvider(settings); ProxySettings = new DefaultProxySettingsProvider(settings); Security = new DefaultSecurityProvider(settings); } RNG = new DefaultRNGProvider(); }
/// <summary> /// Initializes all default providers. /// </summary> public Providers(RuriLibSettingsService settings) { if (settings != null) { RandomUA = new DefaultRandomUAProvider(settings); EmailDomains = new FileEmailDomainRepository(); Captcha = new CaptchaSharpProvider(settings); PuppeteerBrowser = new DefaultPuppeteerBrowserProvider(settings); GeneralSettings = new DefaultGeneralSettingsProvider(settings); ProxySettings = new DefaultProxySettingsProvider(settings); Security = new DefaultSecurityProvider(settings); } RNG = new DefaultRNGProvider(); }
public JobFactoryService(ConfigService configService, RuriLibSettingsService settingsService, PluginRepository pluginRepo, IHitRepository hitRepo, ProxySourceFactoryService proxySourceFactory, DataPoolFactoryService dataPoolFactory, ProxyReloadService proxyReloadService, IRandomUAProvider randomUAProvider, IRNGProvider rngProvider, IJobLogger logger, IProxyRepository proxyRepo) { this.configService = configService; this.settingsService = settingsService; this.pluginRepo = pluginRepo; this.hitRepo = hitRepo; this.proxySourceFactory = proxySourceFactory; this.dataPoolFactory = dataPoolFactory; this.proxyReloadService = proxyReloadService; this.randomUAProvider = randomUAProvider; this.rngProvider = rngProvider; this.logger = logger; this.proxyRepo = proxyRepo; }
public CaptchaSharpProvider(RuriLibSettingsService settings) { service = CaptchaServiceFactory.GetService(settings.RuriLibSettings.CaptchaSettings); CheckBalanceBeforeSolving = settings.RuriLibSettings.CaptchaSettings.CheckBalanceBeforeSolving; ServiceType = settings.RuriLibSettings.CaptchaSettings.CurrentService; }
public RLSettingsViewModel() { service = SP.GetService <RuriLibSettingsService>(); }
public WordlistFactory(RuriLibSettingsService ruriLibSettings) { this.ruriLibSettings = ruriLibSettings; }
private CancellationTokenSource cts; // Cancellation token for cancelling the StartCondition wait public Job(RuriLibSettingsService settings, PluginRepository pluginRepo, IJobLogger logger = null) { this.settings = settings; this.pluginRepo = pluginRepo; this.logger = logger; }
private static void Run(Options opts) { options = opts; var rlSettings = new RuriLibSettingsService("UserData"); var pluginRepo = new PluginRepository("UserData/Plugins"); // Unpack the config using var fs = new FileStream(opts.ConfigFile, FileMode.Open); var config = ConfigPacker.Unpack(fs).Result; // Setup the job job = new MultiRunJob(rlSettings, pluginRepo) { Providers = new RuriLib.Models.Bots.Providers(rlSettings), Bots = opts.BotsNumber, Config = config, DataPool = new FileDataPool(opts.WordlistFile, opts.WordlistType), HitOutputs = new List <IHitOutput> { new FileSystemHitOutput("UserData/Hits") }, ProxyMode = opts.ProxyMode, ProxySources = new List <ProxySource> { new FileProxySource(opts.ProxyFile) { DefaultType = opts.ProxyType } } }; // Ask custom inputs (if any) foreach (var input in config.Settings.InputSettings.CustomInputs) { System.Console.WriteLine($"{input.Description} ({input.DefaultAnswer}): "); var answer = System.Console.ReadLine(); job.CustomInputsAnswers[input.VariableName] = string.IsNullOrWhiteSpace(answer) ? input.DefaultAnswer : answer; } // Hook event handlers job.OnCompleted += (sender, args) => completed = true; job.OnResult += PrintResult; job.OnTaskError += PrintTaskError; job.OnError += (sender, ex) => System.Console.WriteLine($"Error: {ex.Message}", Color.Tomato); // Start the job job.Start().Wait(); // Wait until it finished while (!completed) { Thread.Sleep(100); UpdateTitle(); } // Print colored finish message System.Console.Write($"Finished. Found: "); System.Console.Write($"{job.DataHits} hits, ", Color.GreenYellow); System.Console.Write($"{job.DataCustom} custom, ", Color.DarkOrange); System.Console.WriteLine($"{job.DataToCheck} to check.", Color.Aquamarine); // Prevent console from closing until the user presses return, then close System.Console.ReadLine(); Environment.Exit(0); }
public DefaultGeneralSettingsProvider(RuriLibSettingsService settings) { this.settings = settings.RuriLibSettings.GeneralSettings; }
public DebuggerOptions(RuriLibSettingsService settings) { WordlistType = settings.Environment.WordlistTypes.First().Name; }
public DefaultSecurityProvider(RuriLibSettingsService settings) { RestrictBlocksToCWD = settings.RuriLibSettings.GeneralSettings.RestrictBlocksToCWD; }
public DefaultProxySettingsProvider(RuriLibSettingsService settings) { this.settings = settings.RuriLibSettings.ProxySettings; }
public ProxyCheckJob(RuriLibSettingsService settings, PluginRepository pluginRepo, IJobLogger logger = null) : base(settings, pluginRepo, logger) { }
public DefaultPuppeteerBrowserProvider(RuriLibSettingsService settings) { ChromeBinaryLocation = settings.RuriLibSettings.PuppeteerSettings.ChromeBinaryLocation; }
public DefaultSeleniumBrowserProvider(RuriLibSettingsService settings) { ChromeBinaryLocation = settings.RuriLibSettings.SeleniumSettings.ChromeBinaryLocation; FirefoxBinaryLocation = settings.RuriLibSettings.SeleniumSettings.FirefoxBinaryLocation; BrowserType = settings.RuriLibSettings.SeleniumSettings.BrowserType; }
public FileJobLogger(RuriLibSettingsService settings, string baseFolder) { this.settings = settings; this.baseFolder = baseFolder; Directory.CreateDirectory(baseFolder); }
public MultiRunJob(RuriLibSettingsService settings, PluginRepository pluginRepo, IJobLogger logger = null) : base(settings, pluginRepo, logger) { }
public DataPoolFactoryService(IWordlistRepository wordlistRepo, RuriLibSettingsService ruriLibSettings) { this.wordlistRepo = wordlistRepo; this.ruriLibSettings = ruriLibSettings; }
public PuppeteerUnitTestJob(RuriLibSettingsService settings, PluginRepository pluginRepo, IJobLogger logger = null) : base(settings, pluginRepo, logger) { }
public KeychainViewerViewModel(Keychain keychain) { rlSettingsService = SP.GetService <RuriLibSettingsService>(); this.keychain = keychain; }