in reply to Querying program port

This is very possible, and I could probably adapt some code from one of my (currently untested) hobby projects for this, but first I have some questions:

This sounds very much like a common system cracker tool, although there are legitimate uses for this type of functionality as well. I want to be sure that you have a legitimate use before I even think about giving you code for this.

Answering all of these questions will go a long way towards establishing your legitimacy. Having worked in systems administration at a small Internet-dependent business, where kicking script kiddies out of the aging PHP-heavy infrastructure that management did not want to upgrade was a large part of my job, I have no desire to help that kind of nonsense along.

Replies are listed 'Best First'.
Re^2: Querying program port
by CougarXR7 (Acolyte) on Aug 11, 2019 at 06:00 UTC

    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!

      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!