Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

socket.remoteAddress in undefined when connecting using nmap #16523

Closed
wildchild opened this issue Apr 18, 2015 · 1 comment
Closed

socket.remoteAddress in undefined when connecting using nmap #16523

wildchild opened this issue Apr 18, 2015 · 1 comment

Comments

@wildchild
Copy link

I pointed nmap to opened socket in node. Can anyone shed a light, why remoteAddress is undefined? In what case it's possible and how to prevent such behaviour? Tried on osx and linux.

var net = require('net');

var server = net.createServer(function (socket) {
  console.log(socket.remoteAddress);
});
server.listen(12345, '127.0.0.1');

output: undefined

nmap 127.0.0.1 -p 12345

node versions: 0.10.38 and 0.12.2

@misterdjules
Copy link

Thank you @wildchild for reporting this issue. As you already mentioned, this is a duplicate of #7566. Closing it as such.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants