im having a problem creating packets_token_strings, for example

a particular server u need to have the right token to send after ur connect but the problem is, im having problems creating the token string in assembly

for example:



tokenstring db 15h,15h,15h,30h,35h,35h,25h,1Bh,1Ch,44h,FFh,FFh,28h,1Eh,00h,00h,\
4Bh,22h,FFh,00h,25h,10h,10h,FFh,FFh,FFh,20h,1Bh,1BH,1Bh,00h,01h



thats just a bunch of random characters, the problem is that it says too complex, or it gives an error that it doesnt know what FFh is,

any clue? hehe excuse the vulgarity, i'll mask it out, anyhow.. this is the actual packet im trying to create



Packet #1
0x0000 1B 1B 00 73 00 01 00 80-FF F2 00 0F 00 1E 01 09 ...s...???......
0x0010 03 69 77 70 34 32 35 00-00 00 00 00 00 00 00 00 .iwp425.........
0x0020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
0x0030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
0x0040 00 00 00 44 41 52 4B 4E-45 53 53 00 00 00 00 00 ...DARKNESS.....
0x0050 00 00 00 00 00 00 00 70-6F 7A 31 32 33 00 00 00 .......poz123...
0x0060 00 00 00 00 00 00 00 00-00 00 00 66 75 63 6B 76 ...........****v
0x0070 61 7A 61 72 75 73 00 00-00 00 00 00 00 00 00 88 azarus.........?
0x0080 F1 ?


can anyone help?
Posted on 2003-04-12 23:18:38 by xkardisx
They have implemented a custom protocol at the server.
One of the most satisfying things you can do in network coding is inventing your own protocol for a given job.
In your case, the protocol might go something like this:

Client connects to Server, but Server remains silent, not advertising itself.
It waits for the Client to say something.
The Client will either say something recognized or something unknown.
If the Client doesn't say the the right thing straight up, the Server will terminate the session on the spot.
Your "token" is some kind of authentication.
Did the server send something to you first?
Posted on 2003-04-13 00:10:57 by Homer
actually, it basically the login packet ;]

u can connect fine, and i suppose even stay connected. but u aint goin anywhere, cause ur not granted access in. the problem right now is creating a packet to login ;\

for some reason, it wont let me make that packet in asm. i dont know why either.
Posted on 2003-04-13 01:26:48 by xkardisx
would i create the packets in decimal? like

mypacket db 10,10,10,13,0,14,15,bunch of random decial #s,0

? ;x
Posted on 2003-04-13 13:17:54 by xkardisx


ConnectToken db 1Bh,1Bh,00h,73h,00h,01h,00h,80h,FFh,F2h,00h,0Fh,00h,1Eh,01h,09h,\
03h,69h,77h,70h,34h,32h,35h,00h,00h,00h,00h,00h,00h,00h,00h,00h,0


Assembling: D:\masm32\project client\xclient.asm
D:\masm32\project client\xclient.asm(33) : error A2006: undefined symbol : FFh
D:\masm32\project client\xclient.asm(33) : error A2006: undefined symbol : F2h

Make error(s) occured.


or when i make it bigger



ConnectToken db 1Bh,1Bh,00h,73h,00h,01h,00h,80h,FFh,F2h,00h,0Fh,00h,1Eh,01h,09h,\
03h,69h,77h,70h,34h,32h,35h,00h,00h,00h,00h,00h,00h,00h,00h,00h,\
00h,00h,00h,00h,00h,00h,00h,00h,00h,00h,00h,00h,00h,00h,00h,00h,\
00h,00h,00h,00h,00h,00h,00h,00h,00h,00h,00h,00h,00h,00h,00h,00h,0

Assembling: D:\masm32\project client\xclient.asm
D:\masm32\project client\xclient.asm(33) : error A2042: statement too complex
Posted on 2003-04-13 14:13:31 by xkardisx
i also tried

mytoken db #len_of_array (the values) ;x

nuffin
Posted on 2003-04-13 14:14:05 by xkardisx
as for this
Originally posted by xkardisx

Assembling: D:\masm32\project client\xclient.asm
D:\masm32\project client\xclient.asm(33) : error A2006: undefined symbol : FFh
D:\masm32\project client\xclient.asm(33) : error A2006: undefined symbol : F2h

Make error(s) occured.

i think such bytes have to start with a number, so put a 0 before FFh and F2h so that error would go away.
Ie: 0FFh, 0F2h
Else MASM will refuse to assemble because it thinks FF and F2, beginning with the letter 'F' are variables, not numeric values.

HTH, phueghy
Posted on 2003-04-13 14:35:24 by phueghy
thnx that worked, for some reason, when i thought if i hadded 0FF it would add as an extra byte, but im weird in the head i guess wasnbt thinkin

each db is a byte or sumfin right? as long as its betweeen 0-255 ;x so i could of done like 001B and thats still 1 byte?
Posted on 2003-04-13 15:58:29 by xkardisx
yeah, the bytes are separated by the comma ',' so you could write:
foo db 0000FFh, 0000041h etc

only if you went over 255 = 0FFh the compiler will produce an error, as the value is too large for a single byte.


HTH, phueghy
Posted on 2003-04-13 16:26:24 by phueghy