Class RunnerViewModel
Main class that handles all the multi-threaded checking of a Wordlist given a Config.
Inherited Members
Namespace: RuriLib.Runner
Assembly: RuriLib.dll
Syntax
public class RunnerViewModel : ViewModelBase, INotifyPropertyChanged, IRunnerMessaging
Constructors
| Improve this Doc View SourceRunnerViewModel(EnvironmentSettings, RLSettingsViewModel)
Constructs the RunnerViewModel instance.
Declaration
public RunnerViewModel(EnvironmentSettings environment, RLSettingsViewModel settings)
Parameters
Type | Name | Description |
---|---|---|
EnvironmentSettings | environment | The environment settings |
RLSettingsViewModel | settings | The RuriLib settings |
Properties
| Improve this Doc View SourceAliveProxiesCount
The amount of proxies loaded that are alive.
Declaration
public int AliveProxiesCount { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
AvailableProxiesCount
The amount of proxies loaded that are available.
Declaration
public int AvailableProxiesCount { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
BadProxiesCount
The amount of proxies loaded that are bad.
Declaration
public int BadProxiesCount { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Balance
The remaining balance in the captcha solver account.
Declaration
public double Balance { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
BalanceString
The remaining balance in the captcha solver account preceeded by a $ sign.
Declaration
public string BalanceString { get; }
Property Value
Type | Description |
---|---|
System.String |
BannedProxiesCount
The amount of proxies loaded that are banned.
Declaration
public int BannedProxiesCount { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Bots
The managed workers that run single data checks.
Declaration
public ObservableCollection<RunnerBotViewModel> Bots { get; }
Property Value
Type | Description |
---|---|
System.Collections.ObjectModel.ObservableCollection<RunnerBotViewModel> |
BotsNumber
The amount of bots to run simultaneously for multi-threaded checking.
Declaration
public int BotsNumber { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Busy
Whether the Master Worker is busy or idle.
Declaration
public bool Busy { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Config
The loaded Config to use for the check.
Declaration
public Config Config { get; }
Property Value
Type | Description |
---|---|
Config |
ConfigName
The name of the loaded Config.
Declaration
public string ConfigName { get; }
Property Value
Type | Description |
---|---|
System.String |
ControlsEnabled
Whether the user can set the properties (a.k.a. whether the Master Worker is idle).
Declaration
public bool ControlsEnabled { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
CPM
The checks per minute.
Declaration
public int CPM { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
CustomCount
Amount of data lines checked with a CUSTOM outcome.
Declaration
public int CustomCount { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
CustomInputs
The pairs of (variable name, value) set by the user.
Declaration
public List<KeyValuePair<string, string>> CustomInputs { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<System.Collections.Generic.KeyValuePair<System.String, System.String>> |
CustomInputsInitialized
Whether the Custom Inputs have already been initialized.
Declaration
public bool CustomInputsInitialized { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
CustomList
The list of data lines checked with a CUSTOM outcome.
Declaration
public ObservableCollection<ValidData> CustomList { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.ObjectModel.ObservableCollection<ValidData> |
DataPool
The pool from which the Master worker draws data to assign to bots for the checks.
Declaration
public DataPool DataPool { get; set; }
Property Value
Type | Description |
---|---|
DataPool |
DataSize
The size of the DataPool.
Declaration
public int DataSize { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
EmptyList
Auxiliary empty list.
Declaration
public ObservableCollection<ValidData> EmptyList { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.ObjectModel.ObservableCollection<ValidData> |
FailCount
Amount of data lines checked with a FAIL outcome.
Declaration
public int FailCount { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
FailedList
The list of data lines checked with a FAIL outcome.
Declaration
public List<ValidData> FailedList { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<ValidData> |
GlobalCookies
The Global Cookies list that are set in all bots when they start.
Declaration
public CookieDictionary GlobalCookies { get; set; }
Property Value
Type | Description |
---|---|
Extreme.Net.CookieDictionary |
GlobalVariables
The Global Variables list that are set in all bots when they start.
Declaration
public VariableList GlobalVariables { get; set; }
Property Value
Type | Description |
---|---|
VariableList |
HitCount
Amount of data lines checked with a SUCCESS outcome.
Declaration
public int HitCount { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
HitsList
The list of data lines checked with a SUCCESS outcome.
Declaration
public ObservableCollection<ValidData> HitsList { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.ObjectModel.ObservableCollection<ValidData> |
Master
The Master Worker that manages all the other Workers and updates the observable properties.
Declaration
public AbortableBackgroundWorker Master { get; set; }
Property Value
Type | Description |
---|---|
AbortableBackgroundWorker |
Progress
The rounded percentage of checked data lines (0 to 100).
Declaration
public int Progress { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
ProgressCount
The amount of data lines checked, including the starting point.
Declaration
public int ProgressCount { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
ProxyMode
The Proxy Mode.
Declaration
public ProxyMode ProxyMode { get; set; }
Property Value
Type | Description |
---|---|
ProxyMode |
ProxyPool
The pool from which bots can get a proxy upon request.
Declaration
public ProxyPool ProxyPool { get; set; }
Property Value
Type | Description |
---|---|
ProxyPool |
ResultsFilter
Filter based on the Bot Status.
Declaration
public BotStatus ResultsFilter { get; set; }
Property Value
Type | Description |
---|---|
BotStatus |
RetryCount
Amount of data lines retried due to a BAN, RETRY or ERROR outcome.
Declaration
public int RetryCount { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
StartingPoint
How many data lines to skip before starting the checking process.
Declaration
public int StartingPoint { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
TestedCount
Total amount of successfully tested data lines.
Declaration
public int TestedCount { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
TimeLeft
Representation of the expected time left to check the remaining data lines.
Declaration
public string TimeLeft { get; }
Property Value
Type | Description |
---|---|
System.String |
TimerDays
Days elapsed since the runner was started.
Declaration
public string TimerDays { get; }
Property Value
Type | Description |
---|---|
System.String |
TimerHours
Hours elapsed since the runner was started.
Declaration
public string TimerHours { get; }
Property Value
Type | Description |
---|---|
System.String |
TimerMinutes
Minutes elapsed since the runner was started.
Declaration
public string TimerMinutes { get; }
Property Value
Type | Description |
---|---|
System.String |
TimerSeconds
Seconds elapsed since the runner was started.
Declaration
public string TimerSeconds { get; }
Property Value
Type | Description |
---|---|
System.String |
ToCheckCount
Amount of data lines checked with a NONE outcome.
Declaration
public int ToCheckCount { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
ToCheckList
The list of data lines checked with a NONE outcome.
Declaration
public ObservableCollection<ValidData> ToCheckList { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.ObjectModel.ObservableCollection<ValidData> |
TotalProxiesCount
The total amount of proxies loaded.
Declaration
public int TotalProxiesCount { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
UseProxies
Whether proxies can be used for the current session given the Proxy Mode and the Config.
Declaration
public bool UseProxies { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Wordlist
The loaded Wordlist to use for the check.
Declaration
public Wordlist Wordlist { get; }
Property Value
Type | Description |
---|---|
Wordlist |
WordlistName
The name of the loaded Wordlist.
Declaration
public string WordlistName { get; }
Property Value
Type | Description |
---|---|
System.String |
WordlistSize
The size of the loaded Wordlist.
Declaration
public int WordlistSize { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
WorkerStatus
The status of the Master Worker.
Declaration
public WorkerStatus WorkerStatus { get; }
Property Value
Type | Description |
---|---|
WorkerStatus |
Methods
| Improve this Doc View SourceClamp(Int32, Int32, Int32)
Clamps an integer to an interval of values.
Declaration
public int Clamp(int a, int min, int max)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | a | The integer to clamp |
System.Int32 | min | The minimum value of the interval |
System.Int32 | max | The maximum value of the interval |
Returns
Type | Description |
---|---|
System.Int32 | The clamped integer |
ForceStop()
Forcefully aborts the Bots and stops the Master Worker.
Declaration
public void ForceStop()
GetProxiesFromAPI(String, ProxyType, Boolean)
Loads a list of proxies from an API endpoint.
Declaration
public static List<CProxy> GetProxiesFromAPI(string url, ProxyType type, bool useRegex = false)
Parameters
Type | Name | Description |
---|---|---|
System.String | url | The URL of the API call |
Extreme.Net.ProxyType | type | The type of the proxies |
System.Boolean | useRegex | Whether to use an IP:PORT regex to extract the proxies from the lines |
Returns
Type | Description |
---|---|
System.Collections.Generic.List<CProxy> | The list of CProxy objects loaded from the API |
GetProxiesFromFile(String, ProxyType, Boolean)
Loads a list of proxies from a file.
Declaration
public static List<CProxy> GetProxiesFromFile(string fileName, ProxyType type, bool useRegex = false)
Parameters
Type | Name | Description |
---|---|---|
System.String | fileName | The file containing the proxies, one per line |
Extreme.Net.ProxyType | type | The type of the proxies |
System.Boolean | useRegex | Whether to use an IP:PORT regex to extract the proxies from the lines |
Returns
Type | Description |
---|---|
System.Collections.Generic.List<CProxy> | The list of CProxy objects loaded from the file |
SetConfig(Config, Boolean)
Sets a Config in the Runner instance.
Declaration
public void SetConfig(Config config, bool setRecommended)
Parameters
Type | Name | Description |
---|---|---|
Config | config | The Config to be used for the check |
System.Boolean | setRecommended | Whether to automatically set the recommended amount of bots from the Config settings. |
SetWordlist(Wordlist)
Sets a Wordlist in the Runner instance.
Declaration
public void SetWordlist(Wordlist wordlist)
Parameters
Type | Name | Description |
---|---|---|
Wordlist | wordlist | The Wordlist to be used for the check |
Start()
Starts the Master Worker.
Declaration
public void Start()
Stop()
Stops the Master Worker.
Declaration
public void Stop()
UpdateCPM()
Update the observable CPM property.
Declaration
public void UpdateCPM()
UpdateStats()
Update the observable properties for the statistics.
Declaration
public void UpdateStats()
UpdateTimer()
Update the observable properties for the Timer.
Declaration
public void UpdateTimer()
Events
| Improve this Doc View SourceAskCustomInputs
Fired when custom inputs from the user are required.
Declaration
public event Action<IRunnerMessaging> AskCustomInputs
Event Type
Type | Description |
---|---|
System.Action<IRunnerMessaging> |
DispatchAction
Fired when an Action could change the UI and needs to be dispatched to another thread (usually it's handled by the UI thread).
Declaration
public event Action<IRunnerMessaging, Action> DispatchAction
Event Type
Type | Description |
---|---|
System.Action<IRunnerMessaging, System.Action> |
FoundHit
Fired when a Hit was found.
Declaration
public event Action<IRunnerMessaging, Hit> FoundHit
Event Type
Type | Description |
---|---|
System.Action<IRunnerMessaging, Hit> |
MessageArrived
Fired when a new message needs to be logged.
Declaration
public event Action<IRunnerMessaging, LogLevel, string, bool> MessageArrived
Event Type
Type | Description |
---|---|
System.Action<IRunnerMessaging, LogLevel, System.String, System.Boolean> |
ReloadProxies
Fired when proxies need to be reloaded.
Declaration
public event Action<IRunnerMessaging> ReloadProxies
Event Type
Type | Description |
---|---|
System.Action<IRunnerMessaging> |
SaveProgress
Fired when the progress record needs to be saved to the Database.
Declaration
public event Action<IRunnerMessaging> SaveProgress
Event Type
Type | Description |
---|---|
System.Action<IRunnerMessaging> |
WorkerStatusChanged
Fired when the Master Worker status changed.
Declaration
public event Action<IRunnerMessaging> WorkerStatusChanged
Event Type
Type | Description |
---|---|
System.Action<IRunnerMessaging> |