gamedig / node-gamedig

Query game servers and not only! Node.JS/Deno or Bash (via the CLI).
https://www.npmjs.com/package/gamedig
MIT License
589 stars 144 forks source link

There are all player with unknown names in minecraft pocket edition. #280

Open el9in opened 2 years ago

el9in commented 2 years ago

There are all player with unknown names in minecraft pocket edition.

Q#0 Starting
Q#0 Protocol: Minecraft
Q#0 Options: {
  socketTimeout: 10000,
  attemptTimeout: 20000,
  maxAttempts: 1,
  port: 19132,
  protocol: 'minecraft',
  type: 'minecraftpe',
  host: 'antralia.ru',
  debug: true
}
Q#0 DNS Lookup: antralia.ru
Q#0 SRV Resolve: _minecraft._tcp.antralia.ru
Q#0 Error: querySrv ENOTFOUND _minecraft._tcp.antralia.ru
    at QueryReqWrap.onresolve [as oncomplete] (node:dns:213:19)
Q#0 Standard Resolve: antralia.ru
Q#0 Found address: 213.5.229.12
Q#1 Starting
Q#1 Protocol: MinecraftVanilla
Q#1 Options: {
  socketTimeout: 10000,
  attemptTimeout: 20000,
  maxAttempts: 1,
  port: 19132,
  protocol: 'minecraft',
  type: 'minecraftpe',
  host: 'antralia.ru',
  debug: true,
  address: '213.5.229.12'
}
Q#1 213.5.229.12:19132 TCP Connecting
Q#2 Starting
Q#2 Protocol: Gamespy3
Q#2 Options: {
  socketTimeout: 10000,
  attemptTimeout: 20000,
  maxAttempts: 1,
  port: 19132,
  protocol: 'minecraft',
  type: 'minecraftpe',
  host: 'antralia.ru',
  debug: true,
  address: '213.5.229.12',
  encoding: 'utf8'
}
Q#3 Starting
Q#3 Protocol: MinecraftBedrock
Q#3 Options: {
  socketTimeout: 10000,
  attemptTimeout: 20000,
  maxAttempts: 1,
  port: 19132,
  protocol: 'minecraft',
  type: 'minecraftpe',
  host: 'antralia.ru',
  debug: true,
  address: '213.5.229.12'
}
213.5.229.12:19132 UDP(40858)-->
Buffer length: 11 bytes
fe fd 09 00 00 00 01 00 00 00 00

213.5.229.12:19132 UDP(40858)-->
Buffer length: 33 bytes
01 11 22 33 44 55 66 77 88 00 ff ff 00 fe fe fe fe fd fd fd fd
      "  3  D  U  f  w
12 34 56 78 00 00 00 00 00 00 00 00
   4  V  x

Q#1 213.5.229.12:19132 TCP Connected
Q#1 Registered RTT: 16ms
Q#1 213.5.229.12:19132 TCP-->
Q#1 Buffer length: 20 bytes
11 00 2f 0b 61 6e 74 72 61 6c 69 61 2e 72 75 4a bc 01 01 00
      /     a  n  t  r  a  l  i  a  .  r  u  J

213.5.229.12:19132 <--UDP(40858)
Buffer length: 126 bytes
1c 11 22 33 44 55 66 77 88 2a 84 a4 02 e9 62 b5 24 00 ff ff 00
      "  3  D  U  f  w     *              b     $
