Update minecraft-enum.yaml

patch-4
pussycat0x 2024-06-23 11:55:13 +05:30 committed by GitHub
parent 02fb739d0a
commit c21674d4bb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 6 deletions

View File

@ -12,18 +12,22 @@ info:
verified: true
max-request: 1
shodan-query: product:"Minecraft"
tags: js,network,minecraft,enum
tags: js,network,minecraft,enum
javascript:
- pre-condition: |
isPortOpen(Host,Port);
- code: |
let data = "fe01"
let c = require("nuclei/net");
let conn = c.Open('tcp', `${Host}:${Port}`);
conn.SendHex(data);
let response = conn.RecvString();
const version = response.slice(16, 30).replace(/(\d+)(\d{1})(\d+)/, "$1.$2.$3");
const description = response.slice(30, -4);
const onlinePlayers = response.slice(-1);
const maxPlayers = response.slice(-3);
let cleanedResponse = response.replace(/\x00/g, '');
const version = cleanedResponse.slice(16, 30).replace(/(\d+)(\d{1})(\d+)/, "$1.$2.$3");
const description = cleanedResponse.slice(30, -4);
const onlinePlayers = cleanedResponse.slice(-1);
const maxPlayers = cleanedResponse.slice(-3);
Export("Version: ", version , " Description:", description ," Online Players:", onlinePlayers, " Maximum Players:", maxPlayers)
args:
@ -44,4 +48,3 @@ javascript:
- type: dsl
dsl:
- response
# digest: 4a0a00473045022023b2976e91e7c92db1fe31bd18bb5a24b0fd67ce16a0fdf4291a8b93a685f9bb022100cf6cb8408790d6c30b2269bc44c79289d8827ab7a427946efb332ffb694bf089:922c64590222798bb761d5b6d8e72950