TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,917
  • Total Topics: 21,308
  • Online today: 884
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 562
  • Total: 562

Teamspeak block!

Started by -Prismatic-, October 14, 2005, 11:20:45 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Yngwiedis

I think darthmatics is talking about that kind of errors which are fill our error log.

Quote8: Undefined index: 8
File: /home/alliance/public_html/teamspeak/ts_config.inc.php
Line: 227

Quote8: Undefined offset: 7
File: /home/alliance/public_html/teamspeak/ts_config.inc.php
Line: 226

Quote8: Undefined offset: 6
File: /home/alliance/public_html/teamspeak/ts_config.inc.php
Line: 225

etc...

xadio

Quote from: Yngwiedis on February 13, 2006, 10:29:48 PM
I think darthmatics is talking about that kind of errors which are fill our error log.

Quote8: Undefined index: 8
File: /home/alliance/public_html/teamspeak/ts_config.inc.php
Line: 227

Quote8: Undefined offset: 7
File: /home/alliance/public_html/teamspeak/ts_config.inc.php
Line: 226

Quote8: Undefined offset: 6
File: /home/alliance/public_html/teamspeak/ts_config.inc.php
Line: 225

etc...


Oh ok...
I am not getting those errors...

Arkanthos

He he, well I got mine working, turns out I had changed the TCP update port to something else, so it wouldn't respond on the default port. But now I have a different thought. I'm not sure if those who are in this specific topic know the answer but... I'd like to be able to use the web login URL for Teamspeak in conjunction with the display block.

Information needed: Username from the forum (easy), Password from the forum (harder), Display Name from the forum (easy).

So basically what I'd like to be able to do is have it so someone clicks on a chan in the viewer, the block loads the above information and tosses it into this URL which will launch TS with the information. Thereby allowing people to sign into the server under a registered account. Any ideas?

[the URL] teamspeak://[IP]:[PORT]/nickname=[DISPLAYNAME]?loginname=[USERNAME]?password=[FORUMPASSWORD]

Now, if I knew how to access this information it would be really easy to do right? I mean... just edit the link to include them right?

I'd be quite grateful if anyone can help me with this, I hope that people can see the value of this...

xadio

Quote from: Arkanthos on February 15, 2006, 12:23:02 AM
He he, well I got mine working, turns out I had changed the TCP update port to something else, so it wouldn't respond on the default port. But now I have a different thought. I'm not sure if those who are in this specific topic know the answer but... I'd like to be able to use the web login URL for Teamspeak in conjunction with the display block.

Information needed: Username from the forum (easy), Password from the forum (harder), Display Name from the forum (easy).

So basically what I'd like to be able to do is have it so someone clicks on a chan in the viewer, the block loads the above information and tosses it into this URL which will launch TS with the information. Thereby allowing people to sign into the server under a registered account. Any ideas?

[the URL] teamspeak://[IP]:[PORT]/nickname=[DISPLAYNAME]?loginname=[USERNAME]?password=[FORUMPASSWORD]

Now, if I knew how to access this information it would be really easy to do right? I mean... just edit the link to include them right?

I'd be quite grateful if anyone can help me with this, I hope that people can see the value of this...


First you will need to look on the goteamspeak.com forums to see how to integrate TS with smf database.  It will probably take some hacking to get it to check the smf db for username and password.  As for the username and password, it can be extracted from the cookie set by SMF.  Then yes it is simple to drop it into TS dynamically.

Things to note:
how are you going to handle guests,
remember that the password in the cookie is encrypted (probably md5) so when making your making your sql command to login to TS (which you'll have to hack) just do a straight compare not a PASSWORD(<password here>) compare.

I would probably suggest a redirection when clicking on the TS link to a new window or something asking the user to reinput his/her username and password.  This would reduce the hacking on the TS part and then you won't have to figure out exactly what the SMF cookie is "holding".

Arkanthos

True, hmmm. I'll have to take a look at the cookie from the site and see what's in there.

In a perfect world, I was hoping that there was some way of doing like $[usename] or $[password] to let SMF draw it rite out of the DB for me. I guess I could make the call for it, have it snag it from the DB based on the username of the person logged in, should be able to get that from the cookie at the very least.

<<looked at the cookie>>
Yea, it's pretty encrypted...

I'd like at any cost to avoid havint the user input the information needed to login, but if it's the only way then I guess that's how I'll be doing it.

xadio

You can always post on simplemachines.org and ask what the cookie means... like what parts are what.  I noticed that the %3 looks a little odd as if its a spacer or something... and there is a part thats like %3<random assortment of upper and lowercase letters adn numbers>  Now that random assortment of U and l letters and numbers looks very suspicious as if its a md5 encrypted password.  You can always browse your DB for your password and compare that with the cookie... see if you see any match...

Now that I remember I think on my board I am (by default) storing cookies locally so this might be one problem.

Another thing... I have coppermine bridged with smf and it saves its own cookie (2 particularly one smf001_user and smf001_pass).  These are great! They are exactly what you need, if you can find out how this was gathered then I think you will have found you solution.

xadio

#96
Just found something... was looking in Login.template.php and saw $context['default_password'] and $context['default_username'].  This could be what your looking for...


Also look in Sources/LogInOut.php and Sources/Subs-Auth.php

Arkanthos


// Load the data up!
$request = db_query("
SELECT passwd, ID_MEMBER, ID_GROUP, lngfile, is_activated, emailAddress, additionalGroups, memberName, passwordSalt
FROM {$db_prefix}members
WHERE memberName = '$_REQUEST[user]'
LIMIT 1", __FILE__, __LINE__);


Ok, this looks like what I needed to see. It's making a query to the database in order to fetch the information to login:

passwd = password?
passwordSalt = ??? Wondering what the heck passwordSalt is...
ID_MEMBER = Login Name?
memberName = Display Name?

The membergroups/lngfile/is_activated/emailAddress/additionalGroups look to be information I can skip without worrying.

But now, looking at your 2nd post, the $context['default_username'] and $context['default_password]

I'm wondering if the forum is passing the hashed PW back through the md5 algorithm (maybe using the passwordSalt as a key?)

Thinking this might be something to talk to the SMF guys about lol, it's getting pretty deep into their login/authentication procedure for the forums.

xadio

That will be good to get when getting the information but for checking:

I can for sure tell you that you will not *ever* be able to decrypt the encrypted password.  But you can possibly add another parameter to TS so when you input, for example op=ts-block:
?username=<>?password=<md5 encrypted>?op=ts-block
it will just do a straight comparison:
Select membername from smf_users where passwd = $password
not the encrypted comparison (which is default):
Select membername from smf_users where passwd = PASSWORD($password)

Password salt is:
$user_settings['passwordSalt'] = substr(md5(rand()), 0, 4);

I think its just a serial key for your cookie...

But definitely talk to some smf guys about this.

disisme

Guys, I display a button on my helios theme, in the smf 1.0.6 part (not TP).  I added the buttons to index.template.php and use $context['user']['name'] in the teamspeak string.  Thats after I do an if $context['user']['is_logged').  so if they arent logged in, they dont see the buttons....

This website is proudly hosted on Crocweb Cloud Website Hosting.