Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
fuss:opensim [2014/10/11 23:22] – [Extract Password Hashes From Database Using MySQL] officefuss:opensim [2022/04/19 08:28] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +====== Database Statistics ======
 +
 +  * User accounts in the database:
 +
 +<code sql>
 +SELECT COUNT(*) FROM UserAccounts;
 +</code>
 +
 +  * Users logged-in at least once:
 +
 +<code sql>
 +SELECT COUNT(*) FROM UserAccounts WHERE ServiceURLs NOT LIKE 'HomeURI= GatekeeperURI= InventoryServerURI= AssetServerURI=';
 +</code>
 +
 +  * Number of regions:
 +
 +<code sql>
 +SELECT COUNT(*) FROM regions;
 +</code>
 +
 +====== 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:
 +
 +<code sql>
 +SELECT FirstName,LastName,auth.passwordHash,auth.passwordSalt FROM UserAccounts LEFT JOIN auth ON UserAccounts.PrincipalID=auth.UUID;
 +</code>
 +
 +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:
 +<code>
 +AllowedCompilers = "lsl,cs"
 +</code>
 +
 +Then, create an in-world script containing the following annotated code:
 +<code csharp>
 +//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);
 +}
 +</code>
 +
 +which overrides the ''touch_start'' event and prints the output of ''ps ax'' on local chat.
  

fuss/opensim.1413069761.txt.bz2 · Last modified: 2014/12/19 22:48 (external edit)

Access website using Tor Access website using i2p Wizardry and Steamworks PGP Key


For the contact, copyright, license, warranty and privacy terms for the usage of this website please see the contact, license, privacy, copyright.