### Basic Parallelizer Setup and Execution in C# Source: https://github.com/openbullet/openbullet2/blob/master/RuriLib.Parallelization/README.md Demonstrates how to set up and run a task-based parallelizer in C#. It defines a work function for parity checking, configures the parallelizer with work items, degree of parallelism, and event handlers, and then starts and waits for its completion. Includes essential event handlers for results, completion, and errors. ```csharp using RuriLib.Parallelization; using RuriLib.Parallelization.Models; using System; using System.Linq; using System.Threading; using System.Threading.Tasks; namespace ParallelizationDemo { class Program { static void Main(string[] args) { _ = MainAsync(args); Console.ReadLine(); } static async Task MainAsync(string[] args) { // This func takes an input type of 'int', a cancellation token, and an output type of `Task` of `bool` Func> parityCheck = new(async (number, token) => { // This is the body of your work function await Task.Delay(50, token); return number % 2 == 0; }); var parallelizer = ParallelizerFactory.Create( type: ParallelizerType.TaskBased, // Use task-based (it's better) workItems: Enumerable.Range(1, 100), // The work items are all integers from 1 to 100 workFunction: parityCheck, // Use the work function we defined above degreeOfParallelism: 5, // Use 5 concurrent tasks at most totalAmount: 100, // The total amount of tasks you expect to have, used for calculating progress skip: 0); // How many items to skip from the start of the provided enumerable // Hook the events parallelizer.NewResult += OnResult; parallelizer.Completed += OnCompleted; parallelizer.Error += OnException; parallelizer.TaskError += OnTaskError; await parallelizer.Start(); // It's important to always pass a cancellation token to avoid waiting forever if something goes wrong! var cts = new CancellationTokenSource(); cts.CancelAfter(10000); await parallelizer.WaitCompletion(cts.Token); } private static void OnResult(object sender, ResultDetails value) => Console.WriteLine($"Got result {value.Result} from the parity check of {value.Item}"); private static void OnCompleted(object sender, EventArgs e) => Console.WriteLine("All work completed!"); private static void OnTaskError(object sender, ErrorDetails details) => Console.WriteLine($"Got error {details.Exception.Message} while processing the item {details.Item}"); private static void OnException(object sender, Exception ex) => Console.WriteLine($"Exception: {ex.Message}"); } } ``` -------------------------------- ### Angular CLI Development Server Source: https://github.com/openbullet/openbullet2/blob/master/openbullet2-web-client/README.md Starts the Angular development server for live reloading and application preview. Navigate to http://localhost:4200/ to view the application. ```bash ng serve ``` -------------------------------- ### OpenBullet2 Resources Support Source: https://github.com/openbullet/openbullet2/blob/master/Changelog/0.1.15.md Introduces support for resources in OpenBullet2, with a guide available for usage. ```OpenBullet2 // Added support for resources. You can find a small guide [here](https://discourse.openbullet.dev/t/using-global-variables-to-take-lines-from-a-file-in-order/48) ``` -------------------------------- ### RuriLib.Proxies Usage Example Source: https://github.com/openbullet/openbullet2/blob/master/RuriLib.Proxies/README.md Demonstrates how to initialize and use different proxy clients (HTTP, SOCKS4, SOCKS4a, SOCKS5, NoProxy) from the RuriLib.Proxies library to establish a TCP connection to a target host and send/receive data. ```csharp using RuriLib.Proxies; using RuriLib.Proxies.Clients; using System; using System.IO; using System.Net; using System.Text; using System.Threading.Tasks; namespace ProxiesDemo { class Program { static void Main(string[] args) { _ = MainAsync(args); Console.ReadLine(); } static async Task MainAsync(string[] args) { // Initialize the proxy settings var settings = new ProxySettings { ConnectTimeout = TimeSpan.FromSeconds(10), ReadWriteTimeOut = TimeSpan.FromSeconds(30), Host = "127.0.0.1", Port = 8888, // Remove the following line if the proxy does not require authentication Credentials = new NetworkCredential("username", "password") }; // Choose one of the following var httpProxyClient = new HttpProxyClient(settings); // HTTP proxies var socks4ProxyClient = new Socks4ProxyClient(settings); // Socks4 proxies var socks4aProxyClient = new Socks4aProxyClient(settings); // Socks4a proxies var socks5ProxyClient = new Socks5ProxyClient(settings); // Socks5a proxies var noProxyClient = new NoProxyClient(settings); // No proxy // Connect to the website via the proxy, we will get a TCP client that we can use using var tcpClient = await httpProxyClient.ConnectAsync("example.com", 80); // Now you can send messages on the raw TCP socket using var netStream = tcpClient.GetStream(); using var memory = new MemoryStream(); // Send HELLO var requestBytes = Encoding.ASCII.GetBytes("HELLO"); await netStream.WriteAsync(requestBytes.AsMemory(0, requestBytes.Length)); // Read the response await netStream.CopyToAsync(memory); memory.Position = 0; var data = memory.ToArray(); Console.WriteLine(Encoding.UTF8.GetString(data)); } } } ``` -------------------------------- ### HttpClient with ProxyClientHandler Example Source: https://github.com/openbullet/openbullet2/blob/master/RuriLib.Http/README.md Shows how to integrate RuriLib.Http with the standard System.Net.HttpClient by using the ProxyClientHandler. This allows leveraging familiar HttpClient APIs while benefiting from proxied connections and cookie support. ```csharp using RuriLib.Http; using RuriLib.Proxies; using RuriLib.Proxies.Clients; using System; using System.Net; using System.Net.Http; using System.Text; using System.Threading.Tasks; namespace HttpDemo { class Program { static void Main(string[] args) { _ = MainAsync(args); Console.ReadLine(); } static async Task MainAsync(string[] args) { // Set up the proxy client (see RuriLib.Proxies documentation, here we use // a NoProxyClient for simplicity) var settings = new ProxySettings(); var proxyClient = new NoProxyClient(settings); // Create the handler that will be passed to HttpClient var handler = new ProxyClientHandler(proxyClient) { // This adds cookie support CookieContainer = new CookieContainer() }; // Create the proxied HttpClient and the cookie container using var client = new HttpClient(handler); // Create the request using var request = new HttpRequestMessage { RequestUri = new Uri("https://httpbin.org/anything"), Method = HttpMethod.Post, // Content a.k.a. the "post data" Content = new StringContent("My content", Encoding.UTF8, "text/plain") }; request.Headers.TryAddWithoutValidation("Authorization", "Bearer ey..."); handler.CookieContainer.Add(request.RequestUri, new Cookie("PHPSESSID", "12345")); // Send the request and get the response (this can fail so make sure to wrap it in a try/catch block) using var response = await client.SendAsync(request); // Read and print the content of the response var content = await response.Content.ReadAsStringAsync(); Console.WriteLine(content); } } } ``` -------------------------------- ### Custom RLHttpClient Example Source: https://github.com/openbullet/openbullet2/blob/master/RuriLib.Http/README.md Demonstrates how to use the custom RLHttpClient for making proxied HTTP requests. It shows setting up a proxy client, creating an HttpRequest with headers and content, sending the request, and reading the response. ```csharp using RuriLib.Http; using RuriLib.Http.Models; using RuriLib.Proxies; using RuriLib.Proxies.Clients; using System; using System.Collections.Generic; using System.Net.Http; using System.Text; using System.Threading.Tasks; namespace HttpDemo { class Program { static void Main(string[] args) { _ = MainAsync(args); Console.ReadLine(); } static async Task MainAsync(string[] args) { // Set up the proxy client (see RuriLib.Proxies documentation, here we use // a NoProxyClient for simplicity) var settings = new ProxySettings(); var proxyClient = new NoProxyClient(settings); // Create the custom proxied client using var client = new RLHttpClient(proxyClient); // Create the request using var request = new HttpRequest { Uri = new Uri("https://httpbin.org/anything"), Method = HttpMethod.Post, Headers = new Dictionary { { "Authorization", "Bearer ey..." } }, Cookies = new Dictionary { { "PHPSESSID", "12345" } }, // Content a.k.a. the "post data" Content = new StringContent("My content", Encoding.UTF8, "text/plain") }; // Send the request and get the response (this can fail so make sure to wrap it in a try/catch block) using var response = await client.SendAsync(request); // Read and print the content of the response var content = await response.Content.ReadAsStringAsync(); Console.WriteLine(content); } } } ``` -------------------------------- ### Angular CLI End-to-End Tests Source: https://github.com/openbullet/openbullet2/blob/master/openbullet2-web-client/README.md Runs end-to-end tests. Requires an additional package for end-to-end testing capabilities to be installed. ```bash ng e2e ``` -------------------------------- ### Startup LoliCode in OpenBullet2 Source: https://github.com/openbullet/openbullet2/blob/master/Changelog/0.2.5.md Allows users to write LoliCode that executes once when a job starts. Useful for setting global variables or pre-loading data. Variables set here may be cleared after the startup phase unless explicitly marked as global. ```LoliCode /* Example: Set a global variable */ globals.sessionCookie = "your_cookie_value"; /* Example: Read lines from a file */ var lines = System.IO.File.ReadAllLines("path/to/your/file.txt"); foreach (var line in lines) { // Process each line } ``` -------------------------------- ### Descriptor Parameter Type Handling Source: https://github.com/openbullet/openbullet2/blob/master/openbullet2-web-client/src/app/main/components/config/config-stacker/block-info/block-info.component.html Illustrates how specific parameter types, like ByteArray, are handled and represented within the descriptor configuration. This example shows the conditional formatting for ByteArray parameters. ```APIDOC Parameter: name: string type: string // Special handling for ByteArray formattedType: string = type === 'ByteArray' ? '(Base 64)' : '' ``` -------------------------------- ### RuriLib New Blocks and Job Management Source: https://github.com/openbullet/openbullet2/blob/master/Changelog/0.1.28.md This snippet highlights new blocks and improvements in job management within RuriLib. It includes the addition of a `CreateListOfNumbers` block and a fix to prevent jobs from starting more than once concurrently. ```C# // Added CreateListOfNumbers block // Prevented starting a job more than once at a time ``` -------------------------------- ### HTTP Response Performance Improvements Source: https://github.com/openbullet/openbullet2/blob/master/Changelog/0.1.4.md Optimizations made to the process of getting proxies and building HTTP responses, leading to better performance. ```C# // Placeholder for proxy fetching optimization // Placeholder for HTTP response building optimization ``` -------------------------------- ### Angular CLI Help Source: https://github.com/openbullet/openbullet2/blob/master/openbullet2-web-client/README.md Provides help and command reference for the Angular CLI. Access detailed information about available commands and options. ```bash ng help ``` -------------------------------- ### OpenBullet Web Version in Console Output Source: https://github.com/openbullet/openbullet2/blob/master/Changelog/0.3.1.md The program version is now included in the console output when OpenBullet (Web) starts, providing immediate information about the running version. ```javascript // Add version information to console output on startup ``` -------------------------------- ### Angular CLI Build Source: https://github.com/openbullet/openbullet2/blob/master/openbullet2-web-client/README.md Builds the Angular application for production. The compiled artifacts are placed in the dist/ directory, ready for deployment. ```bash ng build ``` -------------------------------- ### Job Controls and Status Display Source: https://github.com/openbullet/openbullet2/blob/master/openbullet2-web-client/src/app/main/components/jobs/multi-run-job/multi-run-job.component.html Provides controls for managing a job's execution (Start, Resume, Pause, Stop, Abort) and displays real-time logs and hit information. ```HTML ##### Job controls Waiting... {{waitLeft | timespan}} left {{progress | percent : '1.2-2'}} Skip Wait Start Resume Pause Stop Abort Log {{log.timestamp | date : 'HH:mm:ss'}} {{log.message}} Hits * [{{hit.date | date : 'medium'}}] [{{hit.type}}] {{hit.data}} | {{hit.proxy === null ? '-' : hit.proxy.host + ':' + hit.proxy.port}} | {{hit.capturedData}} {{selectedHits.length}} / {{filteredHits.length}} hits selected To select multiple hits, hold CTRL and click on the hits, or hold SHIFT and click on the first and last hit you want to select. ``` -------------------------------- ### Import Legacy OB1 Configs Source: https://github.com/openbullet/openbullet2/blob/master/Changelog/0.1.27.md Instructions for importing legacy .loli configs from OpenBullet1 into OpenBullet2. This process automatically repackages them into .opk files. ```text 1. Place your .loli configs in the `UserData/Configs` folder. 2. Click the 'Reload' button in the configs section. 3. OB2 will repackage them into .opk files. Ensure you have backups. ``` -------------------------------- ### OpenBullet2 API Documentation Source: https://github.com/openbullet/openbullet2/blob/master/openbullet2-web-client/src/app/main/components/info/info.component.html Provides access to the OpenBullet2 API, allowing interaction with its features and data. This includes endpoints for managing configurations, bots, and other project-related functionalities. ```APIDOC API Docs: - Access the OpenBullet2 API for programmatic interaction. - Endpoints may include functionalities for managing configurations, bots, and other project resources. - Refer to the Swagger UI for detailed endpoint specifications, request/response formats, and authentication methods. ``` -------------------------------- ### Wordlist Preview Source: https://github.com/openbullet/openbullet2/blob/master/openbullet2-web-client/src/app/main/components/jobs/select-wordlist/select-wordlist.component.html Provides a preview of a selected wordlist, showing the first few lines and the total file size. The file size is formatted using a 'bytes' pipe. The preview content is joined by newline characters. ```html Preview of {{ selectedWordlist.name }}, showing the first {{ preview.firstLines.length }} lines (total file size: {{ preview.sizeInBytes | bytes }}) {{ preview.firstLines.join('\n') }} ``` -------------------------------- ### OpenBullet2 Proxy Import Formats Source: https://github.com/openbullet/openbullet2/blob/master/openbullet2-web-client/src/app/main/components/proxies/proxy-syntax-info/proxy-syntax-info.component.html Details the supported formats for importing proxies into OpenBullet2. This includes basic host:port configurations, credentials, and explicit type declarations for different proxy protocols. ```APIDOC Proxy Import Formats: Syntax: host:port host:port:username:password (type)host:port (type)host:port:username:password Examples: host:port: 127.0.0.1:8080 myproxy.com:1234 host:port:username:password: 127.0.0.1:8080:myusername:mypassword (type)host:port: (http)127.0.0.1:8080 (type)host:port:username:password: (socks5)myproxy.com:5134:myusername:mypassword Supported Proxy Types: http socks4 socks4a socks5 ``` -------------------------------- ### Range Data Pool Configuration Source: https://github.com/openbullet/openbullet2/blob/master/openbullet2-web-client/src/app/main/components/jobs/edit-multi-run-job/edit-multi-run-job.component.html Configures the 'range' data pool to generate a sequence of numbers. It requires specifying the start number, the amount of numbers to generate, and the step between numbers. The output of the range calculation is also displayed. ```html Output: {{ calcRange() }} ``` -------------------------------- ### OpenBullet2 Config Management Source: https://github.com/openbullet/openbullet2/blob/master/openbullet2-web-client/src/app/main/components/sharing/sharing.component.html This section describes how configurations are managed within the sharing feature, including placeholders for configuration names and authors. ```APIDOC Config Name: {{ config.name }} Config Author: {{ config.author }} ``` -------------------------------- ### OpenBullet Web UI and Functionality Improvements Source: https://github.com/openbullet/openbullet2/blob/master/Changelog/0.1.28.md This snippet summarizes enhancements to the OpenBullet Web interface and core functionality. It includes fixes for start conditions, session lifetime bounds, job monitoring, modal behavior, config submenus, block selection, and download buttons, along with proxy group display updates. ```C# // Fixed problem with absolute start condition not being set // Added bounds to session lifetime // Fixed problems with JobMonitor save // Fixed visual bug when quitting edit modals // Fixed config submenu disappearing on login // Added support for selecting multiple blocks with SHIFT // Added Download All buttons to configs section // Changed proxy group id to name in MultiRunJobViewer ``` -------------------------------- ### OpenBullet2 API Endpoints Source: https://github.com/openbullet/openbullet2/blob/master/openbullet2-web-client/src/app/main/components/ob-settings/create-remote-configs-endpoint/create-remote-configs-endpoint.component.html This section details the available API endpoints for interacting with OpenBullet2. It covers authentication, project management, URL handling, and resource creation. ```APIDOC OpenBullet2 API Documentation: Base URL: /api/v1 Authentication: - API Key: X-Api-Key header - Example: X-Api-Key: YOUR_API_KEY Endpoints: 1. Projects: - GET /projects - Description: Retrieves a list of all projects. - Returns: Array of project objects. - POST /projects - Description: Creates a new project. - Request Body: - name: string (required) - The name of the new project. - Returns: The created project object. - GET /projects/{id} - Description: Retrieves a specific project by its ID. - Parameters: - id: integer (path parameter) - The ID of the project to retrieve. - Returns: The project object. - PUT /projects/{id} - Description: Updates an existing project. - Parameters: - id: integer (path parameter) - The ID of the project to update. - Request Body: - name: string (optional) - The new name for the project. - Returns: The updated project object. - DELETE /projects/{id} - Description: Deletes a project by its ID. - Parameters: - id: integer (path parameter) - The ID of the project to delete. - Returns: Success message. 2. URLs: - GET /urls - Description: Retrieves a list of all URLs. - Returns: Array of URL objects. - POST /urls - Description: Adds a new URL. - Request Body: - url: string (required) - The URL to add. - description: string (optional) - A description for the URL. - Returns: The created URL object. - DELETE /urls/{id} - Description: Deletes a URL by its ID. - Parameters: - id: integer (path parameter) - The ID of the URL to delete. - Returns: Success message. 3. API Keys: - GET /apikeys - Description: Retrieves a list of all API keys. - Returns: Array of API key objects. - POST /apikeys - Description: Generates a new API key. - Request Body: - name: string (required) - A name for the API key. - Returns: The newly generated API key object. - DELETE /apikeys/{key} - Description: Deletes an API key. - Parameters: - key: string (path parameter) - The API key to delete. - Returns: Success message. 4. Creation (General): - POST /create/{resourceType} - Description: Creates a generic resource. Use specific endpoints for more control. - Parameters: - resourceType: string (path parameter) - The type of resource to create (e.g., 'config', 'botnet'). - Request Body: Depends on the resourceType. - Returns: The created resource object. ``` -------------------------------- ### LoliCode and C# Scripting in OpenBullet2 Source: https://github.com/openbullet/openbullet2/blob/master/openbullet2-web-client/src/app/main/components/config/config-lolicode/config-lolicode.component.html LoliCode is a custom scripting language for OpenBullet2 configurations. It allows users to write scripts that are executed when a job starts. Additionally, C# code can be embedded directly within the LoliCode editor. Users can manage imported namespaces for the generated C# script by listing them one per line. ```lolicode /* LoliCode script example */ // This is a comment ``` ```csharp /* C# code embedded in LoliCode */ using System; public class MyScript { public void Run() { Console.WriteLine("Hello from C#!"); } } ``` -------------------------------- ### Monitoring Parallelizer Progress in C# Source: https://github.com/openbullet/openbullet2/blob/master/RuriLib.Parallelization/README.md Illustrates how to access properties to monitor the progress of the parallelizer, specifically the current checks per minute (CPM) and the estimated remaining time. ```csharp Console.WriteLine($"Doing {parallelizer.CPM} checks per minute and the remaining time is {parallelizer.Remaining}"); ``` -------------------------------- ### Angular CLI Unit Tests Source: https://github.com/openbullet/openbullet2/blob/master/openbullet2-web-client/README.md Executes unit tests using Karma. This command verifies the functionality of individual code units within the application. ```bash ng test ``` -------------------------------- ### Proxy Configuration Options Source: https://github.com/openbullet/openbullet2/blob/master/openbullet2-web-client/src/app/main/components/proxies/import-proxies-from-file/import-proxies-from-file.component.html Describes the configuration options for proxies in OpenBullet2. It covers the use of custom syntax for proxy types and the default username/password settings. ```APIDOC Proxy Configuration: Type: - Description: If the proxy type is specified by a custom syntax for a given proxy, this value will be ignored. - Example: Custom syntax like 'http://user:pass@host:port' or 'socks5://user:pass@host:port'. Default username: - Description: The username to use for all imported proxies when not specified by the syntax. Leave blank to disable. - Type: String Default Password: - Description: The password to use for all imported proxies when not specified by the syntax. Leave blank to disable. - Type: String Import: - Description: Refers to the process of importing proxies into OpenBullet2. ``` -------------------------------- ### RuriLib General Settings Source: https://github.com/openbullet/openbullet2/blob/master/openbullet2-web-client/src/app/main/components/rl-settings/rl-settings.component.html Configures general aspects of the RuriLib library, including parallelization and user agent management. ```APIDOC General Settings: Parallelizer type: Specifies the type of parallelizer to use. User Agents: Manages user agent strings for requests. ``` -------------------------------- ### OpenBullet2 Data Extraction Parameters Source: https://github.com/openbullet/openbullet2/blob/master/openbullet2-web-client/src/app/main/components/config/config-stacker/parse-block/parse-block.component.html Lists common parameters used for extracting data from various sources within OpenBullet2. These parameters define how data is targeted and captured, supporting methods like Regex, CSS selectors, XPath, and JSON path. ```OpenBulletScript PARAMETERS Input Prefix Suffix LR CSS XPath JSON Regex Left Delim Right Delim CSS Selector Attribute Name XPath Attribute Name JToken (JSON Path) Pattern Output Format ``` -------------------------------- ### Proxy Source Configuration Source: https://github.com/openbullet/openbullet2/blob/master/openbullet2-web-client/src/app/main/components/proxies/import-proxies-from-remote/import-proxies-from-remote.component.html Defines the parameters for importing proxies from a remote source. This includes the URL, type, and default credentials. ```APIDOC ProxySource: URL: string The URL of the remote proxy source. Type: string The type of the proxy source. If the proxy type is specified by a custom syntax for a given proxy, this value will be ignored. DefaultUsername: string The username to use for all imported proxies when not specified by the syntax (leave blank to disable). DefaultPassword: string The password to use for all imported proxies when not specified by the syntax (leave blank to disable). ``` -------------------------------- ### OpenBullet2 API Documentation Source: https://github.com/openbullet/openbullet2/blob/master/openbullet2-web-client/src/app/main/components/jobs/multi-run-job/custom-inputs/custom-inputs.component.html This section details the API endpoints and functionalities available in OpenBullet2. It covers request methods, parameters, and response structures for various operations. ```APIDOC OpenBullet2 API: Base URL: /api/v1 Endpoints: 1. **Bots** * `GET /bots` * Description: Retrieves a list of all bots. * Parameters: None * Returns: A JSON array of bot objects. * Example: ```json [ { "id": 1, "name": "Bot1", "status": "Running" } ] ``` * `POST /bots` * Description: Creates a new bot. * Parameters: * `name` (string, required): The name of the bot. * `configId` (integer, required): The ID of the configuration to use. * Returns: The created bot object. * Example: ```json { "id": 2, "name": "NewBot", "status": "Stopped" } ``` * `GET /bots/{id}` * Description: Retrieves a specific bot by its ID. * Parameters: * `id` (integer, required): The ID of the bot to retrieve. * Returns: The bot object. * `DELETE /bots/{id}` * Description: Deletes a bot by its ID. * Parameters: * `id` (integer, required): The ID of the bot to delete. * Returns: Success message. 2. **Configs** * `GET /configs` * Description: Retrieves a list of all configurations. * Returns: A JSON array of configuration objects. * `POST /configs` * Description: Creates a new configuration. * Parameters: * `name` (string, required): The name of the configuration. * `script` (string, required): The script content for the configuration. * Returns: The created configuration object. * `GET /configs/{id}` * Description: Retrieves a specific configuration by its ID. * Parameters: * `id` (integer, required): The ID of the configuration to retrieve. * Returns: The configuration object. * `PUT /configs/{id}` * Description: Updates an existing configuration. * Parameters: * `id` (integer, required): The ID of the configuration to update. * `name` (string, optional): The new name for the configuration. * `script` (string, optional): The new script content. * Returns: The updated configuration object. * `DELETE /configs/{id}` * Description: Deletes a configuration by its ID. * Parameters: * `id` (integer, required): The ID of the configuration to delete. * Returns: Success message. 3. **Proxies** * `GET /proxies` * Description: Retrieves a list of all proxies. * Returns: A JSON array of proxy objects. * `POST /proxies` * Description: Adds a new proxy. * Parameters: * `host` (string, required): The proxy host. * `port` (integer, required): The proxy port. * `type` (string, optional): The proxy type (e.g., HTTP, SOCKS5). * Returns: The added proxy object. * `DELETE /proxies/{id}` * Description: Deletes a proxy by its ID. * Parameters: * `id` (integer, required): The ID of the proxy to delete. * Returns: Success message. Error Handling: * 400 Bad Request: Invalid input parameters. * 404 Not Found: Resource not found. * 500 Internal Server Error: Server-side error. ``` -------------------------------- ### OpenBullet2 C# Bot Execution Environment Source: https://github.com/openbullet/openbullet2/blob/master/openbullet2-web-client/src/app/main/components/config/config-csharp/config-csharp.component.html This section describes the C# code that OpenBullet2 bots execute, which is automatically generated from LoliCode. It is read-only and intended for debugging. Users can manage imported namespaces and define startup code for job execution. ```C# // This is the C# code that will be executed by the bots. // It is automatically generated from LoliCode and is read-only. // Example of managing namespaces: // You can type namespaces that you would like to import in the generated C# script, one per line. // For example: // using System.Net.Http; // using System.Text.RegularExpressions; // Example of startup code: // The code that will be executed when the job starts running. // public void OnJobStart() // { // // Your startup logic here // } ``` -------------------------------- ### RuriLib Encryption and Hashing Blocks Source: https://github.com/openbullet/openbullet2/blob/master/Changelog/0.2.0.md Demonstrates new RuriLib blocks for string encryption/decryption using AES and for BCrypt hashing and salt generation, simplifying cryptographic operations within RuriLib. ```csharp // Fixed AesEncrypt block and added AesEncryptString and AesDecryptString blocks string encryptedString = AesEncryptString(plainText, key, iv); string decryptedString = AesDecryptString(encryptedString, key, iv); // Added BCryptHash, BCryptHashGenSalt and BCryptVerify blocks string salt = BCryptHashGenSalt(password); string hash = BCryptHash(password, salt); bool isValid = BCryptVerify(password, hash); ``` -------------------------------- ### OpenBullet2 Descriptor Structure Source: https://github.com/openbullet/openbullet2/blob/master/openbullet2-web-client/src/app/main/components/config/config-stacker/block-info/block-info.component.html Defines the overall structure of an OpenBullet2 descriptor, including its name, description, extra information, label, output variable type, and parameters. This serves as a template for creating and understanding descriptor configurations. ```APIDOC OpenBullet2Descriptor: name: string description: string extraInfo: string label: string returnType: string (e.g., PascalCase) parameters: Array Parameter: name: string (e.g., PascalCase) type: string (e.g., ByteArray, String, Integer, Boolean, Object, etc.) isOptional: boolean (optional, defaults to false) defaultValue: any (optional) description: string (optional) ``` -------------------------------- ### RuriLib Proxy Settings Source: https://github.com/openbullet/openbullet2/blob/master/openbullet2-web-client/src/app/main/components/rl-settings/rl-settings.component.html Defines network proxy configurations, such as connection timeouts and ban key management. ```APIDOC Proxy Settings: Connect timeout milliseconds: Sets the timeout for establishing proxy connections. Read/Write timeout milliseconds: Sets the timeout for reading from or writing to proxies. Global ban keys: Keys used to globally ban specific proxies. Global retry keys: Keys used to globally retry specific proxies. ``` -------------------------------- ### RuriLib Parallelizer and HTTP Settings Source: https://github.com/openbullet/openbullet2/blob/master/Changelog/0.2.0.md This snippet highlights RuriLib's new parallel testing capabilities using Parallel.ForEach and the ability to select the HTTP request library (RuriLib.Http or System.Net), which includes HTTP/2.0 and SOCKS proxy support in .NET 6. ```csharp using System.Threading.Tasks; // Added Parallel.ForEach based parallelizer for testing purposes Parallel.ForEach(configs, config => { // Test config }); // Added HttpLibrary setting to Http Request block. // Now you will be able to choose between RuriLib.Http and System.Net to send your HTTP requests. // With .NET 6, System.Net supports SOCKS proxies as well. // Added HTTP/2.0 support (only for the System.Net library) ``` -------------------------------- ### RuriLib New Blocks Source: https://github.com/openbullet/openbullet2/blob/master/Changelog/0.1.22.md Introduces new blocks in RuriLib for taking integer and float values with maximum and minimum constraints. ```LoliCode TakeMaxInt TakeMinInt TakeMaxFloat TakeMinFloat ``` -------------------------------- ### CPU Performance Metrics Source: https://github.com/openbullet/openbullet2/blob/master/openbullet2-web-client/src/app/main/components/home/sysperf-cards/sysperf-cards.component.html Displays the CPU usage percentage for the current minute. It shows both a chip value and a general value, formatted to two decimal places. ```html CPU Last minute {{cpuChipValue | number : '1.2-2'}}% {{cpuValue | number : '1.2-2'}}% ``` -------------------------------- ### OpenBullet2 Settings - Customization Source: https://github.com/openbullet/openbullet2/blob/master/openbullet2-web-client/src/app/main/components/ob-settings/ob-settings.component.html Customization settings for OpenBullet2, specifically the UI theme. ```APIDOC Settings: Customization: UiTheme: string ``` -------------------------------- ### OpenBullet2 Settings - General Source: https://github.com/openbullet/openbullet2/blob/master/openbullet2-web-client/src/app/main/components/ob-settings/ob-settings.component.html General settings for OpenBullet2, including default author, job manager update intervals, job update intervals, default job display mode, proxy check targets, and custom snippets. ```APIDOC Settings: General: DefaultAuthor: string JobManagerUpdateIntervalMilliseconds: integer JobUpdateIntervalMilliseconds: integer DefaultJobDisplayMode: string ProxyCheckTargets: - Url: string SuccessKey: string CustomSnippets: - Name: string Description: string ``` -------------------------------- ### Webhook Configuration Parameters Source: https://github.com/openbullet/openbullet2/blob/master/openbullet2-web-client/src/app/main/components/jobs/edit-multi-run-job/configure-discord/configure-discord.component.html Defines the parameters required for setting up a webhook in OpenBullet2. These include the target URL, a display name for the sender, and an optional avatar image URL. ```APIDOC Webhook: URL: string The URL of the webhook endpoint to send notifications to. Username: string The username to display for the webhook sender. AvatarURL: string (optional) The URL of an avatar image to use for the webhook sender. ``` -------------------------------- ### RuriLib - Selenium Blocks Source: https://github.com/openbullet/openbullet2/blob/master/Changelog/0.1.27.md Adds Selenium blocks to RuriLib, enabling the use of Selenium within OB2 configurations for web automation tasks. ```csharp // Example usage of Selenium blocks would go here // This is a placeholder for the actual implementation. ``` -------------------------------- ### OpenBullet2 API Endpoints Source: https://github.com/openbullet/openbullet2/blob/master/openbullet2-web-client/src/app/main/components/sharing/sharing.component.html This section details the available API endpoints for managing sharing functionalities within OpenBullet2. It includes placeholders for routes and actions like delete and update. ```APIDOC Endpoint Route: {{ endpoint.route }} Actions: - New - Delete - Update Selected Endpoint Route: /{{ selectedEndpoint.route }} ``` -------------------------------- ### RuriLib Puppeteer Settings Source: https://github.com/openbullet/openbullet2/blob/master/openbullet2-web-client/src/app/main/components/rl-settings/rl-settings.component.html Specifies the location of the Chrome binary for Puppeteer browser automation. ```APIDOC Puppeteer Settings: Chrome binary location: Path to the Chrome executable for Puppeteer. ``` -------------------------------- ### RuriLib Statements and Settings Source: https://github.com/openbullet/openbullet2/blob/master/Changelog/0.1.25.md Introduces new statements like SET PROXY, SET USEPROXY, MARK, and UNMARK in RuriLib. Also includes URLEncode setting in Parse blocks and support for new captcha providers. ```RuriLib Added statements: SET PROXY, SET USEPROXY, MARK, UNMARK Added URLEncode setting in Parse block Support for 9kw.eu captcha provider and enterprise reCaptcha v2/v3 Bug fix for http proxy authentication ``` -------------------------------- ### OpenBullet2 HTTP Configuration Parameters Source: https://github.com/openbullet/openbullet2/blob/master/openbullet2-web-client/src/app/main/components/config/config-stacker/http-request-block/http-request-block.component.html Defines the core parameters for making HTTP requests within OpenBullet2, including URL, method, authentication, and content handling. ```APIDOC URL: - The target URL for the HTTP request. Method: - The HTTP method to use (e.g., GET, POST, PUT, DELETE). HTTP version: - The HTTP protocol version (e.g., HTTP/1.1, HTTP/2). Standard: - Specifies the HTTP standard compliance. Raw: - Allows for raw HTTP request body input. Basic Auth: - Username and Password for Basic Authentication. - Username: The username for authentication. - Password: The password for authentication. Multipart: - Settings for multipart/form-data requests. - Boundary: The boundary string for multipart data. - String Raw File: - Name: The name of the form field for the file. - Content Type: The MIME type of the file. - Data: The file content as a string. - Multipart String Content: - Name: The name of the form field. - Content Type: The MIME type of the content. - Data: The string content. - Multipart Raw Content: - Name: The name of the form field. - Content Type: The MIME type of the content. - Data: The raw content. - Multipart File Content: - Name: The name of the form field. - Content Type: The MIME type of the file. - File Name: The name of the file. - Data: The file content. Custom Cookies: - Allows specifying custom cookies for the request. Custom Headers: - Allows specifying custom HTTP headers for the request. Timeout (ms): - The maximum time in milliseconds to wait for a response. Max n. of redirects: - The maximum number of redirects to follow. Code Pages Encoding: - The encoding to use for character sets. ``` -------------------------------- ### OpenBullet2 Advanced HTTP Settings Source: https://github.com/openbullet/openbullet2/blob/master/openbullet2-web-client/src/app/main/components/config/config-stacker/http-request-block/http-request-block.component.html Configures advanced settings for the HTTP client library used by OpenBullet2, including security protocols and cipher suites. ```APIDOC ADVANCED SETTINGS: HTTP Library: - Specifies the HTTP client library to use (e.g., HttpClient, WebClient). Security Protocol: - The security protocol to use for HTTPS connections (e.g., Tls12, Tls13). Custom cipher suites: - Allows specifying custom cipher suites for enhanced security or compatibility. ``` -------------------------------- ### RuriLib Selenium Settings Source: https://github.com/openbullet/openbullet2/blob/master/openbullet2-web-client/src/app/main/components/rl-settings/rl-settings.component.html Configures browser types and binary locations for Selenium-based browser automation. ```APIDOC Selenium Settings: Browser type: The type of browser to use with Selenium (e.g., Chrome, Firefox). Chrome binary location: Path to the Chrome executable for Selenium. Firefox binary location: Path to the Firefox executable for Selenium. ``` -------------------------------- ### Network Performance Metrics Source: https://github.com/openbullet/openbullet2/blob/master/openbullet2-web-client/src/app/main/components/home/sysperf-cards/sysperf-cards.component.html Monitors network download and upload speeds in bytes per second. It includes a note indicating that the values represent the whole system. ```html Network Last minute * for the whole system Down Up {{networkDownloadValue | bytes}}/s {{networkUploadValue | bytes}}/s ```