Get flag from $MyINFO string TLS or not
 

Get flag from $MyINFO string TLS or not

Started by Hamachi, 01 November, 2011, 22:13:51

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Hamachi

Hey i need some help whit the $MyINFO string

I like to know if user use TLS in client or not

$sMyInfo = $MyINFO $ALL Hamachi <((((!))))><++ V:0.782,M:A,H:0/0/3,S:1>$ $0.005$$0$

--if client support TLS
if $sMyInfo == xxx then
--do somfing
else
--do somfing
end

Thanks for the help :)


Hamachi

#2
hmm i have problems whit 3 users:

$MyINFO $ALL NICK1 <AirDC++ V:2.21,M:A,H:0/1/0,S:4>$ $0Q$EMAIL$123$
$MyINFO $ALL NICK2 <RSX++ V:1.21,M:A,H:0/1/0,S:1>$ $1$EMAIL$123$
$MyINFO $ALL NICK3 <AirDC++ V:2.21,M:A,H:0/1/0,S:8>$ $30Q$EMAIL$123$
$MyINFO $ALL NICK4 <EiskaltDC++ V:2.2.4,M:A,H:0/1/0,S:2>$ $1000$EMAIL$123$


TLS works in the clients...

Hamachi


PPK

Actually getting this info from MyINFO need bitwise operations, because that one (magic) byte use bits to show things:
1 bit [0x1] = is always on or should be on always (to avoid possible NULL character [it is not allowed in protocol] when others bit are not enabled)
2 bit [0x2] = is on when user is away
3 bit [0x4] = is on when user is server (sharing more than 2 GB, online more than 2 hour and uploaded more than 200 MB)
4 bit [0x8] = is on when user have fireball (upload more than 200 kB/s]
5 bit [0x10] = is on when user supporting TLS (download only with TLSv1 protocol extension support or all transfers with TLS protocol extension support)
6 bit [0x20] = is on when user supporting TLS for upload (with TLSv1 protocol extension support]
7 bit [0x40] = is on when user supporting IPv4 (with IP64 protocol extension support)
8 bit [0x80] = is on when user is supporting IPv6 (with IP64 protocol extension support)

First 4 bits are protocol standard.
Last 4 bits are protocol extensions and in PtokaX case is their use based on protocol extension support (so client not supporting IP64 protocol extension can't use bit 7 and 8 )  ;D
"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall

Hamachi

Ok i get this error:

attempt to perform arithmetic on local 'x' (a boolean value)

Hamachi

Ahh i have found my bug now, Thanks for you help Mutor.

SMF spam blocked by CleanTalk