Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

libsecondlife - name2key program

Eddy Stryker
libsecondlife Developer
Join date: 6 Jun 2004
Posts: 353
06-11-2006 19:52
Everyone seems to be having a lot of fun with these name2key databases, so I decided to ruin it :-). The latest version of libsecondlife (written in C#) comes with a name2key program that logs in to SL, uses the people find directory to look up any name, and returns the key for that person. It will return all zeroes if the person is not found, or give an error notice if the name is ambiguous, followed by the first result out of the set. A working example connected to a PHP script is available for testing:

http://labs.highenergychemistry.com/secondlife/name2key.php?first=Eddy&last=Stryker

This isn't a permanent installation, so if you want one of your own join the libsecondlife-dev mailing list at:

https://mail.gna.org/listinfo/libsecondlife-dev/

Or find me on IRC in #secondlife as jhurliman on EFNet. The official 0.0.3 release will be out tomorrow once I write a README and try and find any show-stopping bugs. If you want it _now_ the code in SVN is the same the website posted above is running.
Lex Neva
wears dorky glasses
Join date: 27 Nov 2004
Posts: 1,361
06-12-2006 11:12
Wow. Nice work. I wonder if it's possible to set something up with a persistent connection to SL and that continuously serves name2key requests?
Sol Columbia
Ding! Level up
Join date: 24 Sep 2005
Posts: 91
06-12-2006 11:35
Oh wow Eddy, that's brilliant.
_____________________
Eddy Stryker
libsecondlife Developer
Join date: 6 Jun 2004
Posts: 353
06-12-2006 11:48
From: Lex Neva
Wow. Nice work. I wonder if it's possible to set something up with a persistent connection to SL and that continuously serves name2key requests?


Yes, in fact this would have to be done to use this in any sort of production environment. Right now if two people visit that URL at the same time it will have undefined results. Either boot the first person halfway through the query or not let the second person login (probably the latter). I'm working with one or two other people right now to setup a daemon interface so it can run in the background and stay in-world 24/7, while PHP scripts and other frontends poll it for information. From there you could use llHttpRequest()s to grab keys from an LSL script.
Keknehv Psaltery
Hacker
Join date: 11 Apr 2005
Posts: 1,185
06-12-2006 13:15
Wow, nice. I assume this requires an account to work, right?
Harris Hare
Second Life Resident
Join date: 5 Nov 2004
Posts: 301
06-12-2006 13:29
What do you mean when you say it "logs into second life"? Are you saying you've written software that can speak SL's protocols, log in using a legitimate account and then perform actions as if it were a human?
Keknehv Psaltery
Hacker
Join date: 11 Apr 2005
Posts: 1,185
06-12-2006 13:40
Ok, I'm laughing now.

You need to rework your security a bit.

Here's the script:
CODE

<?php


$name = $_GET['first'] . " " . $_GET['last'];

echo exec("/home/jhurliman/mono-1.1.15/bin/mono /home/jhurliman/libsecondlife-cs/bin/Debug/name2key.exe Ron Hubbard cucumber $name");

?>


This introduces some moderate security vulnerabilities. Such as executing random statements. Luckily, you're not root, but we can still do some fun stuff. Don't worry, I stopped myself from doing anything more major than file listings.

Perhaps you should re-read the section in your PHP book about security. exec() statements are very dangerous.

Have a nice day.
Keknehv Psaltery
Hacker
Join date: 11 Apr 2005
Posts: 1,185
06-12-2006 13:40
From: Harris Hare
What do you mean when you say it "logs into second life"? Are you saying you've written software that can speak SL's protocols, log in using a legitimate account and then perform actions as if it were a human?

Yes, that's what libsecondlife is. Search the forums for 'libsecondlife' and related topics, there were some threads a while back.
Keknehv Psaltery
Hacker
Join date: 11 Apr 2005
Posts: 1,185
06-12-2006 14:16
Okay, I took the liberty of fixing your page to use escapeshellcmd() to make the exec() safe.
Eddy Stryker
libsecondlife Developer
Join date: 6 Jun 2004
Posts: 353
06-14-2006 20:13
libsecondlife 0.0.3 is out, and includes the name2key program.
Baba Yamamoto
baba@slinked.net
Join date: 26 May 2003
Posts: 1,024
06-15-2006 03:33
I've used this myself ;0 It's Great!
_____________________
Open Metaverse Foundation - http://www.openmetaverse.org

Meerkat viewer - http://meerkatviewer.org
MeLight Korvin
Im on da Use
Join date: 4 Jun 2005
Posts: 99
06-15-2006 10:54
I've d/led the thing, now good people, how do i use it?
_____________________
Boobs are remote controls for the male brain. Lemmie push some buttons!!!