Colin Posted April 20, 2008 Share Posted April 20, 2008 I'm wondering if the TCP functionality automatically encrypts sent data, and decrypts received data. I'm trying to interface a client coded in AutoIT with a server coded in a different language (Game Maker). I am in contact with the developer of said server (we are working on the project together) and he has not specifically encrypted any of outgoing the data, nor is he decrypting incoming data. He is checking, but he is pretty sure the TCP functionality he is using on his end also does not automatically encypt/decrypt data. The problem is, any data transfering between the two sources are illegible. Coming from the GM Server into the AutoIT client, the data looks like some kind of hash (2 digits, an x, and a bunch of digits or something like that). The other way around, the data is just a few odd looking characters (not normal alphanumeric). It seems like a data encryption issue. But where is the encryption happening? And if it's happening on the AutoIT end, how does the GM Server decrypt the data? Any help or direction is appreciated. Thanks! Link to comment Share on other sites More sharing options...
Alek Posted April 20, 2008 Share Posted April 20, 2008 the data you receive is binary and you probably have to send the data as binary as well. I'm guessing the data you receive looks something like this 0xA4F390F164C145 use BinaryToString to "decrypt" it and StringToBinary on the data you want to send. this is usally the case when using TCP with programs that is not written in autoit. [font="Impact"]Never fear, I is here.[/font] Link to comment Share on other sites More sharing options...
Colin Posted April 20, 2008 Author Share Posted April 20, 2008 (edited) Oh wow. Thank you for the fast response. You are correct, that's exactly what the data looked like. I will try this fix and see how it works. I'll let you know how it worked. Edit: So far the results are inconclusive. I'm receiving data that I believe has been "decrypted" correctly, although I am unsure. The data is simply "X". I will have to have my friend program something more conclusive as a test. Although, on first attempts, it seems like on the other end sending over the data using StringToBinary didn't work. It is receiving blank data. (the garbled characters I was referring to in the first post ended up being because it was sending the string with @LF at the end. After I took that out, the data being received is just blank.) Edited April 20, 2008 by Colin Link to comment Share on other sites More sharing options...
Alek Posted April 20, 2008 Share Posted April 20, 2008 try trowing in stringreplace(binarytostring(var for recving data),chr(0),'00')) autoit dosent like to show chr(0) so it just cuts the string where chr(0) is. [font="Impact"]Never fear, I is here.[/font] Link to comment Share on other sites More sharing options...
Colin Posted April 21, 2008 Author Share Posted April 21, 2008 It was actually on the other end, the data I was sending. It was sending over the string along with @LF. I just removed the @LF, and what I got on the GM server end was blank data. But in any case, I just tried what you suggested and it's still blank. Thanks for the support btw. I think I'm moving in the right direction now. I'm going to have to collaborate a bit more with my friend to do some more testing, but this has helped. If you, or anyone else, has any further insight it will be much appreciated. 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