Created
June 19, 2018 11:30
-
-
Save frnkst/80ef8aac8b74a4ebdcfabf30abb1b640 to your computer and use it in GitHub Desktop.
M3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
icmpSocket.on('message', async function (buffer, ip) { | |
let p = buffer.toString('hex').substr(100, 4); | |
let portNumber = parseInt(p, 16); | |
if (port === portNumber) { | |
try { | |
let symbolicAddress; | |
if (!NO_REVERSE_LOOKUP) { | |
symbolicAddress = await getSymbolicAddress(ip); | |
} | |
handleReply(ip, symbolicAddress)[0]; | |
} catch (e) { | |
handleReply(ip); | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment