rysiora Posted October 2, 2005 Share Posted October 2, 2005 Hello, i have a problem. I want to send a packet via TCP Send function, but what with a null character? TCPStartUp() ; That's how my packet should look like: ;09 00 8C AE 80 AF 7D 07 20 0E 01 (SIZE: 11) $socket = TCPConnect($IPadress, $Port) $A = 0x09 $B = 0x00 $C = 0x8C $D = 0xAE $E = 0x80 $F = 0xAF $G = 0x7D $H = 0x07 $I = 0x20 $J = 0x0E $K = 0x01 $data = Chr($A) & Chr($B) & Chr($C) & Chr($D) & Chr($E) & Chr($F) & Chr($G) & Chr($H) & Chr($I) & Chr($J) & Chr($K) TCPSend($socket, $data) TCPShutdown() ;Now - the sent packet looks bad (I used sniffer to check it): ;09 8C AE 80 AF 7D 07 20 0E 01 (SIZE: 10) I can't send the Chr(0) NULL 00 thing! But it is very needed in my packet (as you know). I'm using beta .66, but I can use newer if needed. Please - any solution code for my problem. Thanks Link to comment Share on other sites More sharing options...
jpm Posted October 2, 2005 Share Posted October 2, 2005 Where do you explain why the Chr'0) is really needed? PS Today you can only receive Chr(0) with the binary support in the latest beta 3.1.1.80 Link to comment Share on other sites More sharing options...
rysiora Posted October 2, 2005 Author Share Posted October 2, 2005 Do I really have to explain why my packet MUST look like 09 00 8C AE 80 AF 7D 07 20 0E 01 not like 09 8C AE 80 AF 7D 07 20 0E 01 ? Answer is veeeeery simple: because it WONT work! There have to be 00 in this stupid packet or the server will simply don't understeand it.... As i understood - I can only *recevie* Chr(0) in beta .80 ? Not send ? Damn, so I was so close to succesfully send a packet to server... Link to comment Share on other sites More sharing options...
jpm Posted October 2, 2005 Share Posted October 2, 2005 what is the purpose of such packet? Link to comment Share on other sites More sharing options...
Valik Posted October 3, 2005 Share Posted October 3, 2005 what is the purpose of such packet?What's it matter, JP? Who cares if he's writing a virus or sending a packet to an IRC server or a web server or it's a custom application. It's irrelevant what the packet is for, the user wants to send it and can't and wants to know how. Link to comment Share on other sites More sharing options...
rysiora Posted October 26, 2005 Author Share Posted October 26, 2005 Problem solved in beta 82. Now it's working fine. Thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now