Im trying to make a program that can send text to a particular flash chat hosted on a site (I intend to develop this into a client of sorts, but, im just taking baby steps at the moment).

I used various sniffers to detect the packet I send to the chat server when I type text, as well as detect the IP and Port.

The packet takes the form of "<name>Ksbunker</name><message>text I send</message>"...

I've debugged the program, it says its sending the correct packet to the correct ip and port.

However, nothing gets received by the server (or if it does, I fail to see the text I send appear within the chat).

Could anyone help me with this please?
Posted on 2006-07-17 23:15:25 by Ksbunker
Posted on 2006-07-17 23:19:24 by SpooK
Looks like it's sending plaintext XML, which is pretty simple, and require very little overhead... But maybe there's some information it sends along with that, like login info, or something to validate that you're there, as opposed to just all of a sudden recieving messages from people, and you most likely need to send that information before it will respond to you properly.
Posted on 2006-07-18 22:38:10 by Bobbias
@Spook, yes thats a great source, i've already put the contents of that guide to good use.

@Bobbias, basically you're saying I must send the login packets and make sure the server thinks im a regular user before I can send any text. Ok Cheers.

I have a second question. I'm using MadWizard's Winsock Debugger, everytime i send a packet (From my program), it gets sent via a different Socket ID. After inspection of many winsock programs, chats, etc... I notice that the material they send, is all from the same Socket ID. How would I make it so that the information I send, always gets sent from the same Socket ID? (Furthermore, is there anyway to specify the ID of the socket?).

Because I was thinking, instead of replicating login and authentification packets (im not too keen to do this, because I have NFI what the login packets are), would it be possible to somehow bind (correct word?) my socket to the ID of a socket already connected?

Cheers
Posted on 2006-07-20 23:07:17 by Ksbunker
Ksbunker,

- Is the protocol TCP or UDP based?
- Do you constantly create/close the socket? (that would explain the diff. socket IDs)
Posted on 2006-07-21 03:26:35 by f0dder
- TCP
- Yes, precisely. I'm calling a procedure that just creates a socket, sends the information, closes the socket.
Posted on 2006-07-21 06:05:16 by Ksbunker
Well, that's not going to work, then!

TCP based connections are stateful, so unless the protocol you're dealing with is very awkward, you need to keep the socket open. You'll most likely also need some form of login/authentication/handshake as well.

Isn't the protocol used published somewhere? Reverse engineering it is unfortunately out of scope for this forum...
Posted on 2006-07-21 06:40:29 by f0dder
However, nothing gets received by the server (or if it does, I fail to see the text I send appear within the chat).
There are terms like session and authentication that plays into chat sessions.  Keep doing your research!

Regards,  P1  8)
Posted on 2006-07-21 12:24:29 by P1