Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^2: Querying program port

by CougarXR7 (Acolyte)
on Aug 11, 2019 at 06:00 UTC ( #11104272=note: print w/replies, xml ) Need Help??


in reply to Re: Querying program port
in thread Querying program port

My friend is a game server admin. He is trying to get player stats from his game server, "Deaths, Kills, ect., ect..., but cannot because the ports he has tried does not query his game server.

All I am trying to do is help my friend discover which port will return his game's server player stats.

Protocol is UDP

example: 12.345.67.890:25000

Ip Address:port /enter

\status\ enter

Returned reply, YES, exit script, log return player stats

Returned reply, NO, continue with script

ip address stays the same. The port inc by 1

now its 12.345.67.890:25001/enter

\status\ enter

Script keeps running until there is a return. With printing info on terminal, to make sure script is still running.

Sir, I have no idea what "kiddie scripts or even PHP is about, You lost me at kiddie scripts!

If I failed to answer you, please let me know!

I have a dislike for hackers, they can ruin it for everyone!

Replies are listed 'Best First'.
Re^3: Querying program port
by jcb (Deacon) on Aug 11, 2019 at 06:21 UTC

    Has your friend tried the netstat command, probably as netstat -a to check listening ports, to confirm that the game server is listening at all? (Run that on the same machine as the server.) It has been a long time since I have used Windows, so you may want to check the output of netstat /? or netstat -? for other hints on using that command.

    Your descriptions sound suspiciously like a series of keystrokes entered at some prompt. What are you typing those keystrokes into? The best solution here may involve Expect rather than Perl if you are trying to automate interacting with a simple shell program. Perl will work much better if you are wanting to actually send network packets directly.

      My friend and others have tried everything. That is why I am asking if this script can be done.

      This script will be ran on a terminal on a Ubuntu system.

      I can do this manually, changing the port each time, but to automate it with a script would be gold!

      I could run this auto script until it returns player stats.

      Sir, thank you for your time. However it seems that you are not comfortable with doing this.

      I will never ask anyone to do anything they are uncomfortable with.

      Thank you so very much for your replies!

        I did not say that I am uncomfortable with this. At this point I'm asking exactly what steps are involved. The descriptions that you have given appear to be incomplete. As I understand, most game servers speak various binary protocols, so simply sending "status" to a UDP(!) port is unlikely to do anything useful. What program are you typing "status" into?

        Please read carefully and ask your friend if he has tried netstat.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11104272]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2019-12-12 18:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?