fe fe fe fe fd fd fd fd 12 34 56 78 00 5b 4d 43 50 45 3b c2 a7
                           4  V  x     [  M  C  P  E  ;
6c c2 a7 61 41 6e 74 72 61 6c 69 61 20 4e 65 74 77 6f 72 6b c2
l        a  A  n  t  r  a  l  i  a     N  e  t  w  o  r  k
a7 72 3b 35 30 33 3b 31 2e 31 38 2e 33 30 3b 37 3b 38 3b 33 30
   r  ;  5  0  3  ;  1  .  1  8  .  3  0  ;  7  ;  8  ;  3  0
36 33 37 35 33 39 37 38 39 33 31 32 32 39 39 38 38 3b 50 6f 63
6  3  7  5  3  9  7  8  9  3  1  2  2  9  9  8  8  ;  P  o  c
6b 65 74 4d 69 6e 65 2d 4d 50 3b 41 64 76 65 6e 74 75 72 65 3b
k  e  t  M  i  n  e  -  M  P  ;  A  d  v  e  n  t  u  r  e  ;

Q#2 Registered RTT: 20ms
Q#2 Skipping packet, type mismatch
Q#3 Registered RTT: 21ms
Q#3 Nonce: 1122334455667788
Q#3 Magic value: 00ffff00fefefefefdfdfdfd12345678
Q#3 Raw status str: MCPE;§l§aAntralia Network§r;503;1.18.30;7;8;3063753978931229988;PocketMine-MP;Adventure;
Q#3 UDP send finished by callback
Q#3 Size of players array: 7
Q#3 Size of bots array: 0
Q#3 Query was successful
Q#1 TCP Closed
Q#2 UDP timeout detected
Q#2 Query failed with error Error: UDP - Timed out after 10000ms
    at Timeout.<anonymous> (/home/el9in/node_modules/gamedig/lib/Promises.js:7:25)
    at listOnTimeout (node:internal/timers:557:17)
    at processTimers (node:internal/timers:500:7)
Q#1 Query failed with error Error: TCP - Timed out after 10000ms
    at Timeout.<anonymous> (/home/el9in/node_modules/gamedig/lib/Promises.js:7:25)
    at listOnTimeout (node:internal/timers:557:17)
    at processTimers (node:internal/timers:500:7)
Q#0 Size of players array: 7
Q#0 Size of bots array: 0
Q#0 Query was successful
Results {
  name: '§l§aAntralia Network§r',
  map: 'PocketMine-MP',
  password: false,
  raw: {
    edition: 'MCPE',
    protocolVersion: '503',
    mcVersion: '1.18.30',
    serverId: '3063753978931229988',
    gameMode: 'Adventure',
    nintendoOnly: false
  },
  maxplayers: 8,
  players: Players(7) [
    Player { name: '', raw: {} },
    Player { name: '', raw: {} },
    Player { name: '', raw: {} },
    Player { name: '', raw: {} },
    Player { name: '', raw: {} },
    Player { name: '', raw: {} },
    Player { name: '', raw: {} }
  ],
  bots: Players(0) [],
  connect: 'antralia.ru:19132',
  ping: 21
}

Players(7) [ Player { name: '', raw: {} }, Player { name: '', raw: {} }, Player { name: '', raw: {} }, Player { name: '', raw: {} }, Player { name: '', raw: {} }, Player { name: '', raw: {} }, Player { name: '', raw: {} } ]

mmorrisontx commented 2 years ago

This is by design for servers which do not return player names.

el9in commented 2 years ago

As my users say, it displays nicknames for other monitored projects.

mmorrisontx commented 2 years ago

Different games support different features. Minecraft pocket edition does not support player names in its query protocol.

el9in commented 2 years ago

I mean just the data of nicknames of the same server is received by another project, how do they do it?

mmorrisontx commented 2 years ago

What's the other project?

el9in commented 2 years ago

The same (analog) project with monitoring, but it get names of players.

mmorrisontx commented 2 years ago

What is analog?

el9in commented 2 years ago

https://sun9-47.userapi.com/s/v1/if2/UOXNEW2vneiXQLOiYTTdzTPRJI5Ju_--JBDA1tJ80wq911MqxZLh3PGy0zTQJfDu1gc5bTFfUQb4gwcBgrnpt0Kg.jpg?size=1080x691&quality=95&type=album

el9in commented 2 years ago

image

mmorrisontx commented 2 years ago

Documentation for minecraft bedrock edition query protocol is very bad. The limited support we have is from reverse engineering.

If the source code for that bot is available, we may be able to use it to add bedrock player names to gamedig.

el9in commented 2 years ago

Unfortunately, I do not own this script, I just wanted to inform you that there is an opportunity to get players' nicknames.

velimir-97 commented 2 years ago

Does this help? There are some example implementations too.

mmorrisontx commented 2 years ago

Unfortunately not. Pocket edition does not implement the standard java edition query protocol.

velimir-97 commented 2 years ago

Ah I see, nevermind then. Thanks for looking into it.

el9in commented 2 years ago

Will it help? https://wiki.bedrock.dev/documentation/queries.html

CosminPerRam commented 10 months ago

Will it help? https://wiki.bedrock.dev/documentation/queries.html

Very late to the party, but no, this does not help.

podrivo commented 6 months ago

Just did a query for that server and was able to get player names. Maybe something changed in their end? Anyway, @CosminPerRam I guess this is safe to close.

"players": [
    {
      "name": "Bulka_c_kremom",
      "raw": {}
    },
    {
      "name": "Sdpir",
      "raw": {}
    },
    {
      "name": "Denizka1",
      "raw": {}
    },
    {
      "name": "pechenka455",
      "raw": {}
    },
    {
      "name": "Qivi_1000",
      "raw": {}
    },
    {
      "name": "DayNikita",
      "raw": {}
    },
    {
      "name": "A1im123456",
      "raw": {}
    },
    {
      "name": "_Vist_",
      "raw": {}
    },
    {
      "name": "artem4lk",
      "raw": {}
    },
    {
      "name": "1_9ibjio4ko_1",
      "raw": {}
    },
    {
      "name": "sidor455",
      "raw": {}
    },
    {
      "name": "Shoma",
      "raw": {}
    },
    {
      "name": "TimKing07",
      "raw": {}
    },
    {
      "name": "a1im234",
      "raw": {}
    },
    {
      "name": "ks1ng_03",
      "raw": {}
    },
    {
      "name": "ImKs1ng",
      "raw": {}
    },
    {
      "name": "He_Be3yH4uk_",
      "raw": {}
    },
    {
      "name": "GanFun",
      "raw": {}
    }
  ]
Full query response ```js gamedig --type minecraftpe --pretty 213.5.229.12 { "name": "| DayZombie |", "map": "DayZombie 4.0", "password": false, "raw": { "gamespy": { "name": "§k§4|§r §fDayZombie §k§4|§r", "map": "", "password": false, "raw": { "playerTeamInfo": { "": [ { "player": "Bulka_c_kremom" }, { "player": "Sdpir" }, { "player": "Denizka1" }, { "player": "pechenka455" }, { "player": "Qivi_1000" }, { "player": "DayNikita" }, { "player": "A1im123456" }, { "player": "_Vist_" }, { "player": "artem4lk" }, { "player": "1_9ibjio4ko_1" }, { "player": "sidor455" }, { "player": "Shoma" }, { "player": "TimKing07" }, { "player": "a1im234" }, { "player": "ks1ng_03" }, { "player": "ImKs1ng" }, { "player": "He_Be3yH4uk_" }, { "player": "GanFun" } ] }, "hostname": "§k§4|§r §fDayZombie §k§4|§r", "gametype": "SMP", "game_id": "MINECRAFTPE", "version": "v1.1.0,v1.1.1,v1.1.2,v1.1.3,v1.1.4,v1.1.5,v1.1.7", "server_engine": "DayZombie 4.0 (vk.com/dayzombie)", "plugins": "DayZombie 4.0 (vk.com/dayzombie)", "map": "world", "numplayers": "18", "maxplayers": "50", "whitelist": "off", "hostip": "0.0.0.0", "hostport": "19132" }, "maxplayers": 50, "players": [ { "name": "Bulka_c_kremom", "raw": {} }, { "name": "Sdpir", "raw": {} }, { "name": "Denizka1", "raw": {} }, { "name": "pechenka455", "raw": {} }, { "name": "Qivi_1000", "raw": {} }, { "name": "DayNikita", "raw": {} }, { "name": "A1im123456", "raw": {} }, { "name": "_Vist_", "raw": {} }, { "name": "artem4lk", "raw": {} }, { "name": "1_9ibjio4ko_1", "raw": {} }, { "name": "sidor455", "raw": {} }, { "name": "Shoma", "raw": {} }, { "name": "TimKing07", "raw": {} }, { "name": "a1im234", "raw": {} }, { "name": "ks1ng_03", "raw": {} }, { "name": "ImKs1ng", "raw": {} }, { "name": "He_Be3yH4uk_", "raw": {} }, { "name": "GanFun", "raw": {} } ], "bots": [], "connect": "213.5.229.12:19132", "ping": 311 }, "bedrock": { "name": "§k§4|§r §fDayZombie §k§4|§r", "map": "DayZombie 4.0", "password": false, "raw": { "edition": "MCPE", "protocolVersion": "113", "mcVersion": "1.1.7", "serverId": "3677700192533618420", "gameMode": "Adventure", "nintendoOnly": false }, "maxplayers": 50, "players": [ { "name": "", "raw": {} }, { "name": "", "raw": {} }, { "name": "", "raw": {} }, { "name": "", "raw": {} }, { "name": "", "raw": {} }, { "name": "", "raw": {} }, { "name": "", "raw": {} }, { "name": "", "raw": {} }, { "name": "", "raw": {} }, { "name": "", "raw": {} }, { "name": "", "raw": {} }, { "name": "", "raw": {} }, { "name": "", "raw": {} }, { "name": "", "raw": {} }, { "name": "", "raw": {} }, { "name": "", "raw": {} }, { "name": "", "raw": {} }, { "name": "", "raw": {} } ], "bots": [], "connect": "213.5.229.12:19132", "ping": 314 } }, "maxplayers": 50, "players": [ { "name": "Bulka_c_kremom", "raw": {} }, { "name": "Sdpir", "raw": {} }, { "name": "Denizka1", "raw": {} }, { "name": "pechenka455", "raw": {} }, { "name": "Qivi_1000", "raw": {} }, { "name": "DayNikita", "raw": {} }, { "name": "A1im123456", "raw": {} }, { "name": "_Vist_", "raw": {} }, { "name": "artem4lk", "raw": {} }, { "name": "1_9ibjio4ko_1", "raw": {} }, { "name": "sidor455", "raw": {} }, { "name": "Shoma", "raw": {} }, { "name": "TimKing07", "raw": {} }, { "name": "a1im234", "raw": {} }, { "name": "ks1ng_03", "raw": {} }, { "name": "ImKs1ng", "raw": {} }, { "name": "He_Be3yH4uk_", "raw": {} }, { "name": "GanFun", "raw": {} } ], "bots": [], "connect": "213.5.229.12:19132", "ping": 311 } ```