IT NEWS PC REVUE PC FORUM FreeBSDInternet time: @235
Obsah fóra
Pravidlá  •  Kontakt  •  Prihlásenie  •  Registrácia

Vyhraj Lego Duplo každý deň

Zapojte sa do súťaže a vyhrajte! Je to tak jednoduché! www.duplo.lego.com

Dali sme si poradiť

Naše peniaze sa zhodnocujú. A vám? www.partnersgroup.sk

Zbavte sa viazanosti

Za Samsung Galaxy Ace so zlatým O2 Paušálom zaplatíte teraz 12 €! pausal.o2.sk

Úsporná stavba domu

PORFIX - postavte si dom úspornejšie! Ušetríte na energiách! www.Porfix.sk

Ešte ho nemáte?

Výhodné poistenie motorových vozidiel nájdete na našej stránke. www.uniqa.sk

tcpClient a prihlasenie na server

Zaslať odpoveď
AutorSpráva
skorec1
Užívateľ
Užívateľ

Založený: 05.03.2007
Príspevky: 59
Bydlisko: www.valal.sk
Vek: 31

PríspevokZaslal: Po 27.06.11 23:31Odpovedať s citátomNávrat hore

ahoj, vedel by mi niekto poradit? mam aplikaciu s ktorou sa pripojim na server a neviem ako sa mam prihlasit na server a v spravnom "tvare" odosielat data

Princip prihlasenia na server je tu v PERL, ale to nemam ani sajnu
http://outflux.net/software/bf1942-console

kód:
# Post-authentication Client/Server communication is done via blocks of
# data.  Each data block starts with the number of strings contained in
# the block, then each string, null terminated, with a 4-byte size sent
# before the string.  Each 4-byte "length" is sent in unsigned long
# little-endian order.
#
# Bytes                  Meaning
# 1 2 3 4                Number of strings in this block
# 5 6 7 8                Size of string #1
# 9 ...                  String #1, with trailing NULL
# ...                    Size of string #2
# ...                    String #2, with trailing NULL
#


# Initial authentication is done via simple XOR'ing.  The server sends 10
# bytes, and the client XORs the authentication information against those
# 10 bytes (and re-uses them again for each of the 10 bytes it sends to
# the server).
#
# Server->Client:  10 bytes: XOR pattern to use
# Client->Server:  4 bytes: length of user name (including the trailing NULL)
# Client->Server:  X bytes: user (index-XOR'd, with trailing NULL)
#          for example, if the user name was 15 "0x10" values,
#          and the XOR pattern was the byte values from
#          0x00-0x09, the resulting "encrypted" user name
#          would be in hex:
#          10,11,12,13,14,15,16,17,18,19,10,11,12,13,14,0
# Client->Server:  4 bytes: length of password (including the trailing NULL)
# Client->Server:  X bytes: password, XOR'd like the username, with final NULL
# Server->Client:  1 byte.  (value of "1" means authenticated)
#
# To start console communication, the client seems to send something that
# almost matches the description of "Post-Authentication" communication,
# but the count of strings is wrong.  Where "OFFSET" is the server instance
# to talk to (0 being first, 1 for the next server on the same IP, etc) it
# sends:
#
# 4 byte block length: 2
# NULL-terminated string: ConsoleRun OFFSET
# 4 byte block length: 2
# empty NULL-terminated string
# empty NULL-terminated string
#
# and then it reads back a regular block from the server, and then "normal"
# block-at-a-time communication starts up.

_________________
SELECT noob FROM pc_forum ORDER BY rank
Zobraziť informácie o autoroviOdoslať súkromnú správuZobraziť autorove WWW stránky
Zobraziť príspevky z predchádzajúcich:    
Zaslať odpoveď
Nemôžete pridávať nové témy do tohto fóra.
Nemôžete odpovedať na témy v tomto fóre.
Nemôžete upravovať svoje príspevky v tomto fóre.
Nemôžete mazať svoje príspevky v tomto fóre.
Nemôžete hlasovať v tomto fóre.

Powered by phpBB 2.x.x © 2005 - 2012 PCforum, webhosting by WebSupport, edited by JanoF

SEO - optimalizácia pre vyhľadávače

Freebsd