User:Dzonatas Sol/SNOW-375 WGET

From Second Life Wiki
< User:Dzonatas Sol
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
MonoVida-20090701a.png

Please feel free to update this page as needed.

This page demonstrates a few methods to access the viewer data via the SNOW-375 patch. This is how client-side scripts can access the data, too. We use wget as a unix shell script example.

Use WGET to access viewer data with SNOW-375

Once you have the viewer compiled and started, go ahead and login.

  • Access the "Advanced" menu
  • Select "Debug Settings"
  • Type in "InterfaceVerifySessionCookie"
  • Make sure the settings is "false"
  • Close the popup.

Once you do the above, you have disabled the session cookie. The session cookie acted as a basic security means to control connections to only allow a single session between the viewer and the script. We disabled it to make this demonstration easier.

At the shell script, you can now type:

And the response should give you an LLSD output of the available variable control groups:

<llsd>
 <array>
  <string>SavedSettings</string>
  <string>SavedPerAccountSettings</string>
 </array>
</llsd>

Here's example to get the your root folder UUID:

<llsd>
 <map>
  <key>ID</key>
  <uuid>88199409-7050-4484-bda7-b9f7f890c379</uuid>
 </map>
</llsd>

We can see the LLSD format that represents ID=88199409-7050-4484-bda7-b9f7f890c379. Let's use that to get the contents of that inventory folder:

<llsd>
 <map>
  <key>Categories</key>
  <array />

  <key>Items</key>
  <array>
   <uuid>111ec416-0888-7c64-013e-2d84d64205c2</uuid>
  </array>

  <key>Name</key>
  <string>LaserTech Pylon (Packaged)</string>

  <key>Type</key>
  <string />
 </map>
</llsd>

The example shows a category named "LaserTech Pylon (Packaged)" with an item with UUID "111ec416-0888-7c64-013e-2d84d64205c2" an empty array for sub-categories.