/MVThread

Parallelization in .NET

Primary LanguageC#

MVThread Nuget

Parallelization in .NET

Features

  • Support any lists
  • Support two-part lists (usernames-passwords)
  • Support proxy lists and links
  • Supports list position adjustment
  • Show CPM
  • Show elapsed time
  • Show the number of threads running
  • Show progress value
  • Keeping the information of each bot until the end of the work
  • Professional proxy management

Runner Types

  • Task
  • Thread
  • Parallel

Events

  • Start
  • Stop
  • Complete
  • Config
  • ConfigAsync
  • Exception

Using

using MVThread;

main(args);

void main(string[] args)
{
    List<string> list = new List<string>();
    for (int i = 1; i <= 1000; i++) //Adds 1-1000 to the list
    {
        list.Add(i.ToString());
    }
    
    IRunner runner = RunnerFactory.Create(RunnerType.Parallel, onConfigAsync, onStarted, onStopped, onCompeleted);
    runner.SetWordlist(list); //Add list to runner
    runner.Start(10); //Add bot count in runner and start the runner
    
    while (runner.IsRunning)
    {
        Console.Title = $"Bot : {runner.Active} - CPM : {runner.CPM} - Elapsed : {runner.Elapsed}";
        Thread.Sleep(100);
    }

    Console.ReadKey();
}

void onStarted(StartEventArgs e)
{
    Console.ForegroundColor = ConsoleColor.Green;
    Console.WriteLine("Started!"); //Displays the start message when the runner start
}

void onStopped(StopEventArgs e)
{
    Console.ForegroundColor = ConsoleColor.Red;
    Console.WriteLine("Stopped!"); //Displays the stop message when the runner stop
}

void onCompeleted()
{
    Console.ForegroundColor = ConsoleColor.Yellow;
    Console.WriteLine("Completed!"); //Displays the completed message when the runner complete
}

async Task<ConfigStatus> onConfigAsync(DataEventArgs e)
{
    Console.ForegroundColor = ConsoleColor.White;
    Console.WriteLine(e.Data); //Display the value received from the list
    return ConfigStatus.OK;
}

How to add a combolist to the runner?

List<string> list = new List<string>();

runner.SetWordlist(list);

How to add 2-part lists to the runner?

List<string> usernames = new List<string>();
List<string> passwords = new List<string>();

runner.SetWordlist(usernames, passwords, ComboType.ChangeUser); //u1:p1-u2:p1
//or
runner.SetWordlist(usernames, passwords, ComboType.ChangePass); //u1:p1-u1:p2

How to set the list position when you start?

runner.SetWordlist(list, number);
//or
runner.SetWordlist(list, list, type, number);

How to add a proxylist to your runner?

List<string> proxies = new List<string>();
runner.SetProxylist(proxies, type);

//or

string url = "https://localhost/proxies/";
var proxies = await runner.GetProxylistAsync(url);
runner.SetProxylist(proxies, type);

//or

string path = "C:\\Proxylist.txt";
var proxies = await runner.GetProxylistAsync(path);
runner.SetProxylist(proxies, type);

Overview of the configuration event

private static async Task<ConfigStatus> onConfigAsync(DataEventArgs e)
{
    string data = e.Data; //Get data from the entered list
    
    if(e.Retry > 100) //Shows the current data retrieval count
        return ConfigStatus.TheEnd; //In certain circumstances, you can stop all the threads if you wish
        
    if (!e.ProxyDetail.IsProxyLess) //Get a proxy at random
    {
        Uri address = e.ProxyDetail.Proxy.Address;
        ICredentials credentials = e.ProxyDetail.Proxy.NetworkCredential;
        ProxyType proxyType = e.ProxyDetail.Proxy.GetProxyType();
    }
    
    try
    {
        e.Save.WriteLine("goods.txt", data); //Save data in a file
        return ConfigStatus.OK; //To get the continuation of the list return ConfigStatus.OK
    }
    catch (Exception ex)
    {
        e.Log.WriteLine(ex.Message); //You can save your messages as a log
        return ConfigStatus.Retry; //If the operation fails, you can retrieve the current data
    }
}