Ts3audiobot: TeamSpeak server 3.1.0

Created on 19 Jan 2018  路  26Comments  路  Source: Splamy/TS3AudioBot

Hey,

i think teamspeak has changed the init protocol in the new teamspeak version. They add a the line

[OUT] clientinitiv alpha=i06Dri9boREG+w== omega=ME0DAgcAAgEgAiEAgt1VXYYXKoUpIgDbmbq7Aw24IclySyv7ye5iFzvYc9QCIQCut+9nN6Z0hiQzWAC86b57Hge95GbN0HGq\/g== ot=1 ip=18.***.**:*
[IN ] initivexpand2 l=AQA1hUFJiiSs0wFXkYuPUJVcDa6XCrZTcsvkB0Ffzz4CmwIITRXgCqeTYAcAAAAgQW5vbnltb3VzAACiIBip9hQaK6P3QhwOJs\/BkPn0ioyIDPaNgzJ6M8x0kiAJf4hxCYAxMQ== beta=Tc+pN4wdDNZQs9aVJ76SxAR8UoP53GjlG98QJ7XtX4HDV34ZMwZqg+ZI7F7XuYwh4as535mK omega=MEsDAWCAwdX3C2n46yvx+hQhEVV19yt1BzRR2j6ueBxgcAAgEgAiAQGpMwIgYD1PbjT0XQZyzD+OzFvyYTUvytG9Ic3\/SDDjvglJZzQ= ot=1 proof=MEUC28oygs6uRIAWuoQ35x+4vasMokRAu\/HtRbHMDUH+QAiEAwunoC0j6sEOBCouIOeNxR1pFcBIh3smjNmiHgWJTpS5x+k= tvd time=1516372945
[OUT] clientek ek=JGMXLO+UsgcdkyPjVPrzjnsdvrtYlcLux07dgdgISYI= proof=MEYCIQDfcjD3+XK0VUV1YA4tulhHAmuNTPXH9Qs+0sycpZvg6wIhAOEx23QU2GQ0t4M1xek4Wqpj8K\/ZWzKQONPrhz0p9HVN

I think you can find a good solution. Then the Audiobot can't connect to the server.

Most helpful comment

IT WORKS !!!!!!

3 1

I will polish everything up, remove spaghetti, add spaghetti, eat spaghetti. And we should be ready for release this evening or tomorrow.
Stay tuned!

All 26 comments

I know, I'm working on it...

How are the works on the new version going?

I'm making slowly progress

Small update, although I'm really far, I will have to put work on hold till roughly the end of the month due to exams.

Any updates?

not yet
I'm also not dead :P
I will write it here when there's progress.

IT WORKS !!!!!!

3 1

I will polish everything up, remove spaghetti, add spaghetti, eat spaghetti. And we should be ready for release this evening or tomorrow.
Stay tuned!

Congrats! Can you also update the protocol description paper?

It will be updated shortly after

Oh boy oh boy please don't make me wait any longer

3.1 is now live on develop branch. Please report any issues you encounter.
Please note that the connect might be slow and take over a second since the crypto algorithm isn''t very optimized yet.

