For correct ping send 4 bytes to server - 0xFFFFFFFF, than receive 16 bytes, where 4 is current online, 4 bytes is uptime in seconds, others 8 is reserved. After server drop connection. -cvet
ping.sh
- Bash script for pinging, requires dd
and od
.
ping.fasm
- Same thing implemented in x64 asm (FASM) for linux using only syscalls, no libc.
ping.sh <server ip> <server port>
node ping.js <server ip> <server port>
./ping.sh play.fonline-reloaded.net 2238
Players: 36
Uptime: 103831 seconds
node ping.js play.fonline-reloaded.net 2238
Connected to play.fonline-reloaded.net:2238
Players: 8
Uptime: 6 days, 8 hours, 5 minutes