Table of Contents

Database Statistics

SELECT COUNT(*) FROM UserAccounts;
SELECT COUNT(*) FROM UserAccounts WHERE ServiceURLs NOT LIKE 'HomeURI= GatekeeperURI= InventoryServerURI= AssetServerURI=';
SELECT COUNT(*) FROM regions;

Extract Password Hashes From Database Using MySQL

The following command will extract first name, last name, UUID and their password hashes and salts from the database:

SELECT FirstName,LastName,auth.passwordHash,auth.passwordSalt FROM UserAccounts LEFT JOIN auth ON UserAccounts.PrincipalID=auth.UUID;

The returned output will be of the form:

FirstName LastName passwordHash passwordSalt
Taller Tempter a54c86d6fe5e88eff17bfc32461142cb 8ce1fa1fba4eae5887942a8b5793f690

Run System Command from OpenSim

You can use C# in OpenSim by adding cs in OpenSim.ini to the list of allowed compilers:

AllowedCompilers = "lsl,cs"

Then, create an in-world script containing the following annotated code:

//c#
///////////////////////////////////////////////////////////////////////////
//  Copyright (C) Wizardry and Steamworks 2011 - License: GNU GPLv3      //
///////////////////////////////////////////////////////////////////////////
 
public void default_event_touch_start(LSL_Types.LSLInteger num)
{
    System.Diagnostics.Process p = new System.Diagnostics.Process();
    p.StartInfo.UseShellExecute = false;
    // redirect standard output to retrive results
    p.StartInfo.RedirectStandardOutput = true;
    // this represents the name of the command
    p.StartInfo.FileName = "ps";
    // this represents the arguments passed to the commands
    p.StartInfo.Arguments = "ax";
    // start the process
    p.Start();
 
    // get the output of the command
    LSL_Types.LSLString output = p.StandardOutput.ReadToEnd();
 
    // wait for command termination (optional)
    p.WaitForExit();
 
    // say the output on local chat
    llSay(0, output);
}

which overrides the touch_start event and prints the output of ps ax on local chat.