Author Topic: Get flag from $MyINFO string TLS or not  (Read 2159 times)

0 Members and 1 Guest are viewing this topic.

Offline Hamachi

  • Forum Ace
  • *****
  • Posts: 88
  • Karma: +0/-7
Get flag from $MyINFO string TLS or not
« on: 01 November, 2011, 22:13:51 »
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 :)

PtokaX forum

Get flag from $MyINFO string TLS or not
« on: 01 November, 2011, 22:13:51 »

Offline Hamachi

  • Forum Ace
  • *****
  • Posts: 88
  • Karma: +0/-7
Re: Get flag from $MyINFO string TLS or not
« Reply #1 on: 02 November, 2011, 21:03:03 »
Thanks American Idiot :)

Offline Hamachi

  • Forum Ace
  • *****
  • Posts: 88
  • Karma: +0/-7
Re: Get flag from $MyINFO string TLS or not
« Reply #2 on: 03 November, 2011, 19:56:11 »
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...
« Last Edit: 03 November, 2011, 20:11:13 by Hamachi »

Offline Hamachi

  • Forum Ace
  • *****
  • Posts: 88
  • Karma: +0/-7
Re: Get flag from $MyINFO string TLS or not
« Reply #3 on: 04 November, 2011, 16:45:29 »
Thanks agen American Idiot

Offline PPK

  • Administrator
  • Emperor
  • *****
  • Posts: 1 475
  • Karma: +209/-22
  • PtokaX developer
Re: Get flag from $MyINFO string TLS or not
« Reply #4 on: 04 November, 2011, 17:05:37 »
Actually getting this info from MyINFO need bitwise operations, because that one (magic) byte use bits to show things:
Code: [Select]
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

Offline Hamachi

  • Forum Ace
  • *****
  • Posts: 88
  • Karma: +0/-7
Re: Get flag from $MyINFO string TLS or not
« Reply #5 on: 05 November, 2011, 11:35:45 »
Ok i get this error:

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

Offline Hamachi

  • Forum Ace
  • *****
  • Posts: 88
  • Karma: +0/-7
Re: Get flag from $MyINFO string TLS or not
« Reply #6 on: 07 November, 2011, 13:17:07 »
Ahh i have found my bug now, Thanks for you help American Idiot.

PtokaX forum

Re: Get flag from $MyINFO string TLS or not
« Reply #6 on: 07 November, 2011, 13:17:07 »