Compare commits
No commits in common. "838ffc497a3d4b9a70a0008328af75406c66fbeb" and "009f542c556bacce222151cb6ec92d5862a913da" have entirely different histories.
838ffc497a
...
009f542c55
|
@ -1,5 +0,0 @@
|
|||
import { pingBedrock } from "../index.js";
|
||||
|
||||
const host = "mc.nevertime.su";
|
||||
const ping = await pingBedrock(host);
|
||||
console.log(ping);
|
|
@ -5,8 +5,7 @@
|
|||
|
||||
'use strict';
|
||||
|
||||
import dgram from 'node:dgram';
|
||||
import crypto from 'node:crypto'
|
||||
import dgram from 'dgram';
|
||||
|
||||
const MAGIC = "00ffff00fefefefefdfdfdfd12345678";
|
||||
const START_TIME = new Date().getTime();
|
||||
|
@ -22,7 +21,7 @@ const createUnconnectedPingFrame = (timestamp) => {
|
|||
buffer.writeUInt8(0x01, 0); // Packet ID
|
||||
buffer.writeBigInt64LE(BigInt(timestamp), 1); // Timestamp
|
||||
Buffer.from(MAGIC, "hex").copy(buffer, 9); // OFFLINE_MESSAGE_DATA_ID (Magic)
|
||||
Buffer.from(crypto.randomBytes(8)).copy(buffer, 25); // Client GUID
|
||||
buffer.writeBigInt64LE(BigInt(0), 25); // Client GUID
|
||||
return buffer;
|
||||
};
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
'use strict';
|
||||
|
||||
import net from 'node:net';
|
||||
import net from 'net';
|
||||
import varint from './varint.js';
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@minescope/mineping",
|
||||
"version": "1.5.0",
|
||||
"version": "1.4.1",
|
||||
"description": "Ping both Minecraft Bedrock and Java servers.",
|
||||
"main": "index.js",
|
||||
"types": "types/index.d.ts",
|
||||
|
|
Loading…
Reference in New Issue