Listening to an inbound TCP port

Programming, for all ages and all languages.
Post Reply
User avatar
Zacariaz
Member
Member
Posts: 1069
Joined: Tue May 22, 2007 2:36 pm
Contact:

Listening to an inbound TCP port

Post by Zacariaz »

Once again I need expert advice ;)

The question is rather simple though I fear the answer will be a disappointment.

I have this game that I play from which I wish to extract some information. This information is already available and I've previously been trying out some image recognition to extract it. Suffice to say I've had little success.

Then, not too long ago, the answer, well a possible answer anyway, came to me. The data presented has to come from somewhere and I actually know from where.

So I have this inbound TCP port, that I'm pretty sure is the one I need to be listening on, and a connection is already made from the server to the game. I've been investigation how this could be done, but my limited knowledge have not made it easy. Apparently, when talking about a TCP port, it's not as easy as it sounds. Sure enough, you can figure out if there's any traffic on a specific port, if a connection is made and all such things, but I'm interested in the data presented. I've been lead to believe that, if this is at all possible, some sort of tunneling of a sort, would be needed.

At this point I'm at a standstill and I fear that even if this problem is ever solved, my troubles won't be over as the data also need to be interpreted, in which case I'll of course start bugging you again ;)

I don't think that any further information is needed for now. The programming will most like be done in Java, but as long as the solution is sound, it shouldn't pose a problem figuring the rest out.


Thank you in advance and best regards.

edit:
One small piece of information which should probably prove important. The game is at this point only playable in Windows, so this is of course the platform the software will be running on.
This was supposed to be a cool signature...
User avatar
Owen
Member
Member
Posts: 1700
Joined: Fri Jun 13, 2008 3:21 pm
Location: Cambridge, United Kingdom
Contact:

Re: Listening to an inbound TCP port

Post by Owen »

Are you sure its inbound? I'd expect otherwise, as that is far too much hassle (Likely to be blocked by routers/firewalls). Most likely, you would need to create a local server which connects to the actual server, passes the traffic to and forth between it and the actual client and extracts the data you want. The game would then need to be instructed to connect to your imposter's port.
User avatar
Zacariaz
Member
Member
Posts: 1069
Joined: Tue May 22, 2007 2:36 pm
Contact:

Re: Listening to an inbound TCP port

Post by Zacariaz »

Owen wrote:Are you sure its inbound? I'd expect otherwise, as that is far too much hassle (Likely to be blocked by routers/firewalls). Most likely, you would need to create a local server which connects to the actual server, passes the traffic to and forth between it and the actual client and extracts the data you want. The game would then need to be instructed to connect to your imposter's port.

This is the information I've got about which ports the game uses:
Open these ports in your firewall:

* 20, 21 (TCP Outbound) - Additional TCP Port outbound for passive mode FTP
* 80 (Outbound)
* 30584 (UDP inbound/outbound)
* 30583 (TCP Outbound)
* 554 (TCP Inbound)
The answer is of course that I'm not sure about anything other than it's TCP as the data need to arrive without errors and such. Now, the above information is from the FAQ instruction people to open these ports if they have connection problems.

I can't say that I've ever had any problems with ports my self, so regarding the "hassle" it would seem that it somehow is not as big a problem that one would expect, but then again, the information is out there if and when people have such problems, so maybe that's why I haven't heard much about it.

edit:
of course I'd expect the inbound TCP port 554 to be the one I'm interested in.

Actually, here is the full FAQ regarding connection trouble. Maybe there's more important information: https://account.entropiauniverse.com/su ... e-entropi/
This was supposed to be a cool signature...
User avatar
Owen
Member
Member
Posts: 1700
Joined: Fri Jun 13, 2008 3:21 pm
Location: Cambridge, United Kingdom
Contact:

Re: Listening to an inbound TCP port

Post by Owen »

Port 554 is registered as RTSP; I'd expect that its used for audio feeds (VOIP connection establishment?). The majority of the data will probably be on 30584/3; I'd expect most games to implement their own protocol on top of UDP as TCP can cause big latency issues
User avatar
Zacariaz
Member
Member
Posts: 1069
Joined: Tue May 22, 2007 2:36 pm
Contact:

Re: Listening to an inbound TCP port

Post by Zacariaz »

Owen wrote:Port 554 is registered as RTSP; I'd expect that its used for audio feeds (VOIP connection establishment?). The majority of the data will probably be on 30584/3; I'd expect most games to implement their own protocol on top of UDP as TCP can cause big latency issues
So, in short, what you're saying is that that it might as well be an UDP port? Well, that may make a significant difference, though I'm not quite sure whether it's positive or negative. Anyway, good to know.
This was supposed to be a cool signature...
pcmattman
Member
Member
Posts: 2566
Joined: Sun Jan 14, 2007 9:15 pm
Libera.chat IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:

Re: Listening to an inbound TCP port

Post by pcmattman »

So, in short, what you're saying is that that it might as well be an UDP port?
Game data is only ever transferred over UDP: you don't want to get stuck with retransmissions if a packet gets dropped somewhere, you just want to ignore and keep going. If one or two packets get lost, the packets following give the server enough information to send other clients. TCP is just not designed for realtime data.

Some games offer a TCP port as a "query port", where you connect and obtain game information with a given protocol. For example, Valve's multiplayer games allow you to determine the currently playing map, the number of people in the server, the gamer tags of those in the server, and the server's name.

EDIT: Err, sorry, I mean fast-paced realtime game data, for something like a first-person shooter. As Thomas below has pointed out, there are some games which don't need this realtime nature but rather need reliability. Those would use TCP - sorry for the confusion :)
Last edited by pcmattman on Thu May 13, 2010 1:54 am, edited 1 time in total.
User avatar
Zacariaz
Member
Member
Posts: 1069
Joined: Tue May 22, 2007 2:36 pm
Contact:

Re: Listening to an inbound TCP port

Post by Zacariaz »

pcmattman wrote:
So, in short, what you're saying is that that it might as well be an UDP port?
Game data is only ever transferred over UDP: you don't want to get stuck with retransmissions if a packet gets dropped somewhere, you just want to ignore and keep going. If one or two packets get lost, the packets following give the server enough information to send other clients. TCP is just not designed for realtime data.

Some games offer a TCP port as a "query port", where you connect and obtain game information with a given protocol. For example, Valve's multiplayer games allow you to determine the currently playing map, the number of people in the server, the gamer tags of those in the server, and the server's name.
I'm very much aware that most games use upd, ipx or whatever, however, in this case the data has to be received with no errors, no more different than a bank transaction, well mostly. The game I'm playing has, what they call, a real cash economy, which basically means that every action and the reaction has to be accurate. udp, ipx or any other inaccurate protocol, will not suffice.
This was supposed to be a cool signature...
pcmattman
Member
Member
Posts: 2566
Joined: Sun Jan 14, 2007 9:15 pm
Libera.chat IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:

Re: Listening to an inbound TCP port

Post by pcmattman »

Which game is it, out of interest?
User avatar
Thomas
Member
Member
Posts: 281
Joined: Thu Jun 04, 2009 11:12 pm

Re: Listening to an inbound TCP port

Post by Thomas »

Hi,
pcmattman wrote:Game data is only ever transferred over UDP
,Not always.In a turn based startegy game it would be better to use TCP than UDP.
--Thomas
pcmattman
Member
Member
Posts: 2566
Joined: Sun Jan 14, 2007 9:15 pm
Libera.chat IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:

Re: Listening to an inbound TCP port

Post by pcmattman »

Ah true, thanks Thomas - updated my post. Oops :oops:
User avatar
Zacariaz
Member
Member
Posts: 1069
Joined: Tue May 22, 2007 2:36 pm
Contact:

Re: Listening to an inbound TCP port

Post by Zacariaz »

pcmattman wrote:Which game is it, out of interest?
Entropia Universe
This was supposed to be a cool signature...
User avatar
Brynet-Inc
Member
Member
Posts: 2426
Joined: Tue Oct 17, 2006 9:29 pm
Libera.chat IRC: brynet
Location: Canada
Contact:

Re: Listening to an inbound TCP port

Post by Brynet-Inc »

Stop playing video games and get back to work!
Image
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.
Post Reply