Cough cough, sum bugg
(The bot works and all (wth) but it's just that it just hangs on retrieving data xD)

fix is already up :P

Sh*t man, you are too fast with these updates

Update: I've finally completely integrated the new crypto library. The connection should now be blazing fast again (from ~700ms to <1ms here)

@Splamy I get this loop error, the bot connects and disconnects:

04:39:46.2804|DEBUG Got message from Akira: !play [URL]https://www.youtube.com/watch?v=QJMTLsoMX0Q[/URL]
04:39:46.3708|DEBUG User Akira created session with the bot
04:39:46.7941|DEBUG Falling back to youtube-dl!
04:39:49.2927|DEBUG youtube-dl succeeded!
04:39:49.3010|DEBUG AudioResource start: youtube ID:QJMTLsoMX0Q
04:40:12.9183|DEBUG Bot disconnected. Reason: Timeout
04:40:12.9201| INFO Bot disconnecting.
04:40:12.9243| WARN custom_error: the command failed to execute: Connection closed
04:40:12.9260| WARN Could not save avatar: custom_error: the command failed to execute: Connection closed
04:40:13.4519| INFO Bot connecting...
04:40:40.3731|DEBUG Got message from Akira: !play [URL]https://www.youtube.com/watch?v=QJMTLsoMX0Q[/URL]
04:40:40.4577|DEBUG User Akira created session with the bot
04:40:40.6556|DEBUG Falling back to youtube-dl!
04:40:43.2892|DEBUG youtube-dl succeeded!
04:40:43.2917|DEBUG AudioResource start: youtube ID:QJMTLsoMX0Q
04:40:46.9200|DEBUG Bot disconnected. Reason: Timeout
04:40:46.9205| INFO Bot disconnecting.
04:40:46.9221| WARN custom_error: the command failed to execute: Connection closed
04:40:46.9236| WARN Could not save avatar: custom_error: the command failed to execute: Connection closed
04:40:47.3541| INFO Bot connecting...
04:41:20.6419|DEBUG Bot disconnected. Reason: Timeout
04:41:20.6433| INFO Bot disconnecting.
04:41:20.6433| WARN Internal error (me==null)
04:41:20.6451| WARN Could not save avatar: custom_error: the command failed to execute: Connection closed
04:41:21.2829| INFO Bot connecting...

@robotrono Hey, please open a seperate issue, as this seems unrelated to 3.1.
To the problem: please post me a debug log with trace level:

<logger name="TS3AudioBot.*" minlevel="Trace" writeTo="logfile" />
<logger name="TS3AudioBot.*" minlevel="Trace" writeTo="console" />
<logger name="TS3Client.*" minlevel="Debug" writeTo="logfile" />
<logger name="TS3Client.*" minlevel="Debug" writeTo="console" />

Since 3.1 seems stable i'll close this.

Hi, any news on the protocol paper?

@syncu2 The new proto paper is now, up, i'll let someone proof read it the next few days

Many thanks!

Thanks for the great work, is it okay to ask questions about the new protocol here, or should I rather open a new issue at the ts3declarations repo?

Anyways, I am experimenting a little in Python and got the following license block from the server:

(without the license header byte)

00000000: 00 AF 6C 71 53 40 36 3F  B5 EA CF 7A 29 6B A7 F1  ..lqS@6?...z)k..
00000010: 02 53 DC 42 1F 95 37 C4  2F 76 95 84 CD 69 8F F4  .S.B..7./v...i..
00000020: 29 00 09 16 E7 80 6B 36  EC 80 00 00 00 25 54 65  ).....k6.....%Te
00000030: 61 6D 53 70 65 61 6B 20  53 79 73 74 65 6D 73 20  amSpeak Systems 
00000040: 47 6D 62 48 00 00 61 97  D8 30 95 AF D4 26 9D 84  GmbH..a..0...&..
00000050: B3 3B 2D F5 34 55 5C EF  CF 78 4E 9A E9 DF 82 4C  .;-.4U\..xN....L
00000060: 8E 8F 83 B3 84 56 00 09  73 90 AB 2F 83 61 F2 00  .....V..s../.a..
00000070: 00 00 24 54 65 61 6D 53  70 65 61 6B 20 73 79 73  ..$TeamSpeak sys
00000080: 74 65 6D 73 20 47 6D 62  48 00 00 89 72 87 6B B7  tems GmbH...r.k.
00000090: B4 D1 C2 86 8E 3E 72 10  E9 C7 2C DA D8 C1 9F 50  .....>r...,....P
000000A0: 67 78 2B 1B AF 93 16 F2  5A 65 3B 02 09 74 82 00  gx+.....Ze;..t..
000000B0: 0A 1D 42 00 05 00 00 00  00 4C 69 76 69 6E 67 2D  ..B......Living-
000000C0: 42 6F 74 73 2E 6E 65 74  00 00 E8 28 2C 10 B2 2A  Bots.net...(,..*
000000D0: 31 D5 74 EE 93 AE 61 D6  91 73 20 9A FC CC B3 4F  1.t...a..s ....O
000000E0: 3A 88 29 AA 43 B6 8E E9  79 40 20 09 DA 75 36 09  :.).C...y@ ..u6.
000000F0: DB 1D F6                                          ...

1) I noticed that for type 00 licenses, there are an additional 4 bytes between the NotValidAfter timestamp and issuer name string, so the actual name string starts at byte 46 rather than 42, right?
Furthermore, the last license seems to be of type 00 as well but is only 42 bytes long, so it has no name?!

2) Another question regarding the calculation of IV and MAC: How do I calculate sharedData? Like in the old protocol? Does this mean that I need to calculate
sharedSecret = ECDH(serverPublicKey, ownPrivateKey) first, with serverPublicKey being the last next_key from the license procedure, and what would be ownPrivateKey? My TS identity private key or the private key of the ephermal keypair I just created?

3) How exactly is the sha512 hash interpreted as a private key? Is it simply a big-endian big integer?
I saw that you used ScalarOperations.sc_clamp(Hash) in your code, what does this function do?

Thank you

Yeah I would prefer a new issue in the other repo.

To your question, yes there is a mistake, I will fix it immediately in the doc.
The 'intermediate' has 4 bytes before the issuer.
The 'server' has 5 bytes before the issuer.

The last block is of type 32, not 0, you have to check the License block type not the Key Type.
I will clarify that.

The part for the new sharedData is obviously missing, I will add it too.
it should be sharedData = next_key * client_private_key

Ok fixes are up

In what repository? The file at the tsdeclarations repo seems not to have been updated...

nvm, forgot to push

Was this page helpful?
0 / 5 - 0 ratings

Related issues

DanonekTM picture DanonekTM  路  3Comments

Najsr picture Najsr  路  3Comments

Americanu picture Americanu  路  3Comments

officialtaxz picture officialtaxz  路  6Comments

dalexhd picture dalexhd  路  5Comments